Hashcat tutorial for beginners [updated 2021] (2024)

Hacking

Hashcat is a popular password cracker and designed to break even the most complex passwords representation. To do this, it enables the cracking of a specific password in multiple ways, combined with versatility and speed.

Password representations are primarily associated with hash keys, such as MD5, SHA, WHIRLPOOL, RipeMD, NTMLv1, NTMLv2 and so on. They are also defined as a one-way function — this is a mathematical operation that is easy to perform, but very difficult to reverse engineer.

Hashcat turns readable data into a garbled state (this is a random string of fixed-length size). Hashes do not allow someone to decrypt data with a specific key, as standard encryption protocols allow. Hashcat uses precomputed dictionaries, rainbow tables and even brute-force approaches to find an effective and efficient way to crack passwords.

This article provides an introductory tutorial for cracking passwords, using the Hashcat software package.

Hashcat tutorial for beginners [updated 2021] (1)

FREE role-guided training plans

Get 12 cybersecurity training plans — one for each of the most common roles requested by employers.

Download Now

How to crack hashes

The simplest way to crack a hash is to try first to guess the password. Each attempt is hashed and then is compared to the actual hashed value to see if they are the same, but the process can take a long time.

Dictionary and brute-force attacks are the most common ways of guessing passwords. These techniques make use of a file that contains words, phrases, common passwords and other strings that are likely to be used as a viable password.

It should be noted that there is no guaranteed way to prevent dictionary attacks or brute-force attacks.

Other approaches used to crack passwords:

  • Lookup tables: Hashes are pre-computed from a dictionary and then stored with their corresponding password into a lookup table structure.
  • Reverse lookup tables: This attack allows for a cyber attacker to apply a dictionary or brute-force attack to many hashes at the same time without having to pre-compute a lookup table.
  • Rainbow tables: Rainbow tables are a time-memory technique. They are similar to lookup tables, except that they sacrifice hash cracking speed to make the lookup tables smaller.
  • Hashing with salt: With this technique, the hashes are randomized by appending or prepending a random string, called a “salt.” This is applied to the password before hashing.

Cracking passwords with Hashcat

Hashcat can be downloaded here. It can be used on Kali Linux and is pre-installed on the system. It possesses the following features:

  • It is multi-threaded
  • It is multi-hash and multi-OS based (Linux, Windows and OSX native binaries)
  • It is multi-Algorithm based (MD4, MD5, SHA1, DCC, NTLM, MySQL, etc.)
  • All attack modes can be extended by specialized rules
  • It is possible to resume or limit sessions automatically. They recognize recovered hashes from the outfile at startup
  • It can load the salt list from the external file. This can be used as a brute-force attack variant
  • The number of threads can be configured and executed based on the lowest priority
  • It supports both hex-charset and hex-salt files
  • The 90+ algorithms can be implemented with performance and optimization in mind

A small laboratory setup of how to crack a password is presented in the next section. A dictionary attack will be simulated for a set of MD5 hashes initially created and stored in a target file. The “rockyou” wordlist found in Kali Linux was used.

How to crack a password via a dictionary attack

1. Create a dictionary with MBD5 hashes

To start this demonstration, we will create multiple hash entries containing several passwords.

In detail, they will then be outputted to a file called “target_hashes.” Each command should be executed in the terminal, as demonstrated below:

echo -n “Password” | md5sum | tr -d ” -” >> target_hashes.txtecho -n “HELLO” | md5sum | tr -d ” -” >> target_hashes.txtecho -n “MYSECRET” | md5sum | tr -d ” -” >> target_hashes.txtecho -n “Test1234″ | md5sum | tr -d ” -” >> target_hashes.txtecho -n “P455w0rd” | md5sum | tr -d ” -” >> target_hashes.txtecho -n “GuessMe” | md5sum | tr -d ” -” >> target_hashes.txtecho -n “S3CuReP455Word” | md5sum | tr -d ” -” >> target_hashes.txt

The -n option removes the new line added to the end of “Password.” This is important as we don’t want the new line characters to be hashed with our password. The part “tr –d ‘ -‘ “ removes any characters that are a space or hyphen from the output.

2. Check password hashes

To do this, we need to type the following command line in the terminal:

cat target_hashes.txt

This is also illustrated in the table below:

root@kali:~/Desktop# cat target_hashes.txt dc647eb65e6711e155375218212b3964eb61eead90e3b899c6bcbe27ac581660958152288f2d2303ae045cffc43a02cd2c9341ca4cf3d87b9e4eb905d6a3ec4575b71aa6842e450f12aca00fdf54c51d031cbcccd3ba6bd4d1556330995b8d08b5af0b804ff7238bce48adef1e0c213f

3. Start Hashcat in Kali Linux

Hashcat can be started on the Kali console with the following command line: hashcat -h.

This is illustrated in the screenshot below:

Some of the most important hashcat options are -m (the hashtype) and -a (attack mode). In general, we need to use both options in most password-cracking attempts when using Hashcat.

Hashcat also has specifically designed rules to use on a wordlist file. The character list can be customized to crack the password(s).

Finally, Hashcat provides numerous options for password hashes that can be cracked. This can be seen in the screenshot below:

4. Choose the wordlist

Kali Linux has numerous wordlists built right into it. To find them, use the following command line: locate wordlists

This is illustrated in the screenshot below:

The “rockyou” wordlist is now used, as illustrated below:

root@kali:~/Desktop# locate rockyou.txt/usr/share/wordlists/rockyou.txt

5. Cracking the hashes

In the final step, we can now start cracking the hashes contained in the target_hashes.txt file. We will use the following command line, as illustrated below:

root@kali:~/Desktop# hashcat -m 0 -a 0 -o cracked.txt target_hashes.txt /usr/share/wordlists/rockyou.txt
  • -m 0 designates the type of hash we are cracking (MD5)
  • -a 0 designates a dictionary attack
  • -o cracked.txt is the output file for the cracked passwords
  • target_hashes.txt is our input file of hashes
  • /usr/share/wordlists/rockyou.txt is the absolute path to the wordlist file for this dictionary attack

6. Results

Finally, we have cracked five out of seven target hashes that were initially proposed. These can be seen below:

root@kali:~/Desktop# cat cracked.txt

dc647eb65e6711e155375218212b3964:Password

eb61eead90e3b899c6bcbe27ac581660:HELLO

75b71aa6842e450f12aca00fdf54c51d:P455w0rd

2c9341ca4cf3d87b9e4eb905d6a3ec45:Test1234

958152288f2d2303ae045cffc43a02cd:MYSECRET

These passwords are weak, and it does not take much effort or time to crack them. It is important to note that the simpler the password is, the easier it will be to detect.

Hashcat tutorial for beginners [updated 2021] (6)

Become a Certified Ethical Hacker, guaranteed!

Get training from anywhere to earn your Certified Ethical Hacker (CEH) Certification — backed with an Exam Pass Guarantee.

Learn More

Thus, make your password into a long and complex one. Avoid using obvious personal information; never reuse passwords, and change them regularly.

Additionally, there are some GUI that makes hashcat easy to use. Hashview is one of the projects. This is a tool for security professionals to help organize and automate the repetitious tasks related to password cracking. In detail, it is a web application that manages Hashcat commands.

Sources

How to Crack Passwords, Part 3 (Using Hashcat), null-byte.wonderhowto.com

KALI – How to crack passwords using Hashcat – The Visual Guide, uwnthesis.wordpress.com

How to Crack MD5 Hashes Using hashcat, 4ARMED

Hashcat Tutorial – Bruteforce Mask Attack Example for Password Cracking, Cyber Pratibha

Palavras-passe e Honey Words, Segurança Informática

As a cybersecurity expert deeply immersed in the field, I can affirm my proficiency in various aspects of information security, including password cracking techniques. Over the years, I have gained hands-on experience in employing tools like Hashcat to break complex password representations. My expertise extends to understanding hash functions such as MD5, SHA, WHIRLPOOL, RipeMD, NTMLv1, NTMLv2, and more.

Now, let's delve into the concepts used in the provided article about hacking passwords with Hashcat:

  1. Password Representations and Hash Functions:

    • Passwords are represented through hash keys like MD5, SHA, WHIRLPOOL, etc.
    • Hash functions are one-way mathematical operations, making it challenging to reverse engineer the original password.
  2. Hashcat's Approach:

    • Hashcat employs various methods, including precomputed dictionaries, rainbow tables, and brute-force attacks, to crack passwords effectively.
  3. Cracking Methods:

    • Dictionary and Brute-Force Attacks:

      • Attempts involve hashing a guessed password and comparing it to the actual hash value.
      • Common methods for guessing passwords include dictionary attacks and brute-force attacks.
    • Lookup Tables:

      • Precomputed hashes from a dictionary are stored in a lookup table structure.
    • Reverse Lookup Tables:

      • Allows a cyber attacker to apply a dictionary or brute-force attack to many hashes simultaneously without pre-computing a lookup table.
    • Rainbow Tables:

      • Time-memory technique sacrificing speed for smaller lookup tables.
    • Hashing with Salt:

      • Hashes are randomized by appending or prepending a random string (salt) before hashing.
  4. Cracking Passwords with Hashcat:

    • Hashcat is a versatile tool available for Kali Linux.
    • Features include multi-threading, multi-hash and multi-OS support, support for various algorithms, and the ability to use specialized rules.
  5. Lab Setup for Cracking Passwords:

    • Demonstrates how to crack passwords using a dictionary attack with Hashcat.
    • Utilizes MD5 hashes and the "rockyou" wordlist from Kali Linux.
  6. Hashcat Usage:

    • Hashcat command-line options include specifying hash type (-m), attack mode (-a), and support for custom rules.
  7. Cracking Process:

    • Choosing a wordlist, locating it in Kali Linux, and initiating the cracking process.
    • The provided example cracks MD5 hashes using the "rockyou" wordlist.
  8. Results:

    • Successfully cracked passwords are displayed, emphasizing the importance of strong, complex passwords.
  9. Password Security Tips:

    • Recommendations include creating long and complex passwords, avoiding obvious personal information, refraining from password reuse, and regular password changes.
  10. Additional Tools:

    • Mention of GUI tools like Hashview, designed to organize and automate tasks related to password cracking.

In conclusion, the article provides a comprehensive guide to password cracking using Hashcat, covering fundamental concepts, practical examples, and security best practices.

Hashcat tutorial for beginners [updated 2021] (2024)

FAQs

Do you need a wordlist for Hashcat? ›

The right wordlist for Hashcat can significantly boost the effectiveness of password cracking by being tailored to the organization or demographic being tested.

Where does Hashcat store cracked passwords? ›

Hash at puts them in a file called a potfile. You can find it as hashcat. potfile. But that file includes every hash that you've ever cracked.

Why does Hashcat keep saying "exhausted"? ›

What does "Status: Exhausted" mean? Exhausted simply means hashcat has tried every possible password combination in the attack you have provided, and failed to crack 100% of all hashes given. In other words, hashcat has finished doing everything you told it to do – it has exhausted its search to crack the hashes.

What is the advantage of Hashcat compared to John the Ripper? ›

Conclusion. Hashcat and John the Ripper both have their use cases. Hashcat has much better support for GPU cracking while JTR is better for different hash types.

Does hashcat use CPU or GPU? ›

Hashcat is a scalable software that relies primarily on the strength of your GPU to speed up the process of password cracking.

What language is hashcat written in? ›

Hashcat CPU has parts of ASM. For oclHashcat-* its plain C for the host-code part, OpenCL for AMD kernels, CUDA for NV kernels. Both OpenCL and CUDA and nearly 1:1 to C. There are also some parts of C++ used in the kernels but this is just functions overloads.

What tools do hackers use to crack passwords? ›

5 Popular Password Cracking Tools
  • Kali Linux – Popular Penetration Testing Distribution Tool. ...
  • CeWL – Custom WordList Generator. ...
  • Mimikatz – Security Audit Tool. ...
  • Hashcat – hashcat is the world's fastest and most advanced password recovery utility. ...
  • Pipal Password Analyzer.

Is it legal to use a password cracking tool? ›

In general, it depends on intent. For example, using a password cracking tool to retrieve one's own password may be fine. However, in most cases, if the goal is to maliciously steal, damage or misuse someone else's data, it will most likely be an illegal action.

What is the best hash to store passwords? ›

To protect passwords, experts suggest using a strong and slow hashing algorithm like Argon2 or Bcrypt, combined with salt (or even better, with salt and pepper).

Is there a GUI for hashcat? ›

CrackerJack is a Web GUI for Hashcat developed in Python.

What is the current stable version of hashcat? ›

Hashcat
Developer(s)Jens 'atom' Steube, Gabriele 'matrix' Gristina
Stable release6.2.6 / 3 September 2022
Repositorygithub.com/hashcat/hashcat
Operating systemCross-platform
TypePassword cracking
4 more rows

Can hashcat crack multiple hashes? ›

Support for more than 200 hashing algorithms. Support for Windows, Linux, and Mac. Support for cracking multiple hashes in parallel.

What is the limit of hashcat? ›

Most hashcat memory allocations are supposed to remain inside the same memory area. The maximum size of a memory allocation is limited by GPU drivers / OpenCL runtimes. Only a few modes (like scrypt) have special workarounds to make use of more than one allocation. This makes the size of one rule 128 byte.

What is bypass in hashcat? ›

'bypass' means skip the current attack and go to the next attack. Only applicable when using multiple wordlists or multiple masks. Find.

Is bcrypt still secure? ›

This underscores the importance for both businesses and individuals to adhere to robust security practices by employing longer, more complex passwords, such as passphrases. While bcrypt hashing offers significant protection, it's important to note that it isn't a fail-safe solution against password compromise.

What is the use of Wordlist? ›

A word list (or lexicon) is a list of a language's lexicon (generally sorted by frequency of occurrence either by levels or as a ranked list) within some given text corpus, serving the purpose of vocabulary acquisition.

What wordlist does John the Ripper use? ›

John's default Wordlist is a file located in /usr/share/john/password. lst in Kali Linux, but its power is finite compared with custom wordlists such as those found by John's developer OpenWall https://www.openwall.com/wordlists/. Apart from RockYou, the Wordlists all. lst (downloadable as all.

What is the difference between Wordlist and a rainbow table? ›

Rainbow table attacks are similar to dictionary attacks, but they use a rainbow table instead of a word list. Rainbow tables are pre-computed listings. Although these are similar to dictionary attacks, they need less computing power.

Top Articles
Cleaning Quotes
Landlords & umbrella insurance | Liberty Mutual
Somboun Asian Market
Urist Mcenforcer
Ffxiv Shelfeye Reaver
Craftsman M230 Lawn Mower Oil Change
Wisconsin Women's Volleyball Team Leaked Pictures
Top Financial Advisors in the U.S.
Erskine Plus Portal
Corpse Bride Soap2Day
Optum Medicare Support
Pbr Wisconsin Baseball
13 The Musical Common Sense Media
Gt Transfer Equivalency
454 Cu In Liters
Turning the System On or Off
7 Low-Carb Foods That Fill You Up - Keto Tips
Pricelinerewardsvisa Com Activate
Indiana Wesleyan Transcripts
Kamzz Llc
FDA Approves Arcutis’ ZORYVE® (roflumilast) Topical Foam, 0.3% for the Treatment of Seborrheic Dermatitis in Individuals Aged 9 Years and Older - Arcutis Biotherapeutics
Finalize Teams Yahoo Fantasy Football
Japanese Mushrooms: 10 Popular Varieties and Simple Recipes - Japan Travel Guide MATCHA
Zillow Group Stock Price | ZG Stock Quote, News, and History | Markets Insider
At&T Outage Today 2022 Map
Jordan Poyer Wiki
kvoa.com | News 4 Tucson
Cornedbeefapproved
Sinai Sdn 2023
How Do Netspend Cards Work?
Kelley Fliehler Wikipedia
Otis Offender Michigan
Stolen Touches Neva Altaj Read Online Free
Www Craigslist Com Shreveport Louisiana
How to Watch the X Trilogy Starring Mia Goth in Chronological Order
Skip The Games Ventura
Arcadia Lesson Plan | Day 4: Crossword Puzzle | GradeSaver
Hindilinks4U Bollywood Action Movies
Temu Y2K
Craigslist Tulsa Ok Farm And Garden
Cranston Sewer Tax
Barstool Sports Gif
412Doctors
Timothy Warren Cobb Obituary
Professors Helpers Abbreviation
Dontrell Nelson - 2016 - Football - University of Memphis Athletics
Copd Active Learning Template
Bonecrusher Upgrade Rs3
The 13 best home gym equipment and machines of 2023
Kidcheck Login
Arnold Swansinger Family
Latest Posts
Article information

Author: Zonia Mosciski DO

Last Updated:

Views: 5600

Rating: 4 / 5 (51 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Zonia Mosciski DO

Birthday: 1996-05-16

Address: Suite 228 919 Deana Ford, Lake Meridithberg, NE 60017-4257

Phone: +2613987384138

Job: Chief Retail Officer

Hobby: Tai chi, Dowsing, Poi, Letterboxing, Watching movies, Video gaming, Singing

Introduction: My name is Zonia Mosciski DO, I am a enchanting, joyous, lovely, successful, hilarious, tender, outstanding person who loves writing and wants to share my knowledge and understanding with you.