官术网_书友最值得收藏!

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...

  1. 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
    
  2. 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).

  3. 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
    
  4. 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

主站蜘蛛池模板: 永新县| 丰镇市| 惠东县| 雅安市| 沾化县| 蓝山县| 新乡县| 承德县| 云安县| 西乌珠穆沁旗| 广饶县| 昌吉市| 揭西县| 永年县| 鄯善县| 平和县| 北京市| 广安市| 庆城县| 镇江市| 山丹县| 龙陵县| 屏边| 四平市| 怀集县| 北流市| 青阳县| 会理县| 双江| 肃南| 伊金霍洛旗| 柳江县| 福安市| 桂阳县| 桑植县| 昂仁县| 剑川县| 墨竹工卡县| 金平| 铜梁县| 常熟市|