-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CallStackModuleBinary() and HuntRareCallStackModules()
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
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
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,16 @@ | ||
name: CallStackModuleBinary | ||
description: "Parses binaries (exe and dll) pressent in CallStack. Note this wull result as multiple events." | ||
visualization: | ||
options: | ||
columns: '[{"type":"field","fieldName":"@timestamp","width":210},{"type":"field","fieldName":"@rawstring"}]' | ||
newestAtBottom: 'true' | ||
showOnlyFirstLine: 'false' | ||
type: list-view | ||
$schema: https://schemas.humio.com/query/v0.1.0 | ||
timeInterval: | ||
isLive: false | ||
start: 1d | ||
queryString: "// Extracting .exe and .dll in CallStackModule, note this is repeating\ | ||
\ and therefore split events for each hit.\n// Inspired from CQF : https://www.reddit.com/r/crowdstrike/comments/mwuz92/20210423_cool_query_friday_parsing_the_call_stack/\n\ | ||
regex(\"\\\\\\\\Device\\\\\\\\HarddiskVolume\\\\d+(?<falcon.csm.name>.*?(\\\\.dll|\\\ | ||
\\.exe))\",field=\"CallStackModuleNames\",repeat=True,flags=\"i\") " |
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,22 @@ | ||
name: HuntRareCallStackModules | ||
description: "Hunt processes loading a module rarely used" | ||
visualization: | ||
options: {} | ||
type: table-view | ||
$schema: https://schemas.humio.com/query/v0.1.0 | ||
timeInterval: | ||
isLive: false | ||
start: 1d | ||
queryString: |- | ||
// ?region field is bugged when set as input to user function. If you need other region other then default, add &$reigon=<URL> to url .. ie. &$reigon=EU-1 and links will work | ||
#type = FDR #event_simpleName=ProcessRollup2 CallStackModuleNames=* | ||
| $crowdstrike/fdr-utils:CallStackModuleBinary() | ||
| join({#type = FDR #event_simpleName=ProcessRollup2 | regex("\\\\Device\\\\HarddiskVolume\\d+(?<falcon.csm.name>.*?(\\.dll|\\.exe))",field="CallStackModuleNames",repeat=True,flags="i") | groupBy([#cid, aid, falcon.csm.name]) | _count < ?{max_loads=50}}, field=[#cid, aid, falcon.csm.name], mode=inner) | ||
| groupBy(["#cid", "aid", "ParentProcessId"], function=[selectLast([TargetProcessId, ParentBaseFileName]), count(), min(@timestamp), max(@timestamp), collect(CommandLine, separator=" | ")]) | ||
| $crowdstrike/fdr-utils:FalconURL(region=?{reigon=US-1}) | ||
| $crowdstrike/fdr-utils:RTR() | ||
| $crowdstrike/fdr-utils:ProcessExplorerTarget() | ||
| duration := _max - _min | case {duration != 0 | duration := formatDuration(duration); *} | ||
| start := formattime("%Y/%m/%d %H:%M:%S", field=_min) | ||
| table([aid, ParentProcessId, ParentBaseFileName, _count, start, duration, falcon.RTR, falcon.process_explorer_target, CommandLine]) | ||
| sort() |