It is important to stress that we have not written this piece of software (see LICENSE)
It is important to stress that we have not written this piece of software (see LICENSE)
Eschalot is a Tor hidden service name generator, it allows one to produce a (partially) customized vanity .onion address using a brute-force method.
See https://torproject.org for more information about the Tor network and https://torproject.org/docs/hidden-services for the hidden services documentation.
Why eschalot? Well, eschalot is a different name for shallot and it is a fork of an older .onion names generator called shallot.
See https://github.com/katmagic/Shallot for information about the shallot and also see the History section at the end of this document.
Eschalot is distributed in source form under BSD license. It should compile on any Unix or Linux system, but might need some minor modifications.
It was developed and most extensively tested on OpenBSD, but was also tested to compile and run on DragonFlyBSD, FreeBSD, CentOS Linux, and couple other mainstream Linux distributions whose names I do not recall at the moment. Various combinations of big/little endian platforms, 32bit/64bit platforms, and gcc/pcc/llvm/clang static analizer were tested. Many bugs were uncovered, some were fixed, some are still there - see TODO list if interested.
Eschalot requires OpenSSL-0.9.7-or-later libraries with source headers.
You will also need a make utility (either BSD or GNU make will do) and a C compiler (gcc, pcc, or llvm/clang).
Download the latest version of eschalot (currently eschalot-1.2.0), open a terminal emulator, such as xterm, and change directory to where you saved the eschalot-1.2.0.tar.gz archive (for examle /home/username/Download);
$ cd Download
$ tar xzvf eschalot-1.2.0.tar.gz
$ cd eschalot-1.2.0
$ makeTo use a different (other than your system default) C compiler (such as pcc):
$ make clean
$ env CC=pcc makeIf compilation fails, see some hints below under "Compilation Troubleshooting" close to the end of this document.
If make succeeds, you might want to run a simple functionality test/demo with
$ make testThis will use the included worgen utility to create a test wordlist out of the three small wordlists included with the distribution, will save the list to 'wordlist.txt', and will launch eschalot running with 4 threads to start looking for the onion names with the prefixes in the wordlist.txt file. The results will be redirected to the 'results.txt' file. This test needs a fairly fast machine with at least 250Mb of RAM.
To remove the test files execute
$ make cleantestTo remove the compiled binaries execute
$ make cleanTo cleanup everything execute
$ make cleanall$ make test cc -std=c99 -O2 -fPIC -finline-functions -Wall -W -Wunused -pedantic -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wcast-qual -Wextra -o eschalot eschalot.c -lpthread -lssl -lcrypto cc -std=c99 -O2 -fPIC -finline-functions -Wall -W -Wunused -pedantic -Wpointer-arith -Wreturn-type -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wcast-qual -Wextra -o worgen worgen.c
./worgen 8-16 top150adjectives.txt 3-16 top400nouns.txt 3-16 top1000.txt 3-16 > wordlist.txt Will be producing 8-16 character long word combinations. Reading 3-16 characters words from top150adjectives.txt. Reading 3-16 characters words from top400nouns.txt. Reading 3-16 characters words from top1000.txt. Loading words from top150adjectives.txt. Loaded 150 words from top150adjectives.txt. Loading words from top400nouns.txt. Loaded 400 words from top400nouns.txt. Loading words from top1000.txt. Loaded 974 words from top1000.txt. Working. 100% complete, 31122412 words (approximately 377Mb) produced. Final count: 31366539 word combinations.
./eschalot -vct4 -f wordlist.txt > results.txt Verbose, continuous, no digits, 4 threads, prefixes 8-16 characters long. Reading words from wordlist.txt, please wait... Loaded 31366539 words. Sorting the word hashes and removing duplicates. Final word count: 31363570. Thread #1 started. Thread #2 started. Thread #3 started. Thread #4 started. Running, collecting performance data... Found a key for acidfall (8) - acidfalleyt3kkva.onion Total hashes: 131241356, running time: 10 seconds, hashes per second: 13124135 Found a key for redglass (8) - redglass6i2pxool.onion Found a key for loudwalk (8) - loudwalk72kvhr4n.onion Found a key for illarteye (9) - illarteyedjxf3pj.onion Total hashes: 394606458, running time: 30 seconds, hashes per second: 13153548 Found a key for cutcolor (8) - cutcolorxqxz7ck4.onion Found a key for safefold (8) - safefold7hmcigr7.onion Found a key for tallidea (8) - tallideac5zyn3f7.onion Found a key for wetactago (9) - wetactagot7b42kx.onion Found a key for pooryear (8) - pooryearxutsizhe.onion ^C*** Signal SIGINT in eschalot-1.2.0 (test)
Type $ ./eschalot and $ ./worgen
without any options to get a quick usage information.
To search using 4 threads (if your CPU has 4 cores), in a verbose mode, continuing to search after an .onion address is found, looking for a single prefix "test":
$ ./eschalot -t4 -v -c -p testor simply
$ ./eschalot -vct4 -p testTo search using a regular expression looking for names starting with "test" or ending with "exam":
$ ./eschalot -vct4 -r "^test|exam$"To search for a single prefix "hello" using one thread, redirecting the output to a file named "results.txt", exiting after the first name is found:
$ ./eschalot -p hello >> results.txtTo search for prefixes from 8 to 10 characters long from a file named "wordlist.txt" using 6 threads, in continuous and verbose mode, redirecting the results to a file:
$ ./eschalot -vct6 -l8-10 -f wordlist.txt >> results.txtIf eschalot is running on a different machine than will host the onion service, then it is good to store the results in an encrypted file without hitting the disk in plain text. That is easy to do by piping to gpg:
$ ./eschalot -vct3 -p test | gpg --trust-model always --encrypt \
--recipient 0xfakefakefakefakefakefakefake > results.gpgYou can use the included utility "worgen" to generate large wordlists for eschalot. This utility is far from complete and is not very user friendly, but can be used if needed. To demonstrate by example:
Generate a (relatively small) list of 8 to 12 character long words by mixing 3-10 character words from top1000.txt file, 3-6 character words from top400nouns.txt, and 3-6 character words from top140adjectives.txt, redirect the results to wordlist.txt:
$ ./worgen 8-12 top1000.txt 3-10 top400nouns.txt \
3-6 top150adjectives.txt 3-6 > wordlist.txtGenerate a large (~1.2Gb) file of 10 character long words by mixing twice words from a single file:
$ ./worgen 10-10 nouns.txt 3-10 nouns.txt 3-10 > wordlist.txtAt this point you might want to try running
$ ./eschalot -vct6 -l 10-10 -f wordlist.txt > results.txtto test if your system can load a large file into memory.
The result should look something like this:
$ ./eschalot -vct6 -l 10-10 -f wordlist.txt > results.txt Verbose, continuous, no digits, 6 threads, prefixes 10-10 characters long. Reading words from wordlist.txt, please wait... Loaded 110792061 words. Sorting the word hashes and removing duplicates. Final word count: 110558812. Thread #1 started. Thread #2 started. Thread #3 started. Thread #4 started. Thread #5 started. Thread #6 started. Running, collecting performance data... Found a key for museumazof (10) - museumazofgsihx2.onion Found a key for balzacnick (10) - balzacnickaxtbd4.onion Found a key for methodmoor (10) - methodmooraudcft.onion Found a key for gneissbutt (10) - gneissbuttieicps.onion Found a key for todcorypha (10) - todcoryphadr7zv4.onion Found a key for pleveniyar (10) - pleveniyarpa3hlx.onion Found a key for caputwight (10) - caputwightz46r3n.onion Found a key for mervensalp (10) - mervensalpskbwad.onion Found a key for hallelenid (10) - hallelenidmhln6o.onion Found a key for quotalysis (10) - quotalysisadbc57.onion Found a key for longabarth (10) - longabarthvvdjpw.onion Found a key for vannlozier (10) - vannlozierwqadcv.onion Found a key for uriahcadre (10) - uriahcadreac7ujz.onion Found a key for denmarkjew (10) - denmarkjewfyozqj.onion Found a key for kochiiclod (10) - kochiiclodifftuw.onion Found a key for fondusamba (10) - fondusambaialjro.onion ^C
As you see, it finds a lot of prefixes in just a few seconds, but most of them are useless - that's the downside of using a really large wordlist with either junk or extremely uncommon words combinations in it. Experiment with it! :)
Original note from Shallot:
It is sometimes claimed that private keys generated by Shallot are less secure than those generated by Tor. This is false. Although Shallot generates a keypair with an unusually large public exponent e, it performs all of the sanity checks specified by PKCS #1 v2.1 (directly in sane_key), and then performs all of the sanity checks that Tor does when it generates an RSA keypair (by calling the OpenSSL function RSA_check_key).
Eschalot additions:
Now the public exponent is limited to the range of (0xFFFFFF + 2) to (0xFFFFFFFF) - basically, odd values that take at least, and no more than, 4 bytes.
In addition, unlike shallot, after the RSA key has been finalized, the .onion name is regenerated using the same procedure as used in the official TOR client - this filters out the occasional bogus .onions that shallot generated occasionally (and eschalot does too - this is a bug I have not tracked down yet).
Now, there is nothing stopping the TOR developers from modifying the TOR client to only accept manually imported keys with public exponent equal, lets say, 65537 and nothing else, but that would be silly of them. It would not improve TOR's performance much or serve any other purpose, but to knock offline several well established hidden websites that have been using shallot-generated keys for years. I would not worry about it.
Depends on how fast your CPU is and how many cores you have, but generally speaking it's a bit faster than shallot. Up to twice as fast in some cases, but it depends greatly on how fast the OpenSSL's SHA1 implementation is on the system. Some use hand-optimized assembly, some use C versions.
Wordlist mode is obviously slower than a single fixed prefix mode, but not by much. The difference between searching in a 100 words list and a 100 million words list is negligible due to the binary search and hashed tree data storage. Of course, that is if the whole wordlist fits in RAM completely.
Memory needed is approximately 0.5-0.7 of the size of the wordlist size on disk (yes, eschalot needs less memory than the file takes due to the words getting converted into binary format and stored in a sort of a hashed tree).
1). Does the error message you are getting give you any hints?
2). If the error message complains that make/gmake/gcc/cc cannot be found, you will need to install the make/gmake utility and gcc or some other C compiler. Some of the Linuxes split the gcc package into several smaller ones
Note: most of the mainstream Linuxes do not come with a compiler by default
theese days even if you choose a complete - often 5-10Gb - installation.
(Yeah, that was a shock for me too), but it's fairly easy to install it by
using your operating system's software manager.
3). If it says something like "SHA1*** / RSA*** /BN_*** function not defined" or "missing header", you will need to make sure you not only have the dynamic OpenSSL libraries installed, but also the header files. On Linuxes, they are sometimes distributed in a different package from the main OpenSSL and are called something like "OpenSSL-development" or "OpenSSL-sources-and-h
No open issues yet, or sync has not completed.