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

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

主站蜘蛛池模板: 古田县| 彭州市| 汉寿县| 郎溪县| 黄大仙区| 清涧县| 启东市| 平乐县| 景洪市| 门头沟区| 淳安县| 吉木萨尔县| 鲜城| 凤翔县| 津市市| 广州市| 工布江达县| 鹤岗市| 界首市| 沙洋县| 小金县| 洛隆县| 桃园县| 都兰县| 涿鹿县| 报价| 晋城| 永福县| 依安县| 永吉县| 托克托县| 永康市| 昌黎县| 蒲城县| 平远县| 绥化市| 南郑县| 乡城县| 界首市| 宁南县| 曲沃县|