Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:0xSteph Pentest ai agents Credential Testing

From Leeroopedia
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:

Success=P(password∈wordlist)×P(no lockout before success)

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

  1. Check lockout policy: Before online attacks, determine the account lockout threshold and duration.
  2. Prefer spraying over brute force: One password across many accounts is safer than many passwords against one.
  3. Rate limit online attacks: Use low thread counts (-t 1 to 4) and wait intervals (-W 3 to 5).
  4. Use targeted wordlists: Generate custom wordlists with cewl (from target website) or cupp (from OSINT).
  5. Offline first when possible: If hashes are available, crack offline (no lockout risk).
  6. Use rules and masks: Apply hashcat rules (best64, rockyou-30000) for mutation coverage.
  7. Record valid credentials:*** Persist to findings database with type (cleartext, ntlm, krb5tgs) and source.
  8. Test credential reuse:*** Check if cracked credentials work on other services (SSH, RDP, SMB).

Related Pages

Implemented By

Uses Heuristics

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment