<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
---
name: analyzing-password-policies
description: >-
  Analyze organizational password policies to identify weaknesses, compliance gaps, and opportunities for targeted cracking strategies.
domain: cybersecurity
subdomain: password-cracking
tags:
  - password-policy
  - compliance
  - nist-800-63b
  - active-directory
  - audit
version: "1.0"
author: defconxt
license: AGPL-3.0
metadata:
  mitre-attack: ["T1201"]
  cwe: ["CWE-521"]
  tools: ["crackmapexec", "ldapsearch", "PowerView", "ADRecon"]
---

# Analyzing Password Policies

## Overview

Analyze organizational password policies to identify weaknesses, compliance gaps, and opportunities for targeted cracking strategies.

## Prerequisites

| Tool / Requirement | Details |
|---|---|
| `crackmapexec` | Security tooling |
| `ldapsearch` | Security tooling |
| `PowerView` | Security tooling |
| `ADRecon` | Security tooling |
| Isolated lab environment for testing | Environment requirement |
| Authorization and signed Rules of Engagement (RoE) | Environment requirement |
| Relevant target samples or systems acquired through authorized channels | Environment requirement |

## Quick Reference

```bash
# Query AD password policy
crackmapexec smb dc01.corp.local -u user -p pass --pass-pol

# LDAP policy query
ldapsearch -x -H ldap://dc01 -D "user@corp.local" -w pass \
    -b "dc=corp,dc=local" "(objectClass=domain)" \
    pwdHistoryLength minPwdLength maxPwdAge lockoutThreshold

# Check NIST 800-63B compliance
# Minimum 8 chars, no complexity requirements, check against breached passwords
# Screen against common passwords list
```

## Workflow

### Step 1: Preparation and Reconnaissance

```bash
# Identify target and gather initial intelligence
file ./target_sample
crackmapexec --version 2>/dev/null || echo "Install crackmapexec"

# Set up working directory
mkdir -p /tmp/analyzing-password-policies/{output,logs,artifacts}
```

### Step 2: Primary Analysis

```bash
# Execute primary analysis with crackmapexec
# Refer to Quick Reference above for detailed commands
echo "[*] Running Analyzing Password Policies with crackmapexec..."

# Log all operations
script -q /tmp/analyzing-password-policies/logs/session.log
```

### Step 3: Deep Investigation

```bash
# Apply ldapsearch for secondary analysis
echo "[*] Deep investigation with ldapsearch..."

# Cross-reference findings
diff /tmp/analyzing-password-policies/output/primary.json /tmp/analyzing-password-policies/output/secondary.json
```

### Step 4: Documentation and Reporting

```bash
# Generate structured findings report
cat <<'EOF' > /tmp/analyzing-password-policies/output/report.json
{
  "technique": "analyzing-password-policies",
  "domain": "password-cracking",
  "tools_used": ["crackmapexec", "ldapsearch"],
  "findings": [],
  "recommendations": []
}
EOF
```

## Verification

- [ ] Environment and tools verified and operational
- [ ] Target samples acquired through authorized channels
- [ ] Primary analysis completed with findings documented
- [ ] Secondary validation performed with independent tooling
- [ ] All artifacts preserved in structured output directory
- [ ] Detection opportunities documented for blue team

## References

- [MITRE ATT&CK T1201](https://attack.mitre.org/techniques/T1201) — Related technique
- [crackmapexec Documentation](https://crackmapexec.org/) — Primary tooling
- [ldapsearch Reference](https://ldapsearch.org/) — Secondary tooling
