一组用于使用 CrowdStrike Falcon 进行威胁狩猎的 Splunk 搜索处理语言 (SPL) 集合
由 i-secure co., Ltd. 的 Intelligent Response 团队开发和维护
此查询的灵感来自 Red Canary 的研究。有关泰语说明,请查看我们的博客。
思路:
NewExecutableRenamed。NewExecutableRenamed 事件中的 TargetFileName 字段与 ProcessRollup2 事件中 ImageFileName 字段中的文件名关联起来。ComputerName、timestamp、ImageFileName 和 CommandLine 列的结果表。event_simpleName="NewExecutableRenamed"
| rename TargetFileName as ImageFileName
| join ImageFileName
[ search event_simpleName="ProcessRollup2" ]
| table ComputerName SourceFileName ImageFileName CommandLine
此查询的灵感来自 Red Canary 的研究。有关泰语说明,请查看我们的博客。
思路:
DnsRequest 和 NetworkConnectIP4 事件。在此查询中,我们将使用 DnsRequest 事件。DnsRequest 事件中的 ContextProcessId 字段与 ProcessRollup2 事件中的 TargetProcessId 字段关联起来。ComputerName、timestamp、ImageFileName 和 CommandLine 列的结果表。由于我们的狩猎查询需要一份已知的 LOL 二进制文件/文件列表用于过滤,因此我们需要枚举 LOLBAS-Project/LOLBas 上可用的文件列表,这只需通过一个 grep 表达式即可完成:grep -Poh "(?<=Name:\s)[A-Za-z0-9_-]+.exe$" OSBinaries/
event_simpleName="DnsRequest"
| rename ContextProcessId as TargetProcessId
| join TargetProcessId
[ search event_simpleName="ProcessRollup2" (FileName=Atbroker.exe OR FileName=Bash.exe OR FileName=Bitsadmin.exe OR FileName=Certutil.exe OR FileName=Cmd.exe OR FileName=Cmstp.exe OR FileName=Control.exe OR FileName=Cscript.exe OR FileName=Csc.exe OR FileName=Dfsvc.exe OR FileName=Diskshadow.exe OR FileName=Dnscmd.exe OR FileName=Esentutl.exe OR FileName=Eventvwr.exe OR FileName=Expand.exe OR FileName=Extexport.exe OR FileName=Extrac32.exe OR FileName=Findstr.exe OR FileName=Forfiles.exe OR FileName=Ftp.exe OR FileName=Gpscript.exe OR FileName=Hh.exe OR FileName=Ie4uinit.exe OR FileName=Ieexec.exe OR FileName=Infdefaultinstall.exe OR FileName=Installutil.exe OR FileName=Jsc.exe OR FileName=Makecab.exe OR FileName=Mavinject.exe OR FileName=Mmc.exe OR FileName=Msconfig.exe OR FileName=Msdt.exe OR FileName=Mshta.exe OR FileName=Msiexec.exe OR FileName=Odbcconf.exe OR FileName=Pcalua.exe OR FileName=Pcwrun.exe OR FileName=Presentationhost.exe OR FileName=Print.exe OR FileName=Regasm.exe OR FileName=Regedit.exe OR FileName=Register-cimprovider.exe OR FileName=Regsvcs.exe OR FileName=Regsvr32.exe OR FileName=Reg.exe OR FileName=Replace.exe OR FileName=Rpcping.exe OR FileName=Rundll32.exe OR FileName=Runonce.exe OR FileName=Runscripthelper.exe OR FileName=Schtasks.exe OR FileName=Scriptrunner.exe OR FileName=Sc.exe OR FileName=SyncAppvPublishingServer.exe OR FileName=Verclsid.exe OR FileName=Wab.exe OR FileName=Wmic.exe OR FileName=Wscript.exe OR FileName=Wsreset.exe OR FileName=Xwizard.exe) ]
| table ComputerName timestamp ImageFileName DomainName CommandLine
此查询的灵感来自 Red Canary 的研究。有关泰语说明,请查看我们的博客。
思路:
DNSRequest 或 NetworkConnectIP4 事件记录的网络活动,在本查询中我们将使用 NetworkConnectIP4。ContextProcessId_decimal 与 ProcessRollup2 事件中的 TargetProcessId_decimal 关联起来。RemoteIP、RemotePort_decimal、ImageFileName、UserName 和 UserSid_readable 的结果表。event_simpleName="NetworkConnectIP4"
| rename ContextProcessId_decimal as TargetProcessId_decimal
| join TargetProcessId_decimal
[ search event_simpleName=ProcessRollup2 ]
| table RemoteIP RemotePort_decimal ImageFileName UserName UserSid_readabl
此查询的灵感来自 Red Canary 的研究。有关泰语说明,请查看我们的博客。
思路:
DNSRequest 事件记录的网络活动。DNSRequest 中的 ContextProcessId 字段与 ProcessRollup2 和 SyntheticProcessRollup2 事件中的 TargetProcessId 关联起来。ProcessRollup2 事件中识别 Explorer.exe 的 TargetProcessId_decimal,然后与内层嵌套子搜索连接;内层嵌套子搜索负责查找 PowerShell.exe,其 ParentProcessId_decimal 与 Explorer.exe 的 TargetProcessId_decimal 相同。ComputerName、、、 和 的结果表。请注意,只要使用了 ParentProcessId_decimal,就可能需要将搜索范围扩展到比平时更长的时间。因为某些进程,尤其是系统进程,通常运行时间较长,但最近被滥用。
event_simpleName="DnsRequest"
| rename ContextProcessId as TargetProcessId
| join TargetProcessId
[ search (event_simpleName="ProcessRollup2" OR event_simpleName="SyntheticProcessRollup2") AND FileName="explorer.exe"
| rename TargetProcessId_decimal as ParentProcessId_decimal
| join ParentProcessId_decimal
[ search event_simpleName="ProcessRollup2" FileName="powershell.exe" ]]
| table ComputerName timestamp ImageFileName DomainName CommandLine
此查询的灵感来自 MENASEC 的研究。
CrowdStrike 有一个名为 RegSystemConfigValueUpdate 的事件类别用于此类行为。但是,LastLoggedOnUser 和 LastLoggedOnSAMUser 不被视为系统配置。因此,我们只能发现编辑 RDP-Tcp\PortNumber 的尝试。
event_simpleName="RegSystemConfigValueUpdate" AND RegObjectName="*\RDP-Tcp" AND RegValueName="PortNumber"
| rename RegNumericValue_decimal as "NewRDPPort"
| table timestamp, ComputerName, NewRDPPort
此查询的灵感来自 MENASEC 的研究
没有与此活动相关的事件
timestampImageFileNameDomainNameCommandLine