Password Cracking Tutorial, Tips & Techniques

This article covers password cracking and hacking topics, including dictionary-based attacks, brute-force attacks, and rainbow table attacks. It also demonstrates various password cracking techniques by using Hydra in the Kali Linux.

Within modern technology, passwords are protected in two ways: hashing and encryption.

Encryption is converting plain text into unreadable form (ciphertext). And ciphertext decryption is simple to do within this technique.

However, Hashing uses unique random numbers to encrypt the plain text into unreadable form. The best part of hashing is, it’s irreversible. An attacker can obtain the user password hash but cannot decrypt it into plain text. Although many techniques are available these days to “de-hash the” password, that doesn’t effectively work all the time.

Attackers use various techniques to hack the password, like social engineering, network sniffing, keyloggers, brute-force, etc. The attacks this article discusses are dictionary attack, brute-force attack, hybrid attack, and rainbow table attack.

Dictionary-Based Password Cracking

A dictionary attack is a method of guessing credentials utilizing commonly used phrases. People always like to have a simple password that they could easily remember. And this is the problem that people use as a password to the words they use in their daily lives.

For example, if a person is fond of cars and mentions cars everywhere on his social media account. And for the sake of simple passwords, he always creates passwords of his favourite things, such as cars. So, it will not be difficult for the attacker to hack the password of that person.

Attackers use a wordlist in this attack containing everyday words a victim can uses. Even if the attack is for any specific victim, attackers create their new wordlist as per the victim’s likes and dislikes, which the attacker gathers from the information gathering process.

Brute Force Attack

A brute force attack guesses all potential credential combinations till the right one pop-up. The complexity of the password necessitates extra guesswork for the attacker to decipher it. For instance, brute-forcing an eight-character long password takes forever than a four-character long password.

Several hackers use tools to brute-force user authentication. Botnets are now involved in nearly all brute force attacks. They methodically target sites, testing passwords wordlists and notifying the hacker whenever they obtain login credentials.

Although, this attack takes longer to break a password depending on a parameter’s difficulty and password length.

Hybrid Brute Force Attack

A hybrid brute force attack is a combination of brute force and dictionary attacks. To try a hack, attackers use extrinsic methods with their rational predictions.

For instance, users frequently add a set of digits at the end of their credentials, like graduation year or birthday year (i.e., smith1992 or john2013). So, hackers utilize a dictionary attack to generate the phrases, subsequently perform a brute force attack on the last digits.

Rather than checking each password, the hybrid attack utilizes a collection of credentials and creates and tries minor modifications of the phrases throughout the list, like altering letters or putting digits.

Rainbow Table Attacks

Rainbow table attacks are distinct in that they do not attack passwords but rather the passwords’ hash function. A rainbow table is a pre-computed table that caches the result of hash algorithms typically used to decipher credential hashes.

This attack is also regarded as offline password cracking. Since the hacker doesn’t have to interface with the victim login page or system, once the attacker gains access to the password hashes, the hacker goes offline and verify the hashes with his pre-computed hash table.

For instance, a hash value creates whenever a person inputs a credential to any login page or system. A user validates if the entered password hash value equals the saved hash value. Rainbow table attacks take advantage of this procedure.

Practical Password Cracking Demonstration

For the demonstration, I am using the hydra tool, which comes pre-installed in Kali Linux, to crack the password of my local machine.

Fire up Kali Linux – > Open terminal -> Run Nmap command with the victim IP address (Metasploitable VBox) to check the open ports.

Practical Password Cracking Demonstration

For the attack, you can use your own created username and password list, or you can go for the “rockyou.txt” wordlist available in Kali Linux. For the demo, I am using the “username.txt” file for victim usernames and the “password.txt” file for random passwords.

Fire up the GUI Hydra -> Put the single target as IP address of the victim machine -> Select the targeted port (in our case, it’s SSH 22) -> Check the verbose and show attempts box.

Practical Password Cracking Demonstration

Go to the Passwords tab -> Select the username and password file.

Go to Tuning tab -> Change the number of tasks to 4 and start the attack.

Practical Password Cracking Demonstration 4

Attack completes once Hydra found the password.

Wrap Up

  • Password cracking is the process of retrieving credentials that have been saved or broadcast.
  • Dictionary attacks, brute force, and rainbow tables attack are all popular password attack strategies.
  • Hydra tool is one of the prevalent tools to crack passwords.
  • The size, intricacy, and volatility of a password combination influence its effectiveness.
Sana Qazi
Sana Qazi is a technical writer specialized in Information Security. She enjoys writing about technology and reading multiple genres like suspense. When not writing, she can be found traveling, dinning out, watching series etc. She manages her medium blog as well.

Most Popular

What Makes ICS/OT Infrastructure Vulnerable?

Infrastructure security for operational technologies (OT) and industrial control systems (ICS) varies from IT security in several ways, with the inverse confidentiality, integrity, and...

Everything You Must Know About IT/OT Convergence

What is an Operational Technology (OT)? Operational technology (OT) is a technology that primarily monitors and controls physical operations. It can automate and control machines,...

Understand the OT Security and Its Importance

This article discusses OT security and why it is essential for protecting industrial systems from cyberattacks. We will also discuss common control objectives that can...

What is Deepfake, and how does it Affect Cybersecurity?

Producing deepfake is easy. It is hard to detect. They operate with a description of reality rather than reality itself (e.g., a video). Any...