Finding inner (win)PEAS in difficult times, Windows privilege escalation reconnaisance detection

 

Last post we looked at winPEAS traces left in logs using Splunk and Windows security event logging and guess what we are doing this time? More of the same, these are potential security alerts or a jumping off point for some threat hunting. 
 
What prompted me looking at PEAS-ng, Watson and dazzleUP is that they are all featured in one of the rounds of Conti ransomware gang leaks. 
 

I'll be trying to cover all three red team tools in some depth, with some SPL. If you are using a different SIEM you can use what I have here to inspire your own detections, just go with your heart.

winPEAS performs extensive reconnaissance on Windows endpoints to provide some guidance on potential privilege escalation paths for adversaries, as before we are looking at the batchfile implementation of winPEAS, though it also comes in pre-compiled binaries and there is a Powershell version floating around as well.
 
Part of this discovery/recon process involves using Windows native tool findstr.exe to retrieve information for winPEAS output, we can search for these specific findstr strings:



And here's the SPL:
 
index=winlogs EventCode=4688 New_Process_Name="*\\findstr.exe" Process_Command_Line IN ("*(F) (M) (W)*", "*BINARY_PATH_NAME*", "*everyone authenticated users todos User*", "*SERVICE_NAME*") | stats count min(_time) as earliest max(_time) as latest values(Process_Command_Line) AS Process_Command_Line BY Account_Name ComputerName | convert ctime(earliest) ctime(latest) | table earliest latest Account_Name ComputerName Process_Command_Line
 
There's some potential for false positives here I guess but if you have all of the results shown in the screenshot above you've got a privilege escalation problem.

Popular posts from this blog

Fastening the Seatbelt on.. Threat Hunting for Seatbelt

Capturing Pcap driver installations

Microsoft Defender, Find User Ignored Threats With Splunk