-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KQLObfusGuard - Detecting ArgFuscator Obfuscation.kql
- Loading branch information
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
DefenderXDR/KQLObfusGuard - Detecting ArgFuscator Obfuscation.kql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |