Thuta Learning
IntermediateSecurityintermediate

Password Security & Hashing

Relax. We'll talk through this in plain words — no textbook voice.

What you'll walk away with

  • Understand Password Security & Hashing well enough that it stops being intimidating
  • Get hands-on running the tools yourself in an authorized lab environment
  • Be able to apply this concept immediately in a real assessment or report

Let's think about it this way for a second

Hashing is a mathematical function that turns a password into a fixed-length, one-way string that can't be reversed — even if the database leaks, an attacker can't work backward from the hash to the original password (as long as a modern algorithm like bcrypt or Argon2 is used). A salt is a random value added to each individual password, so even if two users have the same password, their hash results come out different — this defends against rainbow table attacks. Brute-force attacks (trying every possible combination) and dictionary attacks (trying a list of common passwords) are the two main password-cracking methods — password strength and complexity make both of these harder.

Let's connect it to a real-world scenario

Think about a weak database design (MD5 hashing, no salt) in a database leak scenario — an attacker can crack passwords in just a few minutes using a pre-computed rainbow table (MD5 hash → common password mapping). With bcrypt + salt, cracking becomes computationally expensive instead, because the algorithm is intentionally designed to be slow. Which hashing algorithm a developer chooses has a direct impact on user password security.

Let's look at it together

text
Weak (MD5, no salt):
  password "123456" -> always the same hash
  -> attacker can precompute a lookup table (rainbow table)
  -> cracked instantly

Strong (bcrypt, with salt):
  password "123456" + random salt -> unique hash per user
  -> algorithm is intentionally slow (built-in "work factor")
  -> cracking is computationally expensive even at scale
You should see
You'll be able to explain how hashing, salting, and brute-force attacks relate to one another.

Try it in 5 minutes

Hash the weak password 'password123' with MD5 (no salt) using the `echo -n "password123" | md5sum` command — then reverse-search that hash with an online 'MD5 hash lookup' tool (for educational purposes, using only your own test password).

A quick word of caution

Don't practice cracking or brute-forcing against real-world credentials (your own accounts, a colleague's accounts) — only practice with your own test data (passwords you created yourself).

Easy traps

  • Still using MD5/SHA1 as a password hashing algorithm — these are designed for fast computation, which makes them unsuitable for password hashing (use bcrypt/Argon2 instead)
  • Hardcoding a single salt for the whole application — each user should get a random, unique salt

Now try it yourself

Hash the weak password 'password123' with MD5 (no salt) using the `echo -n "password123" | md5sum` command — then reverse-search that hash with an online 'MD5 hash lookup' tool (for educational purposes, using only your own test password).

You'll know it worked when: You'll be able to explain how hashing, salting, and brute-force attacks relate to one another.

Password Security & Hashing | Thuta Learning