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

Heuristic:0xSteph Pentest ai agents Lockout Avoidance

From Leeroopedia
Knowledge Sources
Domains Credential_Testing, OPSEC, Security_Testing
Last Updated 2026-10-22 12:00 GMT

Overview

Password spraying discipline that prevents account lockouts by enumerating the lockout policy first, using one password per spray round, and waiting the full observation window between rounds.

Description

The Lockout Avoidance heuristic governs how password spraying is conducted during authorized engagements. The core principle is: one lockout during a pentest is a mistake; mass lockouts are engagement-ending. The methodology requires (1) enumerating the password policy (lockout threshold, observation window, reset timer) before any spraying, (2) using exactly one password per spray round across all users, (3) waiting the full observation window between rounds, (4) starting with the most likely passwords (seasonal patterns, company names, common defaults), and (5) monitoring for lockouts after each round. Hydra parallel tasks should be kept low (`-t 1` to `-t 4`) and wait times (`-W`) should be used for services with aggressive lockout policies.

Usage

Use this heuristic when conducting any online password attack — password spraying, credential stuffing, or brute force against authentication services. It is especially critical for Active Directory environments where AD group policy may lock accounts after 3-5 failed attempts. Apply before the first spray attempt and maintain discipline throughout the engagement. The credential-tester agent enforces this as its #1 behavioral rule: "Always determine the lockout policy BEFORE spraying."

The Insight (Rule of Thumb)

  • Action: Enumerate the password policy first, then spray one password per round with waiting periods between rounds.
  • Value:
    • Step 1: Get password policy — `crackmapexec smb {dc} -u {user} -p {pass} --pass-pol`
    • Step 2: Get user list — `crackmapexec smb {dc} -u {user} -p {pass} --users`
    • Step 3: Spray one password — `crackmapexec smb {dc} -u users.txt -p 'Spring2026!' --no-bruteforce --continue-on-success`
    • Hydra timing: `-t 1` to `-t 4` (parallel tasks), `-W 3` to `-W 5` (wait between attempts)
    • Priority passwords: `Spring2026!`, `Winter2025!`, `CompanyName1!`, `Welcome1!`, `Password1!`, `Changeme1!`
  • Trade-off: Slower than unrestricted brute force; in exchange, zero lockout risk and a clean audit trail.
  • Hard rule: Never exceed the lockout threshold. If the threshold is 5, never send more than 4 attempts per account per observation window.

Reasoning

Account lockout is the single most disruptive side effect of credential testing. In production environments, lockouts cause business disruption, generate security alerts, and can terminate an engagement immediately. The mathematical constraint is simple: if the lockout threshold is N and the observation window is W, then you can send at most N-1 attempts per account per W period. The one-password-per-round approach ensures this because every user receives exactly one attempt per round, and the round duration includes the full observation window.

The seasonal password pattern (`Spring2026!`, `Winter2025!`) is effective because password rotation policies often require seasonal changes and users default to predictable patterns. Starting with the highest-probability passwords minimizes the number of rounds needed, which minimizes total time on target and total lockout exposure.

Related Pages

Page Connections

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