Case C1C0B4 · Identity & AD · L4 Advanced
A Key Appeared on SQL01$
Live alertAt 02:47 DC01 logs event 5136: msDS-KeyCredentialLink on computer SQL01$ was modified by helpdesk.svc. Two minutes later, event 4768 shows a TGT for SQL01$ with PKINIT pre-auth (type 16) from 10.20.4.77.
- 01 What happened?
- 02 What is the impact?
- 03 What do you do?
What a strong answer covers
Try it out loud first. Then check yourself:
- Shadow Credentials: writing a key to msDS-KeyCredentialLink lets the writer authenticate as that account via PKINIT
- With the TGT the attacker can recover the NT hash (UnPAC-the-hash) and use S4U2self to get admin tickets to SQL01
- Root cause: helpdesk.svc has write rights over SQL01$; assume helpdesk.svc and host 10.20.4.77 are compromised
- Respond: remove the rogue key, reset the SQL01$ machine password, isolate 10.20.4.77, disable and rotate helpdesk.svc
- Detect: needs a SACL on the attribute; Windows Hello for Business writes it legitimately, so baseline normal writers
If the interviewer pushes back
- What other objects can helpdesk.svc write to, and how would you find out before the attacker uses them?