- Kali Linux Web Penetration Testing Cookbook
- Gilberto Nájera Gutiérrez
- 372字
- 2021-07-16 12:53:49
Using John the Ripper to generate a dictionary
John the Ripper is perhaps the favorite password cracker of most penetration testers and hackers in the world. It has lots of features, such as automatically recognizing the most common encryption and hashing algorithms, being able to use dictionaries, and brute force attacks; thus, enabling us to apply rules to dictionary words, to modify them, and to have a richer word list while cracking without the need of storing that list. This last feature is the one that we will use in this recipe to generate an extensive dictionary based on a very simple word list.
Getting ready
We will use the word list generated in the previous recipe, Password profiling with CeWL, to generate a dictionary of possible passwords.
How to do it...
- John has the option of only showing the passwords that he will use to crack a certain password file. Let's try it with our word list:
john --stdout --wordlist=cewl_WackoPicko.txt
- Another feature John has, as mentioned before, lets us apply rules to modify each word in the list in various ways, in order to have a more complete dictionary:
john --stdout --wordlist=cewl_WackoPicko.txt --rules
As you can see in the result, John modified the words by switching cases, adding suffixes and prefixes, and replacing letters with numbers and symbols (leetspeak).
- Now we need to do the same but send the list to a text file instead, so that we can use it later:
john --stdout --wordlist=cewl_WackoPicko.txt --rules > dict_WackoPicko.txt
- Now, we have a 999-word dictionary that will be used later to attempt a password guessing attack over the application's login pages.
How it works...
Although John the Ripper's aim is not to be a dictionary generator, but to efficiently use word lists to crack passwords (and it does it very well); its features allow us to use it to expand existing lists and create a dictionary that is better adapted to the passwords used by modern users.
In this recipe, we used the default ruleset to modify our words. John's rules can be defined in its configuration file, located in Kali Linux in /etc/john/john.conf
.
There's more...
More information about creating and modifying rules for John the Ripper can be found at: http://www.openwall.com/john/doc/RULES.shtml
- Bootstrap Site Blueprints Volume II
- Linux C/C++服務器開發實踐
- Django開發從入門到實踐
- 新編Premiere Pro CC從入門到精通
- 游戲程序設計教程
- 深度學習:算法入門與Keras編程實踐
- Unity 2018 Shaders and Effects Cookbook
- Learning Apache Cassandra
- 細說Python編程:從入門到科學計算
- Visual Basic 6.0程序設計實驗教程
- Building Serverless Web Applications
- R語言實戰(第2版)
- Koa與Node.js開發實戰
- H5匠人手冊:霸屏H5實戰解密
- Unreal Engine Game Development Cookbook