Principle:0xSteph Pentest ai agents Credential Testing
| Knowledge Sources | |
|---|---|
| Domains | Security, Credential_Testing, Authentication |
| Last Updated | 2026-10-22 12:00 GMT |
Overview
Methodology for testing credential strength through online password attacks, offline hash cracking, and password spraying with lockout awareness.
Description
Credential Testing is the process of validating the strength of authentication mechanisms by attempting to crack hashes, brute-force services, and spray passwords across accounts. It addresses the problem that weak credential policies remain one of the most common attack vectors. The principle distinguishes online attacks (interacting with live services via Hydra, Medusa, CrackMapExec — subject to lockout policies) from offline attacks (cracking captured hashes via hashcat/john — no lockout risk but requires hash acquisition).
A critical constraint is lockout avoidance: online attacks must use low thread counts, wait intervals between attempts, and respect account lockout thresholds. Password spraying (one password across many accounts) is preferred over brute force (many passwords against one account) when lockout policies are unknown.
Usage
Use this principle when:
- Testing password strength against SSH, RDP, SMB, HTTP services
- Cracking captured password hashes (NTLM, krb5tgs, SHA-512)
- Performing password spraying with lockout avoidance
- Generating targeted wordlists from OSINT data (cewl, cupp)
- Validating credentials harvested from other phases
Theoretical Basis
Credential testing models the authentication attack surface:
For offline cracking, the lockout term is 1 (no lockout risk):
Failed to parse (syntax error): {\displaystyle \text{Offline\_Success} = P(\text{hash\_cracked} | \text{wordlist}, \text{rules}, \text{compute\_time}) }
Pseudo-code Logic:
# Abstract credential testing algorithm (NOT real implementation)
# Online: spray one password across many accounts (avoids per-account lockout)
for password in spray_wordlist: # small, high-probability list
for user in users:
if not would_lockout(user): # respect lockout threshold
if authenticate(user, password):
record_credential(user, password, source="spray")
break
sleep(spray_interval) # wait between rounds
# Offline: crack hashes with rules and masks
for hash in captured_hashes:
result = hashcat(hash, mode=hash_type, wordlist, rules=best64)
if result.cracked:
record_credential(hash.username, result.plaintext, source="crack")
Practical Guide
- Check lockout policy: Before online attacks, determine the account lockout threshold and duration.
- Prefer spraying over brute force: One password across many accounts is safer than many passwords against one.
- Rate limit online attacks: Use low thread counts (-t 1 to 4) and wait intervals (-W 3 to 5).
- Use targeted wordlists: Generate custom wordlists with cewl (from target website) or cupp (from OSINT).
- Offline first when possible: If hashes are available, crack offline (no lockout risk).
- Use rules and masks: Apply hashcat rules (best64, rockyou-30000) for mutation coverage.
- Record valid credentials:*** Persist to findings database with type (cleartext, ntlm, krb5tgs) and source.
- Test credential reuse:*** Check if cracked credentials work on other services (SSH, RDP, SMB).
Related Pages
Implemented By
- Implementation:0xSteph_Pentest_ai_agents_Credential_Tester_Agent
- Implementation:0xSteph_Pentest_ai_agents_AD_Attacker_Agent
- Implementation:0xSteph_Pentest_ai_agents_Findings_CLI