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

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

主站蜘蛛池模板: 衡东县| 濉溪县| 西宁市| 靖西县| 河东区| 新民市| 绥化市| 灵武市| 宝山区| 平阴县| 德化县| 嫩江县| 略阳县| 松溪县| 贡山| 施秉县| 盐亭县| 乐安县| 保定市| 石首市| 大城县| 建始县| 施甸县| 佳木斯市| 松潘县| 滦南县| 晋中市| 南川市| 武胜县| 曲阳县| 邢台市| 永修县| 景德镇市| 全椒县| 文登市| 汕头市| 错那县| 衡山县| 临澧县| 鹿邑县| 栖霞市|