Online Credential Attacks
Online attacks = touching the wire. You send packets to the target. Risks: account lockouts, IDS/IPS detection, VPN latency. Tools: nxc, hydra, kerbrute, enum4linux-ng.
Preparation (Wordlists & Users)
Default Creds
- Default creds: https://github.com/ihebski/DefaultCreds-cheat-sheet
- Default creds:
/usr/share/wordlists/seclists/Passwords/Default-Credentials/default-passwords.txt - Routers: https://www.softwaretestinghelp.com/default-router-username-and-password-list/
- Default creds:
- Usernames:
- Quick Usernames:
/usr/share/wordlists/seclists/Usernames/top-usernames-shortlist.txt - Comprehensive Usernames:
/usr/share/wordlists/seclists/Usernames/xato-net-10-million-usernames.txt
- Quick Usernames:
- Passwords:
- Classic (old):
/usr/share/wordlists/rockyou.txt - Updated (
<YEAR>):/usr/share/wordlists/seclists/Passwords/<YEAR>-200_most_used_passwords.txt
- Classic (old):
Username Generation
Generate usernames to spray (input for online attacks). Use before spraying.
Wordlist customization (offline)
Wordlist building and mutation (cewl, hashcat rules, CUPP): same wordlists can feed online spraying or offline cracking.
Enumeration
User Enum
- No creds: Try anonymous sessions
- Later: with credentials
Password Policy
CRITICAL: Check lockout threshold before spraying.
- LDAP anonymous bind: https://docs.microsoft.com/en-us/troubleshoot/windows-server/identity/anonymous-ldap-operations-active-directory-disabled
NOTE: If asking for the policy does not fit the assessment or the client does not want to provide it, run one, max two, password spraying attempts (regardless of internal/external) and wait over an hour between attempts if you do two.
Default Domain Policy
| Policy | Default Value |
|---|---|
| Enforce password history | 24 days |
| Maximum password age | 42 days |
| Minimum password age | 1 day |
| Minimum password length | 7 |
| Password must meet complexity requirements | Enabled |
| Store passwords using reversible encryption | Disabled |
| Account lockout duration | Not set |
| Account lockout threshold | 0 |
| Reset account lockout counter after | Not set |
Filtering Passwords That Meet Policy
If using a pre-compiled or downloaded list, enforce the known password policy with grep:
Attack Execution
- Brute-Force: 1 user, many passwords (alternates passwords) — risk of account lockout.
- Spraying: many users, 1 password (alternates users) — no lockout risk; “hail Mary” to find any way in.
Best practice: Obtain account lockout policy beforehand (enum or customer). If unknown, wait a few hours between attempts so the lockout counter can reset.
SMB / WinRM Spraying
Kerberos Spraying
No auth logs generated (Kerberos Pre-Auth).
Windows (DomainPasswordSpray)
- https://github.com/dafthack/DomainPasswordSpray
- Event Logs: 4625, 4771
By default the script checks account logon policy and pulls users from the current domain (minus disabled). Use -UserList and -Domain to override.
Brute Force (Hydra)
Last resort for web forms, SSH, etc. (higher lockout risk than spraying.)