Enumeration & Discovery β€” From Kali

Quick Reference Technique Tool Requires Creds AD port scan nmap No DNS SRV enumeration dig / nslookup No LDAP anonymous bind ldapsearch No Full LDAP dump ldapdomaindump No / Yes SMB/User enumeration enum4linux-ng No / Yes AD enumeration swiss-knife NetExec (nxc) No / Yes Attack path mapping bloodhound-python Yes Kerberos user enum Kerbrute No User / SID enumeration lookupsid.py, GetADUsers.py No / Yes RPC enumeration rpcclient No / Yes LDAP attribute queries windapsearch Yes Share content discovery nxc spider_plus Yes adminCount / SPN / UAC flags ldapsearch Yes Environment Setup Before attacking an AD environment from Kali, configure your local resolver and Kerberos client so tools resolve domain names correctly. ...

11 min Β· MrAzoth

Kerberos Attacks β€” From Kali

Quick Reference Attack Tool Hashcat Mode Requirement AS-REP Roasting GetNPUsers.py / kerbrute -m 18200 DONT_REQ_PREAUTH flag set Kerberoasting GetUserSPNs.py -m 13100 (RC4) / -m 19700 (AES) Valid domain user + SPN exists Pass-the-Ticket getTGT.py + impacket N/A Valid credentials or hash Overpass-the-Hash getTGT.py -aesKey N/A AES256 key for user Kerbrute userenum kerbrute N/A Network access to DC on port 88 Ticket conversion ticket_converter.py N/A Existing .kirbi or .ccache AS-REP Roasting AS-REP Roasting targets accounts that have Kerberos pre-authentication disabled (DONT_REQ_PREAUTH flag set in userAccountControl). The KDC returns an AS-REP containing a portion encrypted with the user’s hash β€” no prior authentication required, making it requestable by anyone. ...

11 min Β· MrAzoth

Credential Attacks & Relay β€” From Kali

Quick Reference Technique Tool Prerequisite Output LLMNR/NBT-NS Poisoning Responder Network access, no SMB signing required NTLMv1/v2 hashes SMB Relay ntlmrelayx.py SMB signing disabled on target SAM dump / shell LDAP Relay ntlmrelayx.py LDAP on DC accessible Computer accounts / RBCD IPv6 Poisoning mitm6 + ntlmrelayx IPv6 not disabled on network LDAP relay β†’ DA Coercion + Relay PetitPotam / printerbug Auth path to coerced machine NTLM relay or TGT DCSync secretsdump.py Domain Admin or replication rights All NTLM hashes + AES keys LSASS Dump lsassy Local admin on target Plaintext / hashes GPP Passwords nxc -M gpp_password Domain user Cleartext credential Password Spraying nxc smb/ldap Valid username list Valid credentials LLMNR/NBT-NS Poisoning with Responder LLMNR (Link-Local Multicast Name Resolution) and NBT-NS (NetBIOS Name Service) are fallback name resolution protocols used by Windows when DNS fails. When a host cannot resolve a name, it broadcasts an LLMNR/NBT-NS query to the local subnet. Responder answers these queries with the attacker’s IP, forcing the victim to authenticate β€” capturing NTLMv1 or NTLMv2 hashes. ...

17 min Β· MrAzoth

Delegation Attacks β€” From Kali

Quick Reference Attack Tool Required Privileges Unconstrained Delegation Abuse impacket, Responder, coercion tools Compromise of delegated host Constrained Delegation (KCD) getST.py Control of account with KCD configured RBCD Setup + Abuse addcomputer.py, rbcd.py, getST.py GenericWrite or WriteDACL on target computer Shadow Credentials pywhisker.py, getnthash.py WriteProperty on msDS-KeyCredentialLink Coerce Authentication (PetitPotam) PetitPotam.py Valid domain credentials Coerce Authentication (PrinterBug) printerbug.py Valid domain credentials Delegation Overview Kerberos delegation allows a service to impersonate users when accessing other services on their behalf. There are three types, each with different risk profiles and abuse paths. ...

11 min Β· MrAzoth

Lateral Movement β€” From Kali

Quick Reference Technique Tool Auth Type Notes Pass-the-Hash psexec.py, wmiexec.py, nxc NTLM hash No plaintext needed Pass-the-Ticket psexec.py -k, wmiexec.py -k Kerberos ccache Set KRB5CCNAME first Evil-WinRM evil-winrm Password / Hash / Ticket WinRM port 5985/5986 WMI Execution wmiexec.py Password / Hash Output shown, less noisy DCOM Execution dcomexec.py Password / Hash Multiple COM objects RDP PtH xfreerdp /pth NTLM hash Requires Restricted Admin mode SMB Exec psexec.py, smbexec.py Password / Hash Different noise levels Proxychains proxychains + any tool Any Internal network pivoting Pass-the-Hash (PtH) from Linux Concept NTLM authentication does not require knowledge of the plaintext password β€” it only requires the NT hash. The NT hash is the MD4 hash of the Unicode password, and it is used directly in the NTLM challenge-response exchange. A valid NT hash is sufficient to authenticate against any service using NTLM. ...

13 min Β· MrAzoth

Domain & Forest Trusts β€” From Kali

Quick Reference Attack Requirement Tool Cross-domain Kerberoasting Valid low-priv creds in child domain GetUserSPNs.py Cross-domain AS-REP Roasting Valid low-priv creds in child domain GetNPUsers.py SID History Injection (parent-child) Domain Admin in child domain, child krbtgt hash ticketer.py Cross-domain DCSync Replication rights or DA in target domain secretsdump.py One-way inbound trust abuse DA in trusted domain, inter-realm key ticketer.py (silver), getST.py One-way outbound trust abuse DA in trusting domain, TDO GUID secretsdump.py, getTGT.py Cross-forest Kerberoasting Bidirectional forest trust, valid creds GetUserSPNs.py Golden ticket cross-domain Child krbtgt hash + parent domain SID ticketer.py BloodHound trust mapping Valid creds, network access to DC bloodhound-python Trust Concepts Trust Types A Trust is a relationship between two domains that allows security principals in one domain to authenticate to resources in another. Trust information is stored in Active Directory as Trusted Domain Objects (TDOs) under CN=System. ...

14 min Β· MrAzoth

Persistence β€” From Kali

Quick Reference Technique Requirement Detection Risk DCSync Domain Admin or explicit replication rights High β€” replication request from non-DC Golden Ticket krbtgt NTLM + AES256 hash, domain SID Medium β€” no TGT event (4768) on DC Silver Ticket Service account NTLM hash, domain SID, SPN Low β€” no DC contact at all Diamond Ticket krbtgt AES256, valid user credentials Low β€” based on a real TGT NTDS.dit VSS Shell on DC, local admin High β€” shadow copy creation event DPAPI Backup Key Domain Admin, DC access Medium β€” LDAP/RPC request to DC ACL-based (DCSync rights) WriteDACL or GenericAll on domain root Low β€” ACL change may not alert Machine Account creation Any user with MachineAccountQuota > 0 Low Pass-the-Hash persistence Local admin hash, no domain rights needed Low β€” appears as normal auth DCSync What It Is DCSync abuses the Directory Replication Service (DRS) protocol. Domain controllers use DRS to replicate directory data between themselves. The GetNCChanges function is the core RPC call used. Any account with the following rights on the domain root object can invoke this: ...

14 min Β· MrAzoth

AD CS Attacks β€” From Kali

Quick Reference Table ESC Vulnerability Tool Requirement ESC1 SAN in template certipy req Enroll permission on template ESC2 Any Purpose EKU certipy req Enroll permission ESC3 Enrollment Agent certipy req Agent cert + second request ESC4 Template write access certipy template GenericWrite on template ESC6 EDITF_ATTRIBUTESUBJECTALTNAME2 on CA certipy req Any enroll permission ESC7 CA Manage Officer certipy ca Manage CA / Manage Certificates ESC8 NTLM relay to /certsrv/ certipy relay PetitPotam/coercion ESC9 No szOID_NTDS_CA_SECURITY_EXT certipy UPN mapping abuse ESC11 Relay to ICPR certipy relay -ca-pfx NTLM relay AD CS Fundamentals Active Directory Certificate Services (AD CS) is Microsoft’s PKI (Public Key Infrastructure) implementation. It issues X.509 certificates used for authentication, encryption, and signing within a Windows domain. ...

20 min Β· MrAzoth

Azure AD Hybrid Attacks β€” From Kali

Quick Reference Attack Requirement Impact MSOL Account DCSync Local admin on AAD Connect server Full domain + cloud compromise AZUREADSSOACC$ Abuse DCSync rights or DA Forge Azure AD tokens PHS Hash Extraction MSOL DCSync rights Cloud account takeover PTA Abuse On-prem DC compromise Transparent cloud auth bypass Golden SAML ADFS signing cert theft Persistent cloud access Azure AD Connect Abuse (MSOL Account) Azure AD Connect synchronizes on-premises Active Directory to Azure AD. During setup, it creates a service account named MSOL_xxxxxxxx in the on-premises domain. This account is granted DS-Replication-Get-Changes and DS-Replication-Get-Changes-All on the domain root β€” the exact permissions required for DCSync. Its password is stored encrypted in a SQL LocalDB instance on the AAD Connect server. ...

7 min Β· MrAzoth

Advanced Techniques β€” From Kali

Quick Reference Technique Tool Requirement Impact WebDAV Coercion β†’ LDAP relay ntlmrelayx + PetitPotam WebClient running on target RBCD, shadow creds, DA gMSA password read gMSADumper / nxc Authorized principal Lateral movement Zerologon cve-2020-1472 Network access to DC (pre-patch) Instant DA noPac (CVE-2021-42278/42287) noPac.py Domain user DA via KDC spoofing LAPS read nxc / ldapsearch Read perm on ms-Mcs-AdmPwd Local admin on target LSASS dump (offline parse) pypykatz LSASS dump file Credential extraction KrbRelayUp pre-check nxc ldap Network access Identify LDAP signing state WebDAV Coercion β€” Bypass SMB Signing for NTLM Relay Why WebDAV Coercion Works Standard NTLM relay from SMB to LDAP is blocked when SMB signing is required (which is enforced on DCs by default). WebDAV coercion forces the target to authenticate over HTTP instead of SMB. HTTP authentication does not enforce signing, so it can be relayed to LDAP even when the target has SMB signing enabled. ...

11 min Β· MrAzoth