Skip to content

Commit

Permalink
KQLObfusGuard - Detecting ArgFuscator Obfuscation.kql
Browse files Browse the repository at this point in the history
  • Loading branch information
SlimKQL authored Feb 16, 2025
1 parent 594e08c commit 9da4733
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions DefenderXDR/KQLObfusGuard - Detecting ArgFuscator Obfuscation.kql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// KQLObfusGuard - Detecting ArgFuscator Obfuscation
// https://argfuscator.net/

let KQLObfusGuard=externaldata(RawData:string)
[h'https://raw.githubusercontent.com/SlimKQL/Hunting-Queries-Detection-Rules/refs/heads/main/IOC/argfuscator.txt']
| parse RawData with ArgfuscatorCommand :string;
let ArgfuscatorCmds =
KQLObfusGuard
| project ArgfuscatorCommand;
DeviceEvents
| where Timestamp > ago(1h)
| extend ParsedCommandLine = parse_command_line(tolower(InitiatingProcessCommandLine), "windows")
| extend IPCL_Length = strlen(InitiatingProcessCommandLine)
| extend PCL_Length = strlen(tostring(ParsedCommandLine))-2-(2*array_length(ParsedCommandLine))+(array_length(ParsedCommandLine)-1)
| where (IPCL_Length - PCL_Length > 1) and ParsedCommandLine has_any(ArgfuscatorCmds)

0 comments on commit 9da4733

Please sign in to comment.