
CrowdStrike Falcon을 사용한 위협 헌팅을 위한 Splunk의 Search Processing Language (SPL) 모음
CrowdStrike Falcon을 사용한 위협 헌팅을 위한 Splunk SPL(Search Processing Language) 모음
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을 식별한 다음, Explorer.exe의 TargetProcessId_decimal과 동일한 ParentProcessId_decimal을 가진 PowerShell.exe를 찾는 내부 중첩 하위 검색과 조인합니다.ComputerName, , , , 을 열로 하는 결과 테이블을 생성합니다.ParentProcessId_decimal을 사용할 때마다 검색 범위를 평소보다 길게 확장해야 할 수 있음을 유의하세요. 일부 프로세스, 특히 시스템 프로세스는 일반적으로 가동 시간(uptime)이 길지만 최근에 악용될 수 있기 때문입니다.
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