center-for-threat-informed-defense / adversary_emulation_library

An open library of adversary emulation plans designed to empower organizations to test their defenses based on real-world TTPs.
https://ctid.io/adversary-emulation
Apache License 2.0
1.6k stars 292 forks source link

Problem with APT29 stepFourteen_credDump.ps1 #122

Closed L015H4CK closed 1 year ago

L015H4CK commented 1 year ago

Hello everyone,

I have spent the last two days trying to figure out why the stepFourteen_credDump.ps1 from APT29 does not work for me. The commands are executed as expected but the output of the spawned powershell is never written to the "Win32_AuditCode" WMI Class or an instance of it.

What I know so far:

What I do not know:

Thanks for any tips or ideas in advance.

Additional info:

L015H4CK commented 1 year ago

I found my error.

The path of the Set-WmiInstance command in the encrypted PowerShell code was not escaped correctly while encoding it on my Kali machine. Best to encode powershell commands on windows directly to avoid mistakes like that to happen... It was \.\root\cimv2:Win32_AuditCode instead of \\.\root\cimv2:Win32_AuditCode (only one \ at the start) because I guess I missed escaping it (\r and \c have to escaped when encoding on Kali as well.).