Threat Hunting Invoke-Webrequest Powershell possible?
I've been testing detection of powershell processes after getting a start with the related CQF that was previously posted. I'm struggling to find the full command line value when running invoke-webrequest from a powershell window spawned by the user. The event data just returns "powershell.exe" in the command line field instead of what was entered like "invoke-webrequest http://somesite.com/virus.txt -output virus.txt"
Is there something I'm missing, or is the command line value not supposed to return this type of info when powershell commands are executed in an interactive powershell instance?
Posted Aug 25, 2021, 12:18 PM UTC
Can you share the SPL you are working with? I think it might be a simple tweak.
Thanks, I've got my query as simple as I can make it just to continue exploring the fields. I have a test machine that I've been working with, and I've just been looking at all of the CommandLine results for powershell.exe on that host and running stats to see what's up:
The result of that is literally just:
I just did some searching for the file I downloaded, and I do see some results in the CommandHistory field, so I guess I need to see if I can marry CommandHistory to CommandLine.