Quantcast
Channel: Some stuff about security..
Viewing all articles
Browse latest Browse all 65

Detecting Mimikatz launched by PowerShell

$
0
0

Following my last post about how to hunt for malicious PowerShell commands, I'm interested to detect Mimikatz once it is launched through PowerShell, like for example with PowerShellEmpire framework. Mark Russinovich has just written that in order to detect Mimikatz you must monitor lsass.exe for process access.



So basically, I have created a simple filter in sysmon for event code 10 (ProcessAccess) with SourceImage PowerShell.exe and TargetImage lsass.exe





<ProcessAccessonmatch="include">
<SourceImagecondition="contains">powershell.exe</SourceImage>
<TargetImagecondition="contains">lsass.exe</TargetImage>
</ProcessAccess>



Now it is time to test if it works. 
So I use the Mimikatz module in PowerShellEmpire






In Splunk I detect the initial encoded PowerShell Command

 

After a few second I run a SPL query to see when the PowerShell.exe command accesses the process lsass.exe, which it is when mimikatz is executed :)








Viewing all articles
Browse latest Browse all 65

Trending Articles