Detections

Explore public detection logic contributed by the community across SIEM and rule languages.

774 detections

Detects wmiexec/dcomexec/atexec/smbexec from Impacket framework
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
008
This query identifies common processes run by ransomware
malware to destroy volume shadow copies or clean free
space on a drive to prevent a file from being recovered
post-encryption. To reduce false positives, results are
filtered to only actions taken when the initiating
process was launched from a suspicious directory. If
you don't mind false positives, consider removing the
last where clause.
Special thanks to Captain for additional inputs
Azure Sentinel@AzureSentinel
avatar
AzureSentinel
1 year ago
0047
'This query detects instances where an attacker has gained the ability to execute code on an ADFS Server through remote WMI Execution.
In order to use this query you need to be collecting Sysmon EventIDs 19, 20, and 21.
If you do not have Sysmon data in your workspace this query will raise an error stating:
Failed to resolve scalar expression named "[@Name]"
For more on how WMI was used in Solorigate see https://www.microsoft.com/security/blog/2021/01/20/deep-dive-into-the-solorigate-second-stage-activation-from-sunburst-to-teardrop-and-raindrop/.
The query contains some features from the following detections to look for potentially malicious ADFS activity. See them for more details.
- ADFS Key Export (Sysmon): https://github.com/Azure/Azure-Sentinel/blob/master/Detections/SecurityEvent/ADFSKeyExportSysmon.yaml
- ADFS DKM Master Key Export: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/MultipleDataSources/ADFS-DKM-MasterKey-Export.yaml'
Azure Sentinel@AzureSentinel
avatar
AzureSentinel
1 year ago
2047
An adversary might use WMI to discover information about the system, such as the volume name, size,
free space, and other disk information. This can be done using the `wmic` command-line utility and has been
observed being used by threat actors such as Volt Typhoon.
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
007
Detects suspicious and uncommon child processes of WmiPrvSE
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
007
Detects a suspicious child process of Script Event Consumer (scrcons.exe).
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
007
This query was originally published in the threat analytics report, Ryuk ransomware. There is also a related blog.
Ryuk is human-operated ransomware. Much like DoppelPaymer ransomware, Ryuk is spread manually, often on networks that are already infected with Trickbot.
During the earliest stages of a Ryuk infection, an operator downloads Cobalt Strike, a penetration testing kit that is also used by malicious actors. Cobalt Strike is used by Ryuk operators to explore the network before deploying the Ryuk payload. This malicious behavior is often obscured by Base64 encoding and other tricks.
The following query detects possible invocation of Cobalt Strike using Windows Management Instrumentation (WMI).
The See also section below lists links to other queries associated with Ryuk ransomware.
References:
https://www.microsoft.com/security/blog/2020/03/05/human-operated-ransomware-attacks-a-preventable-disaster/
https://www.microsoft.com/wdsi/threats/malware-encyclopedia-description?Name=Ransom:Win32/Ryuk&threatId=-2147232689
https://www.microsoft.com/security/blog/2020/03/05/human-operated-ransomware-attacks-a-preventable-disaster/
https://www.cobaltstrike.com/
https://docs.microsoft.com/windows/win32/wmisdk/wmi-start-page
Azure Sentinel@AzureSentinel
avatar
AzureSentinel
1 year ago
3042
Expanding on DeviceEvents output with Attack Surface Reduction (ASR) rule descriptions.
The ActionType values of the ASR events already explain what rule was matched and if it was audited or blocked.
However, it could still be useful to have a more human-friendly description in the results.
Also, this query is a good example for how you could define your own lookup tables and join with them.
The events in the DeviceEvents table contain a GUID for the various ASR rules rather than a full description of the rule.
This query will create a table which has the description for each ASR rule as per https://docs.microsoft.com/windows/security/threat-protection/windows-defender-exploit-guard/enable-attack-surface-reduction.
This table is then joined to the output of a query against the DeviceEvents table and shows a summary count of the events by the newly defined description.
This query shows the ability to use joins and custom dimension tables.
See https://docs.loganalytics.io/docs/Language-Reference/Tabular-operators/join-operator for more information on the join syntax.
For more questions on this query, feel free to ping @FlyingBlueMonki on twitter or mattegen@microsoft.com via email.
First lets start by creating a table of the rule descriptions to rule guids.
Azure Sentinel@AzureSentinel
avatar
AzureSentinel
1 year ago
4042
'Shows the rarest processes seen running for the first time. (Performs best over longer time ranges - eg 3+ days rather than 24 hours!)
These new processes could be benign new programs installed on hosts;
However, especially in normally stable environments, these new processes could provide an indication of an unauthorized/malicious binary that has been installed and run.
Reviewing the wider context of the logon sessions in which these binaries ran can provide a good starting point for identifying possible attacks.'
Azure Sentinel@AzureSentinel
avatar
AzureSentinel
1 year ago
1038
Detects WMIC executing "process call create" with suspicious calls to processes such as "rundll32", "regsrv32", etc.
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
006
Detects a suspicious execution of a Microsoft HTML Help (HH.exe)
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
006
Detects WmiPrvSE spawning a process
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
006
Detects the removal or uninstallation of an application via "Wmic.EXE".
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
106
Attempts to detect system changes made by Blue Mockingbird
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
006
Detects successful logon attempts performed with WMI
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
006
This query was originally published in the threat analytics report, Cypherpunk ransomware leaves wake of tampered AVs.
Cypherpunk is a human-operated ransomware campaign named after the unusual .cypherpunk extension given to encrypted files.
The query below surfaces commands that follow the distinctive pattern Cypherpunk operators would use to remotely execute code.
Azure Sentinel@AzureSentinel
avatar
AzureSentinel
1 year ago
0030
Excel called wmic to finally proxy execute regsvr32 with the payload.
An attacker wanted to break suspicious parent-child chain (Office app spawns LOLBin).
But we have command-line in the event which allow us to "restore" this suspicious parent-child chain and detect it.
Monitor process creation with "wmic process call create" and LOLBins in command-line with parent Office application processes.
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
005
Detects a suspicious process spawning from one of the Microsoft Office suite products (Word, Excel, PowerPoint, Publisher, Visio, etc.)
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
005
Detects execution of wmic utility with the "computersystem" flag in order to obtain information about the machine such as the domain, username, model, etc.
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
005
Detects parameters used by WMImplant
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
005
Initial execution of malicious document calls wmic to execute the file with regsvr32
Yamato Security Hayabusa@YamatoSecurityHayabusa
avatar
Yamato Security Hayabusa Rules
1 year ago
005
Page 29 of 37