Generating a vanity .onion address

on January 26th, 2016 by Hades | No Comments »

Tor Hidden Services are accessed through a web address ending in .onion. Generally speaking these appear to be random strings of letters and numbers, though they’re actually a representation of the public key generated when the operator created their hidden service.

It is possible, however, to attempt to generate a keypair which will allow you to generate a desired vanity URL, though the process is essentially a brute-force of key combinations, so may take some time.

Install Dependencies
First we start by installing a couple of dependencies

Debian

apt-get install libssl-dev
apt-get install build-essential

Centos

yum install openssl-dev
yum groupinstall "Development Tools"

Install Shallot
Shallot is the workhorse that’ll be doing the backbreaking work of generating key combinations, so we need to grab and install it (check the GitHub page for the latest version)

git clone https://github.com/katmagic/Shallot
cd Shallot
./configure && make

Once that’s completed, we should be ready to try and generate our first URL

./shallot test
---------------------------------------------------------------
Found matching domain after 82450 tries: iezfp5oytestk7qs.onion
---------------------------------------------------------------

The output will include an RSA Private Key, make careful note of it and then cd into your hidden service’s directory (in the tutorial I posted earlier, this was /var/lib/tor/my_onion_service/).

cd /var/lib/tor/my_onion_service/
[ -f private_key ] && > private_key
nano private_key

# Insert the private key provided by Shallot, then Save and exit

[ -f hostname ] && rm -f hostname
service tor restart

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.