Module 6.5: Brute force attacks: Hydra

Brute force dictionary attacks: hashing, hashcat and hydra

Install hydra and hashcat: home brew example

brew install hydra hashcat

On linux machines:

sudo apt install hydra hashcat -y
Hashcat: 
Hydra: 

Hashing:

Example:use the online utility to create a SHA512 hash for Toomanysecrets77:

da355c585ad36b98017d11ed3fd05199acbb2855345dc463f61fc42fdf6656c9

is a SHA256 hash of Toomanysecrets77 (a secret password)

try this out, make sure you get the same result

Local password attack demo: hashcat

create your own word list of passwords:

sudo nano wordlist.txt

insert these, one on each line: 

papaya77 
Toomanysecrets77 
hashcat
pal82

ctrl-o, save and then ctrl-x

next: create another file on your machine:

sudo nano hashes.txt

Generate SHA512 hashes for each password and copy the hashes into this file, ctrl-o, save, ctrl-x

Run hashcat to decode the hashes:

hashcat -m 1400 -a 0 hashes.txt wordlist.txt

or this

sudo hashcat -m 1400 -a 0 hashes.txt wordlist.txt --outfile=cracked.txt --outfile-format=2

show results:

sudo hashcat --show -m 1400 hashes.txt

what does this do?

  1. opens hashcat
  2. decodes format 1400 (SHA512 encryption) (mode)
  3. attack mode, dictionary attack (-a)
  4. use these two files

what do you see?

try again using this password file:

Download common-passwords.txt.zip (text/plain, 2.2 KB)

Download crackedpasswords.txt (text/plain, 82 B)

----------------------------
Try these:
https://hashcat.net/wiki/doku.php?id=example_hashes
You will have to change the 1800 encryption code to another number
what is the hidden password?

Remote dictionary attack: using hydra

sudo hydra -l "pi" -P  wordlist.txt \

10.14.88.83 ssh

enter the password for YOUR machine to connect by ssh

This is an external attack...

1 of 1 target completed, 0 valid password found

What did you find?

Why does it fail?

Salting: adding random characters to confuse hashcat

ssh into the machine at 10.14.88.83  (pi/papaya77)

cd  /etc
cat shadow

find the hashed entry for the user pi

$y$j9T$bl0cC/JggW3QeHa3UyiNc0$23oSBAPMIvOng71RwU4qZGLChAcwWCjJYm/jAaHavOB

This is a salted hash, meaning random characters have been inserted between the hash to make it more secure.

Massive wordlists:

Download this massive list of passwords:

https://weakpass.com/wordlists/rockyou.txt

expand the file:

sudo gzip -d rockyou.txt.gz

Look at the file:

cat rockyou.txt

crazy!



Migrated from Apple Server Wiki. Original page ID: 64m6w3W5k7


Revision #3
Created 2026-09-29 16:00:01 UTC by Admin
Updated 2026-09-29 16:49:25 UTC by Admin