Suspicious Powershell via Windows Power User Menu
Description
Identifies the execution of Windows Powershell via the Start Menu dialog box. Adversaries may use phishing to instruct the victim to copy and paste malicious commands for execution via crafted phsihing web pages.
Query · eql
sequence by process.entity_id with maxspan=1m
[process where event.action == "start" and process.name == "powershell.exe" and process.args_count == 1 and
process.parent.name == "explorer.exe" and
process.parent.thread.Ext.call_stack_summary == "ntdll.dll|kernelbase.dll|kernel32.dll|windows.storage.dll|shell32.dll|windows.storage.dll|shell32.dll|shcore.dll|kernel32.dll|ntdll.dll"]
[api where process.name == "powershell.exe" and process.Ext.api.name == "AmsiScanBuffer" and process.Ext.api.parameters.buffer : ("* # *", "*iwr *", "*|iex*", "*invoke-web*", "*WebClient*", "*http*") and
not process.Ext.api.parameters.buffer like ("*# https://go.microsoft.com/fwlink*",
"#*", "$targetUser*", "wget https://*_windows_amd64.zip",
"Get-LicCertificate*", "*go.microsoft.com/fwlink/*", "#---------*") and
not process.Ext.api.parameters.content_name : "?*"]
[any where event.category in ("network", "dns") and process.name == "powershell.exe" and dns.question.name != "go.microsoft.com"]