We have learns how Tor network works and how to use it in our Tor tutorial. As we know dark websites use .onion for their top-level domain(TLD). Here the question comes can we create our own website in Dark Web using our Kali Linux system? The answer is yes easily.
In this post, we are going to learn how we can host own .onion dark web in Kali Linux.
First of all, we install and configure the Tor service. To do that we run following command in our Kali Linux Terminal:
apt-get install tor
We press y for yes when it prompts for storage permission. The screenshot of the command is the following:
Then we need to configure torrc file located on /etc/tor/torrc . So we apply the following command :
leafpad /etc/tor/torrc
The screenshot is following:
Then we need to find these two lines (showing in the above picture) and remove # from both lines and save the file. After doing this will look like the following :
Then we restart Tor by using the following command:
service tor restart
Now we create a web page on our desktop called index.html or index.php. We do it by using
cd Desktop && touch index.html
Then we edit the web page file and code a simple website for a demo. We open the html/php file in leafpad
leafpad index.html
And then we write a simple html code like following:
Then we save and close this file. This file is in our Desktop, so we start a php based localhost server in our Desktop using the following command:
php -S 127.0.0.1:80
Now we check our hosted localhost website, by navigating 127.0.0.1 from our browser.
Then we leave this terminal window as it is. Then we open another terminal and type tor in the command line.
tor
Let wait a bit and let it configure to 100%.
The screenshot is following:
All set our dark web is hosted. Hey wait, where is the .onion link?
.onion link is generated randomly. To see our hosted demon dark website’s .onion we open another terminal window (3rd time, because we can’t close or use those terminals, otherwise the connection will be lost.) and type the following command to see our Dark Web address
cat /var/lib/tor/hidden_service/hostname
The screenshot is following:
Now we can access this .onion website with Tor browser from anywhere.
This is a demo website for education purpose, but we can host any kind of website. Please do not abuse this to host illegal websites. That will be a crime and we are not responsible for that.
Feel free to leave a comment below or reach me on Instagram @iamshubhamkumar__.