This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from makislev/master
Update github queries to use the new advanced hunting device schema
- Loading branch information
Showing
60 changed files
with
420 additions
and
420 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_babyshark.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where ProcessCommandLine =~ @"reg query ""HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default""" | ||
or ProcessCommandLine startswith "powershell.exe mshta.exe http" | ||
or ProcessCommandLine =~ "cmd.exe /c taskkill /im cmd.exe" | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_apt29_thinktanks.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where ProcessCommandLine has "-noni -ep bypass $" | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// Sample query that search for .settingcontent-ms that has been downloaded from the web | ||
// through Microsoft Edge, Internet Explorer, Google Chrome, Mozilla Firefox, Microsoft Outlook | ||
// For questions @MiladMSFT on Twitter or [email protected] | ||
FileCreationEvents | ||
DeviceFileEvents | ||
| where InitiatingProcessFileName in~ ("browser_broker.exe", "chrome.exe", "iexplore.exe", "firefox.exe", "outlook.exe") | ||
| where FileName endswith ".settingcontent-ms" | ||
// The FileOrigin* columns are available only on Edge and Chrome and from Windows 10 version 1703 | ||
// https://techcommunity.microsoft.com/t5/Threat-Intelligence/Hunting-tip-of-the-month-Browser-downloads/td-p/220454 | ||
| project EventTime, ComputerName, FileName, FolderPath, FileOriginUrl, FileOriginReferrerUrl, FileOriginIP | ||
| project Timestamp, DeviceName, FileName, FolderPath, FileOriginUrl, FileOriginReferrerUrl, FileOriginIP |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_bear_activity_gtr19.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where (FileName =~ "xcopy.exe" and ProcessCommandLine has @" /S /E /C /Q /H \") | ||
or (FileName =~ "adexplorer.exe" and ProcessCommandLine has @" -snapshot """" c:\users\") | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_cloudhopper.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where FileName =~ @"cscript.exe" and ProcessCommandLine has ".vbs /shell " | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// This is a query to retrieve last 30 days network connections to known Dofoil NameCoin servers | ||
// The full article is available here: https://cloudblogs.microsoft.com/microsoftsecure/2018/04/04/hunting-down-dofoil-with-windows-defender-atp/ | ||
|
||
NetworkCommunicationEvents | ||
DeviceNetworkEvents | ||
| where RemoteIP in ( | ||
"139.59.208.246","130.255.73.90","31.3.135.232","52.174.55.168","185.121.177.177","185.121.177.53", | ||
"62.113.203.55","144.76.133.38","169.239.202.202","5.135.183.146","142.0.68.13","103.253.12.18", | ||
"62.112.8.85","69.164.196.21","107.150.40.234","162.211.64.20","217.12.210.54","89.18.27.34", | ||
"193.183.98.154","51.255.167.0","91.121.155.13","87.98.175.85","185.97.7.7") | ||
| project ComputerName, InitiatingProcessCreationTime, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteIP, RemotePort | ||
| project DeviceName, InitiatingProcessCreationTime, InitiatingProcessFileName, InitiatingProcessCommandLine, RemoteIP, RemotePort |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_dragonfly.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where FileName =~ "crackmapexec.exe" | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_elise.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where (FolderPath =~ @"C:\Windows\SysWOW64\cmd.exe" and ProcessCommandLine has @"\Windows\Caches\NavShExt.dll") | ||
or (ProcessCommandLine endswith @"\AppData\Roaming\MICROS~1\Windows\Caches\NavShExt.dll,Setting") | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_equationgroup_c2.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where (FolderPath endswith @"\rundll32.exe" and ProcessCommandLine endswith ",dll_u") | ||
or ProcessCommandLine has " -export dll_u " | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_hurricane_panda.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where ProcessCommandLine endswith " localgroup administrators admin /add" | ||
or ProcessCommandLine has @"\Win64.exe" | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_sofacy_zebrocy.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where ProcessCommandLine endswith "cmd.exe /c SYSTEMINFO & TASKLIST" | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// Original Sigma Rule: https://github.com/Neo23x0/sigma/blob/master/rules/apt/apt_tropictrooper.yml | ||
// Questions via Twitter: @janvonkirchheim | ||
ProcessCreationEvents | ||
| where EventTime > ago(7d) | ||
DeviceProcessEvents | ||
| where Timestamp > ago(7d) | ||
| where ProcessCommandLine contains "abCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCc" | ||
| top 100 by EventTime desc | ||
| top 100 by Timestamp desc |
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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// This query looks for Tor client, or for a common Tor plugin called Meek. | ||
// We query for active Tor connections, but could have alternatively looked for active Tor runs (ProcessCreateEvents) or Tor downloads (FileCreationEvents) | ||
// We query for active Tor connections, but could have alternatively looked for active Tor runs (ProcessCreateEvents) or Tor downloads (DeviceFileEvents) | ||
// To read more about this technique, see: | ||
// Tor: https://attack.mitre.org/wiki/Software/S0183#Techniques_Used | ||
// Meek plugin: https://attack.mitre.org/wiki/Software/S0175 | ||
// Multi-hop proxy technique: https://attack.mitre.org/wiki/Technique/T1188 | ||
// Tags: #Tor, #MultiHopProxy, #CnC | ||
NetworkCommunicationEvents | ||
| where EventTime < ago(3d) and InitiatingProcessFileName in~ ("tor.exe", "meek-client.exe") | ||
DeviceNetworkEvents | ||
| where Timestamp < ago(3d) and InitiatingProcessFileName in~ ("tor.exe", "meek-client.exe") | ||
// Returns MD5 hashes of files used by Tor, to enable you to block them. | ||
// We count how prevalent each file is (by machines) and show examples for some of them (up to 5 machine names per hash). | ||
| summarize MachineCount=dcount(ComputerName), MachineNames=makeset(ComputerName, 5) by InitiatingProcessMD5 | ||
| summarize MachineCount=dcount(DeviceName), MachineNames=makeset(DeviceName, 5) by InitiatingProcessMD5 | ||
| order by MachineCount desc |
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
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
Oops, something went wrong.