Detection rules › Sigma
Sigma rules: 24
Azure Login Bypassing Conditional Access Policies
#Detects a successful login to the Microsoft Intune Company Portal which could allow bypassing Conditional Access Policies and InTune device trust using a tool like TokenSmith.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence | |
| Privilege Escalation | |
| Stealth |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Microsoft 365 | UserLoggedIn |
Rules Detecting the Same Action
These rules filter on the same operation.
- Hunt for suspicious sign-in to Entra ID Using Extrnal Call Method (YARA-L)
- M365 Identity OAuth Flow by First-Party Microsoft App from Multiple IPs (Elastic)
- M365 Identity OAuth Flow by User Sign-in to Device Registration (Elastic)
- M365 Identity OAuth Phishing via First-Party Microsoft Application (Elastic)
- M365 Identity OAuth ROPC Grant via Legacy Authentication Client (Elastic)
- M365 Potential AiTM UserLoggedIn via Office App (Tycoon2FA) (Elastic)
- O365 AD PowerShell App Login Subsequent Activity (YARA-L)
- O365 Admin Login Activity To Uncommon Microsoft Cloud Apps (YARA-L)
Rule Body
title: Azure Login Bypassing Conditional Access Policies
id: 13f2d3f5-6497-44a7-bf5f-dc13ffafe5dc
status: experimental
description: |
Detects a successful login to the Microsoft Intune Company Portal which could allow bypassing Conditional Access Policies and InTune device trust using a tool like TokenSmith.
author: Josh Nickels, Marius Rothenbücher
references:
- https://labs.jumpsec.com/tokensmith-bypassing-intune-compliant-device-conditional-access/
- https://github.com/JumpsecLabs/TokenSmith
date: 2025-01-08
tags:
- attack.privilege-escalation
- attack.persistence
- attack.initial-access
- attack.stealth
- attack.t1078
logsource:
service: audit
product: m365
detection:
selection:
Operation: 'UserLoggedIn'
ApplicationId: '9ba1a5c7-f17a-4de9-a1f1-6178c8d51223'
ResultStatus: 'Success'
RequestType: 'Cmsi:Cmsi'
filter_main_bjectid:
ObjectId: '0000000a-0000-0000-c000-000000000000' # Microsoft Intune seen when mobile devices are enrolled
condition: selection and not 1 of filter_main_*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
Operation: 'UserLoggedIn'
ApplicationId: '9ba1a5c7-f17a-4de9-a1f1-6178c8d51223'
ResultStatus: 'Success'
RequestType: 'Cmsi:Cmsi'
Stage 2: not filter_main_bjectid
filter_main_bjectid:
ObjectId: '0000000a-0000-0000-c000-000000000000'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ApplicationId | eq |
| field:"ApplicationId" kind:eq value:"9ba1a5c7-f17a-4de9-a1f1-6178c8d51223" |
Operation | eq |
| field:"Operation" kind:eq value:"UserLoggedIn" |
RequestType | eq |
| field:"RequestType" kind:eq value:"Cmsi:Cmsi" |
ResultStatus | eq |
| field:"ResultStatus" kind:eq value:"Success" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
ObjectId | eq | 0000000a-0000-0000-c000-000000000000 | excludes:ObjectId field:"ObjectId" value:"0000000a-0000-0000-c000-000000000000" |
Azure Windows virtual machine login via serial console
#Detects if an attacker logs on using the serial console.
Known False Positives
- Virtual machine recovery by administrator
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4624: An account was successfully logged on. |
Rule Body
title: Azure Windows virtual machine login via serial console
description: Detects if an attacker logs on using the serial console.
references:
- https://msrc.microsoft.com/blog/2023/08/azure-serial-console-attack-and-defense-part-1/
- https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-cmd-ps-commands
- https://www.mandiant.com/resources/blog/sim-swapping-abuse-azure-serial
tags:
- attack.initial_access
- attack.privilege_escalation
- attack.t1078 # valid accounts
author: mdecrevoisier
status: experimental
logsource:
product: windows
service: security
detection:
selection:
EventID: 4624
LogonProcess|contains: 'sacsess.exe'
LogonType: 2
condition: selection
falsepositives:
- Virtual machine recovery by administrator
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventID: 4624
LogonProcess|contains: 'sacsess.exe'
LogonType: 2
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
LogonProcess | match |
| field:"LogonProcess" kind:match value:"sacsess.exe" |
LogonType | eq |
| field:"LogonType" kind:eq value:"2" |
Change Default File Association Via Assoc
#Detects file association changes using the builtin "assoc" command. When a file is opened, the default program used to open the file (also called the file association or handler) is checked. File association selections are stored in the Windows Registry and can be edited by users, administrators, or programs that have Registry access or by administrators using the built-in assoc utility. Applications can modify the file association for a given file extension to call an arbitrary program when a file with the given extension is opened.
Known False Positives
- Admin activity
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Change Default File Association Via Assoc
id: 3d3aa6cd-6272-44d6-8afc-7e88dfef7061
related:
- id: ae6f14e6-14de-45b0-9f44-c0986f50dc89
type: similar
status: test
description: |
Detects file association changes using the builtin "assoc" command.
When a file is opened, the default program used to open the file (also called the file association or handler) is checked. File association selections are stored in the Windows Registry and can be edited by users, administrators, or programs that have Registry access or by administrators using the built-in assoc utility. Applications can modify the file association for a given file extension to call an arbitrary program when a file with the given extension is opened.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1546.001/T1546.001.md
author: Timur Zinniatullin, oscd.community
date: 2019-10-21
modified: 2023-03-06
tags:
- attack.privilege-escalation
- attack.persistence
- attack.t1546.001
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\cmd.exe'
- OriginalFileName: 'Cmd.Exe'
selection_cli:
CommandLine|contains: 'assoc'
condition: all of selection_*
falsepositives:
- Admin activity
level: low
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_cmd_assoc_execution/info.yml
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Image|endswith: '\cmd.exe'
- OriginalFileName: 'Cmd.Exe'
Stage 2: selection_cli
selection_cli:
CommandLine|contains: 'assoc'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:"assoc" |
Image | ends_with |
| field:"Image" kind:ends_with value:"\cmd.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"Cmd.Exe" |
CVE-2021-21978 Exploitation Attempt
#Detects the exploitation of the VMware View Planner vulnerability described in CVE-2021-21978
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule Body
title: CVE-2021-21978 Exploitation Attempt
id: 77586a7f-7ea4-4c41-b19c-820140b84ca9
status: test
description: Detects the exploitation of the VMware View Planner vulnerability described in CVE-2021-21978
references:
- https://twitter.com/wugeej/status/1369476795255320580
- https://paper.seebug.org/1495/
author: Bhabesh Raj
date: 2020-03-10
modified: 2023-01-02
tags:
- attack.initial-access
- attack.t1190
- cve.2021-21978
- detection.emerging-threats
logsource:
category: webserver
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains|all:
- 'logupload'
- 'logMetaData'
- 'wsgi_log_upload.py'
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
cs-method: 'POST'
cs-uri-query|contains|all:
- 'logupload'
- 'logMetaData'
- 'wsgi_log_upload.py'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
cs-method | eq |
| field:"cs-method" kind:eq value:"POST" |
cs-uri-query | match |
| field:"cs-uri-query" kind:match |
CVE-2021-31979 CVE-2021-33771 Exploits by Sourgum
#Detects patterns as noticed in exploitation of Windows CVE-2021-31979 CVE-2021-33771 vulnerability and DevilsTongue malware by threat group Sourgum
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: CVE-2021-31979 CVE-2021-33771 Exploits by Sourgum
id: ad7085ac-92e4-4b76-8ce2-276d2c0e68ef
status: test
description: Detects patterns as noticed in exploitation of Windows CVE-2021-31979 CVE-2021-33771 vulnerability and DevilsTongue malware by threat group Sourgum
references:
- https://www.microsoft.com/security/blog/2021/07/15/protecting-customers-from-a-private-sector-offensive-actor-using-0-day-exploits-and-devilstongue-malware/
- https://citizenlab.ca/2021/07/hooking-candiru-another-mercenary-spyware-vendor-comes-into-focus/
author: Sittikorn S
date: 2021-07-16
modified: 2022-10-09
tags:
- attack.initial-access
- attack.execution
- attack.credential-access
- attack.t1566
- attack.t1203
- cve.2021-33771
- cve.2021-31979
- detection.emerging-threats
# - threat_group.Sourgum
logsource:
product: windows
category: file_event
detection:
selection:
TargetFilename|contains:
- 'C:\Windows\system32\physmem.sys'
- 'C:\Windows\System32\IME\IMEJP\imjpueact.dll'
- 'C:\Windows\system32\ime\IMETC\IMTCPROT.DLL'
- 'C:\Windows\system32\ime\SHARED\imecpmeid.dll'
- 'C:\Windows\system32\config\spp\ServiceState\Recovery\pac.dat'
- 'C:\Windows\system32\config\cy-GB\Setup\SKB\InputMethod\TupTask.dat'
- 'C:\Windows\system32\config\config\startwus.dat'
- 'C:\Windows\system32\ime\SHARED\WimBootConfigurations.ini'
- 'C:\Windows\system32\ime\IMEJP\WimBootConfigurations.ini'
- 'C:\Windows\system32\ime\IMETC\WimBootConfigurations.ini'
condition: selection
falsepositives:
- Unlikely
level: critical
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetFilename|contains:
- 'C:\Windows\system32\physmem.sys'
- 'C:\Windows\System32\IME\IMEJP\imjpueact.dll'
- 'C:\Windows\system32\ime\IMETC\IMTCPROT.DLL'
- 'C:\Windows\system32\ime\SHARED\imecpmeid.dll'
- 'C:\Windows\system32\config\spp\ServiceState\Recovery\pac.dat'
- 'C:\Windows\system32\config\cy-GB\Setup\SKB\InputMethod\TupTask.dat'
- 'C:\Windows\system32\config\config\startwus.dat'
- 'C:\Windows\system32\ime\SHARED\WimBootConfigurations.ini'
- 'C:\Windows\system32\ime\IMEJP\WimBootConfigurations.ini'
- 'C:\Windows\system32\ime\IMETC\WimBootConfigurations.ini'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | match |
| field:"TargetFilename" kind:match |
Driver Added To Disallowed Images In HVCI - Registry
#Detects changes to the "HVCIDisallowedImages" registry value to potentially add a driver to the list, in order to prevent it from loading.
Known False Positives
- Legitimate usage of this key would also trigger this. Investigate the driver being added and make sure its intended
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 13: RegistryEvent (Value Set) |
Rule Body
title: Driver Added To Disallowed Images In HVCI - Registry
id: 555155a2-03bf-4fe7-af74-d176b3fdbe16
related:
- id: 44cee399-f6b1-45cc-a87c-ea14c6064d6b
type: similar
status: test
description: |
Detects changes to the "HVCIDisallowedImages" registry value to potentially add a driver to the list, in order to prevent it from loading.
references:
- https://github.com/yardenshafir/conference_talks/blob/3de1f5d7c02656c35117f067fbff0a219c304b09/OffensiveCon_2023_Your_Mitigations_are_My_Opportunities.pdf
- https://x.com/yarden_shafir/status/1822667605175324787
author: Nasreddine Bencherchali (Nextron Systems), Omar Khaled (@beacon_exe)
date: 2023-12-05
modified: 2024-08-21
tags:
- attack.stealth
logsource:
category: registry_set
product: windows
detection:
selection:
TargetObject|contains|all:
- '\Control\CI\'
- '\HVCIDisallowedImages'
condition: selection
falsepositives:
- Legitimate usage of this key would also trigger this. Investigate the driver being added and make sure its intended
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetObject|contains|all:
- '\Control\CI\'
- '\HVCIDisallowedImages'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetObject | match |
| field:"TargetObject" kind:match |
Firewall rule creation (command)
#Detects scenarios where an attacker attempts to create a firewall rule to allow unauthorized communications.
Known False Positives
- Administrator activity
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Firewall rule creation (command)
description: Detects scenarios where an attacker attempts to create a firewall rule to allow unauthorized communications.
references:
- https://research.checkpoint.com/2022/check-point-research-detects-crypto-miner-malware-disguised-as-google-translate-desktop-and-other-legitimate-applications/
- https://thedfirreport.com/2023/10/30/netsupport-intrusion-results-in-domain-compromise/
- https://www.sygnia.co/blog/china-nexus-threat-group-velvet-ant/
tags:
- attack.defense_evasion
- attack.t1562.004
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: process_creation
detection: # netsh firewall add portopening TCP 80 "Open Port 80"
selection_event:
EventID: 4688
NewProcessName|endswith: '\netsh.exe' # Full path "C:\Windows\system32\netsh.exe"
Commandline|contains|all:
- netsh
- firewall # covers also advfirewall
- add
condition: selection
falsepositives:
- Administrator activity
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection_event
selection_event:
EventID: 4688
NewProcessName|endswith: '\netsh.exe'
Commandline|contains|all:
- netsh
- firewall
- add
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Commandline | match |
| field:"CommandLine" kind:match |
NewProcessName | ends_with |
| field:"Image" kind:ends_with value:"\netsh.exe" |
HackTool - SafetyKatz Dump Indicator
#Detects default lsass dump filename generated by SafetyKatz.
Known False Positives
- Rare legitimate files with similar filename structure
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: HackTool - SafetyKatz Dump Indicator
id: e074832a-eada-4fd7-94a1-10642b130e16
status: test
description: Detects default lsass dump filename generated by SafetyKatz.
references:
- https://github.com/GhostPack/SafetyKatz
- https://github.com/GhostPack/SafetyKatz/blob/715b311f76eb3a4c8d00a1bd29c6cd1899e450b7/SafetyKatz/Program.cs#L63
author: Markus Neis
date: 2018-07-24
modified: 2024-06-27
tags:
- attack.credential-access
- attack.t1003.001
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|endswith: '\Temp\debug.bin'
condition: selection
falsepositives:
- Rare legitimate files with similar filename structure
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetFilename|endswith: '\Temp\debug.bin'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with value:"\Temp\debug.bin" |
HackTool - SharpChisel Execution
#Detects usage of the Sharp Chisel via the commandline arguments
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: HackTool - SharpChisel Execution
id: cf93e05e-d798-4d9e-b522-b0248dc61eaf
related:
- id: 8b0e12da-d3c3-49db-bb4f-256703f380e5
type: similar
status: test
description: Detects usage of the Sharp Chisel via the commandline arguments
references:
- https://github.com/shantanu561993/SharpChisel
- https://www.sentinelone.com/labs/wading-through-muddy-waters-recent-activity-of-an-iranian-state-sponsored-threat-actor/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-09-05
modified: 2023-02-13
tags:
- attack.command-and-control
- attack.t1090.001
logsource:
category: process_creation
product: windows
detection:
selection:
- Image|endswith: '\SharpChisel.exe'
- Product: 'SharpChisel'
# See rule 8b0e12da-d3c3-49db-bb4f-256703f380e5 for Chisel.exe coverage
condition: selection
falsepositives:
- Unlikely
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
- Image|endswith: '\SharpChisel.exe'
- Product: 'SharpChisel'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with value:"\SharpChisel.exe" |
Product | eq |
| field:"Product" kind:eq value:"SharpChisel" |
JScript Compiler Execution
#Detects the execution of the "jsc.exe" (JScript Compiler). Attacker might abuse this in order to compile JScript files on the fly and bypassing application whitelisting.
Known False Positives
- Legitimate use to compile JScript by developers.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: JScript Compiler Execution
id: 52788a70-f1da-40dd-8fbd-73b5865d6568
status: test
description: |
Detects the execution of the "jsc.exe" (JScript Compiler).
Attacker might abuse this in order to compile JScript files on the fly and bypassing application whitelisting.
references:
- https://lolbas-project.github.io/lolbas/Binaries/Jsc/
- https://www.phpied.com/make-your-javascript-a-windows-exe/
- https://twitter.com/DissectMalware/status/998797808907046913
author: frack113
date: 2022-05-02
modified: 2024-04-24
tags:
- attack.execution
- attack.stealth
- attack.t1127
logsource:
product: windows
category: process_creation
detection:
selection:
- Image|endswith: '\jsc.exe'
- OriginalFileName: 'jsc.exe'
condition: selection
falsepositives:
- Legitimate use to compile JScript by developers.
# Note: Can be decreased to informational or increased to medium depending on how this utility is used.
level: low
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
- Image|endswith: '\jsc.exe'
- OriginalFileName: 'jsc.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with value:"\jsc.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"jsc.exe" |
LiveKD Driver Creation
#Detects the creation of the LiveKD driver, which is used for live kernel debugging
Known False Positives
- Legitimate usage of LiveKD for debugging purposes will also trigger this
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | No specific technique |
| Stealth | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: LiveKD Driver Creation
id: 16fe46bb-4f64-46aa-817d-ff7bec4a2352
status: test
description: Detects the creation of the LiveKD driver, which is used for live kernel debugging
references:
- Internal Research
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-05-16
tags:
- attack.privilege-escalation
- attack.stealth
logsource:
product: windows
category: file_event
detection:
selection:
TargetFilename: 'C:\Windows\System32\drivers\LiveKdD.SYS'
Image|endswith:
- '\livekd.exe'
- '\livek64.exe'
condition: selection
falsepositives:
- Legitimate usage of LiveKD for debugging purposes will also trigger this
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetFilename: 'C:\Windows\System32\drivers\LiveKdD.SYS'
Image|endswith:
- '\livekd.exe'
- '\livek64.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with |
TargetFilename | eq |
| field:"TargetFilename" kind:eq value:"C:\Windows\System32\drivers\LiveKdD.SYS" |
LSASS Access From Non System Account
#Detects potential mimikatz-like tools accessing LSASS from non system account
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Telemetry Coverage
Rule Body
title: LSASS Access From Non System Account
id: 962fe167-e48d-4fd6-9974-11e5b9a5d6d1
status: test
description: Detects potential mimikatz-like tools accessing LSASS from non system account
references:
- https://threathunterplaybook.com/hunts/windows/170105-LSASSMemoryReadAccess/notebook.html
author: Roberto Rodriguez @Cyb3rWard0g
date: 2019-06-20
modified: 2023-12-11
tags:
- attack.credential-access
- attack.t1003.001
logsource:
product: windows
service: security
detection:
selection:
EventID:
- 4663
- 4656
AccessMask:
- '0x100000'
- '0x1010' # car.2019-04-004
- '0x1400'
- '0x1410' # car.2019-04-004
- '0x1418' # car.2019-04-004
- '0x1438' # car.2019-04-004
- '0x143a' # car.2019-04-004
- '0x1f0fff'
- '0x1f1fff'
- '0x1f2fff'
- '0x1f3fff'
- '0x40'
- '143a' # car.2019-04-004
- '1f0fff'
- '1f1fff'
- '1f2fff'
- '1f3fff'
# - '0x1000' # minimum access requirements to query basic info from service
ObjectType: 'Process'
ObjectName|endswith: '\lsass.exe'
filter_main_service_account:
SubjectUserName|endswith: '$'
filter_main_generic:
ProcessName|contains:
# Legitimate AV and EDR solutions
- ':\Program Files\'
- ':\Program Files (x86)\'
filter_main_wmiprvse:
ProcessName: 'C:\Windows\System32\wbem\WmiPrvSE.exe'
AccessMask: '0x1410'
filter_optional_steam:
ProcessName|contains: '\SteamLibrary\steamapps\'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_* and not 1 of filter_optional_*Stage 1: selection
selection:
EventID:
- 4663
- 4656
AccessMask:
- '0x100000'
- '0x1010'
- '0x1400'
- '0x1410'
- '0x1418'
- '0x1438'
- '0x143a'
- '0x1f0fff'
- '0x1f1fff'
- '0x1f2fff'
- '0x1f3fff'
- '0x40'
- '143a'
- '1f0fff'
- '1f1fff'
- '1f2fff'
- '1f3fff'
ObjectType: 'Process'
ObjectName|endswith: '\lsass.exe'
Stage 2: not filter_main_*
filter_main_service_account:
SubjectUserName|endswith: '$'
filter_main_generic:
ProcessName|contains:
- ':\Program Files\'
- ':\Program Files (x86)\'
filter_main_wmiprvse:
ProcessName: 'C:\Windows\System32\wbem\WmiPrvSE.exe'
AccessMask: '0x1410'
Stage 3: not filter_optional_steam
filter_optional_steam:
ProcessName|contains: '\SteamLibrary\steamapps\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
AccessMask | eq |
| field:"AccessMask" kind:eq |
ObjectName | ends_with |
| field:"ObjectName" kind:ends_with value:"\lsass.exe" |
ObjectType | eq |
| field:"ObjectType" kind:eq value:"Process" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
AccessMask | eq | 0x1410 | excludes:AccessMask field:"AccessMask" value:"0x1410" |
ProcessName | eq | C:\Windows\System32\wbem\WmiPrvSE.exe | excludes:ProcessName field:"ProcessName" value:"C:\Windows\System32\wbem\WmiPrvSE.exe" |
ProcessName | match | :\Program Files (x86)\ | excludes:ProcessName field:"ProcessName" value:":\Program Files (x86)\" |
ProcessName | match | :\Program Files\ | excludes:ProcessName field:"ProcessName" value:":\Program Files\" |
SubjectUserName | ends_with | $ | excludes:SubjectUserName field:"SubjectUserName" value:"$" |
ProcessName | match | \SteamLibrary\steamapps\ | excludes:ProcessName field:"ProcessName" value:"\SteamLibrary\steamapps\" |
Pnscan Binary Data Transmission Activity
#Detects command line patterns associated with the use of Pnscan for sending and receiving binary data across the network. This behavior has been identified in a Linux malware campaign targeting Docker, Apache Hadoop, Redis, and Confluence and was previously used by the threat actor known as TeamTNT
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Linux | Event ID 1: Process Create |
Rule Body
title: Pnscan Binary Data Transmission Activity
id: 97de11cd-4b67-4abf-9a8b-1020e670aa9e
status: test
description: |
Detects command line patterns associated with the use of Pnscan for sending and receiving binary data across the network.
This behavior has been identified in a Linux malware campaign targeting Docker, Apache Hadoop, Redis, and Confluence and was previously used by the threat actor known as TeamTNT
author: David Burkett (@signalblur)
date: 2024-04-16
references:
- https://www.cadosecurity.com/blog/spinning-yarn-a-new-linux-malware-campaign-targets-docker-apache-hadoop-redis-and-confluence
- https://intezer.com/wp-content/uploads/2021/09/TeamTNT-Cryptomining-Explosion.pdf
- https://regex101.com/r/RugQYK/1
- https://www.virustotal.com/gui/file/beddf70a7bab805f0c0b69ac0989db6755949f9f68525c08cb874988353f78a9/content
tags:
- attack.discovery
- attack.t1046
logsource:
category: process_creation
product: linux
detection:
selection:
CommandLine|re: -(W|R)\s?(\s|"|')([0-9a-fA-F]{2}\s?){2,20}(\s|"|')
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|re: -(W|R)\s?(\s|"|')([0-9a-fA-F]{2}\s?){2,20}(\s|"|')
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | regex_match |
| field:"CommandLine" kind:regex_match |
Potentially Suspicious DLL Registered Via Odbcconf.EXE
#Detects execution of "odbcconf" with the "REGSVR" action where the DLL in question doesn't contain a ".dll" extension. Which is often used as a method to evade defenses.
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Potentially Suspicious DLL Registered Via Odbcconf.EXE
id: ba4cfc11-d0fa-4d94-bf20-7c332c412e76
related:
- id: 9f0a8bf3-a65b-440a-8c1e-5cb1547c8e70
type: derived
status: test
description: Detects execution of "odbcconf" with the "REGSVR" action where the DLL in question doesn't contain a ".dll" extension. Which is often used as a method to evade defenses.
references:
- https://learn.microsoft.com/en-us/sql/odbc/odbcconf-exe?view=sql-server-ver16
- https://lolbas-project.github.io/lolbas/Binaries/Odbcconf/
- https://www.trendmicro.com/en_us/research/17/h/backdoor-carrying-emails-set-sights-on-russian-speaking-businesses.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-05-22
tags:
- attack.stealth
- attack.t1218.008
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\odbcconf.exe'
- OriginalFileName: 'odbcconf.exe'
selection_cli:
# Note: The "/A" flag is not required to call a specific action
CommandLine|contains: 'REGSVR '
filter_main_dll_ext:
CommandLine|contains: '.dll'
condition: all of selection_* and not 1 of filter_main_*
falsepositives:
- Unlikely
level: high
Stages and Predicates
Stage 0: condition
all of selection_* and not 1 of filter_main_*Stage 1: selection_img
selection_img:
- Image|endswith: '\odbcconf.exe'
- OriginalFileName: 'odbcconf.exe'
Stage 2: selection_cli
selection_cli:
CommandLine|contains: 'REGSVR '
Stage 3: not filter_main_dll_ext
filter_main_dll_ext:
CommandLine|contains: '.dll'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:"REGSVR " |
Image | ends_with |
| field:"Image" kind:ends_with value:"\odbcconf.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"odbcconf.exe" |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
CommandLine | match | .dll | excludes:CommandLine field:"CommandLine" value:".dll" |
PowerShell Hotfix Enumeration
#Detects call to "Win32_QuickFixEngineering" in order to enumerate installed hotfixes often used in "enum" scripts by attackers
Known False Positives
- Legitimate administration scripts
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: PowerShell Hotfix Enumeration
id: f5d1def8-1de0-4a0e-9794-1f6f27dd605c
status: test
description: Detects call to "Win32_QuickFixEngineering" in order to enumerate installed hotfixes often used in "enum" scripts by attackers
references:
- https://github.com/411Hall/JAWS/blob/233f142fcb1488172aa74228a666f6b3c5c48f1d/jaws-enum.ps1
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-06-21
tags:
- attack.discovery
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains|all:
- 'Win32_QuickFixEngineering'
- 'HotFixID'
condition: selection
falsepositives:
- Legitimate administration scripts
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ScriptBlockText|contains|all:
- 'Win32_QuickFixEngineering'
- 'HotFixID'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
PSEXEC Remote Execution File Artefact
#Detects creation of the PSEXEC key file. Which is created anytime a PsExec command is executed. It gets written to the file system and will be recorded in the USN Journal on the target system
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation | |
| Lateral Movement |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 11: FileCreate |
Rule Body
title: PSEXEC Remote Execution File Artefact
id: 304afd73-55a5-4bb9-8c21-0b1fc84ea9e4
status: test
description: Detects creation of the PSEXEC key file. Which is created anytime a PsExec command is executed. It gets written to the file system and will be recorded in the USN Journal on the target system
references:
- https://aboutdfir.com/the-key-to-identify-psexec/
- https://twitter.com/davisrichardg/status/1616518800584704028
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-21
modified: 2023-02-23
tags:
- attack.lateral-movement
- attack.privilege-escalation
- attack.execution
- attack.persistence
- attack.t1136.002
- attack.t1543.003
- attack.t1570
- attack.s0029
logsource:
category: file_event
product: windows
detection:
selection:
TargetFilename|startswith: 'C:\Windows\PSEXEC-'
TargetFilename|endswith: '.key'
condition: selection
falsepositives:
- Unlikely
level: high
regression_tests_path: regression_data/rules/windows/file/file_event/file_event_win_sysinternals_psexec_service_key/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetFilename|startswith: 'C:\Windows\PSEXEC-'
TargetFilename|endswith: '.key'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with value:".key" |
TargetFilename | starts_with |
| field:"TargetFilename" kind:starts_with value:"C:\Windows\PSEXEC-" |
PUA - RemCom Default Named Pipe
#Detects default RemCom pipe creation
Known False Positives
- Legitimate Administrator activity
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Lateral Movement |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 17: PipeEvent (Pipe Created) |
| Sysmon | Event ID 18: PipeEvent (Pipe Connected) |
Rule Body
title: PUA - RemCom Default Named Pipe
id: d36f87ea-c403-44d2-aa79-1a0ac7c24456
related:
- id: 9e77ed63-2ecf-4c7b-b09d-640834882028
type: obsolete
status: test
description: Detects default RemCom pipe creation
references:
- https://drive.google.com/file/d/1lKya3_mLnR3UQuCoiYruO3qgu052_iS_/view
- https://github.com/kavika13/RemCom
author: Nikita Nazarov, oscd.community, Nasreddine Bencherchali (Nextron Systems)
date: 2023-08-07
modified: 2023-11-30
tags:
- attack.lateral-movement
- attack.t1021.002
- attack.execution
- attack.t1569.002
logsource:
product: windows
category: pipe_created
definition: 'Note that you have to configure logging for Named Pipe Events in Sysmon config (Event ID 17 and Event ID 18). The basic configuration is in popular sysmon configuration (https://github.com/SwiftOnSecurity/sysmon-config), but it is worth verifying. You can also use other repo, e.g. https://github.com/Neo23x0/sysmon-config, https://github.com/olafhartong/sysmon-modular. How to test detection? You can check powershell script from this site https://svch0st.medium.com/guide-to-named-pipes-and-hunting-for-cobalt-strike-pipes-dc46b2c5f575'
detection:
selection:
PipeName|contains: '\RemCom'
condition: selection
falsepositives:
- Legitimate Administrator activity
level: medium
regression_tests_path: regression_data/rules/windows/pipe_created/pipe_created_pua_remcom_default_pipe/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
PipeName|contains: '\RemCom'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
PipeName | match |
| field:"PipeName" kind:match value:"\RemCom" |
Python Path Configuration File Creation - MacOS
#Detects creation of a Python path configuration file (.pth) in Python library folders, which can be maliciously abused for code execution and persistence. Modules referenced by these files are run at every Python startup (v3.5+), regardless of whether the module is imported by the calling script. Default paths are '\lib\site-packages*.pth' (Windows) and '/lib/pythonX.Y/site-packages/*.pth' (Unix and macOS).
Known False Positives
- Although .pth files are discouraged due to potential security implications, these are legitimate files by specification.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
Rule Body
title: Python Path Configuration File Creation - MacOS
id: 4f394635-13ef-4599-b677-3353e0f84f55
related:
- id: e3652ba3-0ad8-4010-a957-b7ba369e7bac # Windows
type: similar
- id: fb96c26c-9f85-4ae7-af0d-ed1ed1f1f5ce # Linux
type: similar
status: test
description: |
Detects creation of a Python path configuration file (.pth) in Python library folders, which can be maliciously abused for code execution and persistence.
Modules referenced by these files are run at every Python startup (v3.5+), regardless of whether the module is imported by the calling script.
Default paths are '\lib\site-packages\*.pth' (Windows) and '/lib/pythonX.Y/site-packages/*.pth' (Unix and macOS).
references:
- https://www.volexity.com/blog/2024/04/12/zero-day-exploitation-of-unauthenticated-remote-code-execution-vulnerability-in-globalprotect-cve-2024-3400/
- https://www.virustotal.com/gui/file/3de2a4392b8715bad070b2ae12243f166ead37830f7c6d24e778985927f9caac
- https://docs.python.org/3/library/site.html
author: Andreas Braathen (mnemonic.io)
date: 2024-04-25
tags:
- attack.execution
- attack.t1059.006
- detection.threat-hunting
logsource:
product: macos
category: file_event
detection:
selection:
TargetFilename|re: '(?i)/lib/python3\.([5-9]|[0-9]{2})/site-packages/' # Unix and macOS
TargetFilename|endswith: '.pth'
condition: selection
falsepositives:
- Although .pth files are discouraged due to potential security implications, these are legitimate files by specification.
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
TargetFilename|re: '(?i)/lib/python3\.([5-9]|[0-9]{2})/site-packages/'
TargetFilename|endswith: '.pth'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
TargetFilename | ends_with |
| field:"TargetFilename" kind:ends_with value:".pth" |
TargetFilename | regex_match |
| field:"TargetFilename" kind:regex_match value:"(?i)/lib/python3.([5-9]|[0-9]{2})/site-packages/" |
Qakbot Rundll32 Fake DLL Extension Execution
#Detects specific process tree behavior of a "rundll32" execution where the DLL doesn't have the ".dll" extension. This is often linked with potential Qakbot activity.
Known False Positives
- Unlikely
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | No specific technique |
| Stealth | No specific technique |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Qakbot Rundll32 Fake DLL Extension Execution
id: bfd34392-c591-4009-b938-9fd985a28b85
status: test
description: Detects specific process tree behavior of a "rundll32" execution where the DLL doesn't have the ".dll" extension. This is often linked with potential Qakbot activity.
references:
- https://github.com/pr0xylife/Qakbot/
author: X__Junior (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2023-05-24
tags:
- attack.execution
- detection.emerging-threats
- attack.stealth
logsource:
product: windows
category: process_creation
detection:
selection:
ParentImage|endswith:
# Note: Only add processes seen used by Qakbot to avoid collision with other strains of malware
- '\cmd.exe'
- '\cscript.exe'
- '\curl.exe'
- '\mshta.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wscript.exe'
Image|endswith: '\rundll32.exe'
CommandLine|contains:
# Note: Only add paths seen used by Qakbot to avoid collision with other strains of malware
- ':\ProgramData\'
- ':\Users\Public\'
- '\AppData\Local\Temp\'
- '\AppData\Roaming\'
filter_main_extension:
CommandLine|contains: '.dll'
condition: selection and not 1 of filter_main_*
falsepositives:
- Unlikely
level: critical
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
ParentImage|endswith:
- '\cmd.exe'
- '\cscript.exe'
- '\curl.exe'
- '\mshta.exe'
- '\powershell.exe'
- '\pwsh.exe'
- '\wscript.exe'
Image|endswith: '\rundll32.exe'
CommandLine|contains:
- ':\ProgramData\'
- ':\Users\Public\'
- '\AppData\Local\Temp\'
- '\AppData\Roaming\'
Stage 2: not filter_main_extension
filter_main_extension:
CommandLine|contains: '.dll'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with value:"\rundll32.exe" |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with |
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
CommandLine | match | .dll | excludes:CommandLine field:"CommandLine" value:".dll" |
RDP shadow session started (native)
#Detects scenarios where an attacker has initiated a RDP shadow session.
Known False Positives
- target host where shadowing is performed
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement | |
| Collection |
Telemetry Coverage
Rule Body
title: RDP shadow session started (native)
description: Detects scenarios where an attacker has initiated a RDP shadow session.
references:
- http://woshub.com/rds-shadow-how-to-connect-to-a-user-session-in-windows-server-2012-r2/
- https://www.elastic.co/guide/en/security/current/potential-remote-desktop-shadowing-activity.html
- https://bitsadm.in/blog/spying-on-users-using-rdp-shadowing
- https://swarm.ptsecurity.com/remote-desktop-services-shadowing/
tags:
- attack.lateral_movement
- attack.t1021.001 # remote services: RDP
- attack.collection
- attack.t1113 # screen capture
- attack.t1125 # video capture
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: rdp
detection:
selection:
EventID:
- 20503 # Shadow View Session Started
- 20504 # Shadow View Session Stopped
- 20508 # Shadow View Permission Granted
Channel: Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational
condition: selection
falsepositives:
- target host where shadowing is performed
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventID:
- 20503
- 20504
- 20508
Channel: Microsoft-Windows-TerminalServices-RemoteConnectionManager/Operational
Remote Access Tool - Team Viewer Session Started On Linux Host
#Detects the command line executed when TeamViewer starts a session started by a remote host. Once a connection has been started, an investigator can verify the connection details by viewing the "incoming_connections.txt" log file in the TeamViewer folder.
Known False Positives
- Legitimate usage of TeamViewer
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Initial Access | |
| Persistence |
Telemetry Coverage
| Platform | Record / event type |
|---|---|
| Linux | Event ID 1: Process Create |
Rule Body
title: Remote Access Tool - Team Viewer Session Started On Linux Host
id: 1f6b8cd4-3e60-47cc-b282-5aa1cbc9182d
related:
- id: ab70c354-d9ac-4e11-bbb6-ec8e3b153357
type: similar
- id: f459ccb4-9805-41ea-b5b2-55e279e2424a
type: similar
status: test
description: |
Detects the command line executed when TeamViewer starts a session started by a remote host.
Once a connection has been started, an investigator can verify the connection details by viewing the "incoming_connections.txt" log file in the TeamViewer folder.
references:
- Internal Research
author: Josh Nickels, Qi Nan
date: 2024-03-11
tags:
- attack.persistence
- attack.initial-access
- attack.t1133
logsource:
category: process_creation
product: linux
detection:
selection:
ParentImage|endswith: '/TeamViewer_Service'
Image|endswith: '/TeamViewer_Desktop'
CommandLine|endswith: '/TeamViewer_Desktop --IPCport 5939 --Module 1'
condition: selection
falsepositives:
- Legitimate usage of TeamViewer
level: low
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ParentImage|endswith: '/TeamViewer_Service'
Image|endswith: '/TeamViewer_Desktop'
CommandLine|endswith: '/TeamViewer_Desktop --IPCport 5939 --Module 1'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | ends_with |
| field:"CommandLine" kind:ends_with value:"/TeamViewer_Desktop --IPCport 5939 --Module 1" |
Image | ends_with |
| field:"Image" kind:ends_with value:"/TeamViewer_Desktop" |
ParentImage | ends_with |
| field:"ParentImage" kind:ends_with value:"/TeamViewer_Service" |
Renamed Powershell Under Powershell Channel
#Detects a renamed Powershell execution, which is a common technique used to circumvent security controls and bypass detection logic that's dependent on process names and process paths.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Stealth |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 400 |
Rule Body
title: Renamed Powershell Under Powershell Channel
id: 30a8cb77-8eb3-4cfb-8e79-ad457c5a4592
status: test
description: |
Detects a renamed Powershell execution, which is a common technique used to circumvent security controls and bypass detection logic that's dependent on process names and process paths.
references:
- https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse
author: Harish Segar, frack113
date: 2020-06-29
modified: 2025-01-20
tags:
- attack.execution
- attack.stealth
- attack.t1059.001
- attack.t1036.003
logsource:
product: windows
category: ps_classic_start
detection:
selection:
Data|contains: 'HostName=ConsoleHost'
# Note: Powershell Logging Data is localized. Meaning that "HostApplication" field will be translated to a different field on a non english layout. This rule doesn't take this into account due to the sheer amount of possibilities. It's up to the user to add these cases.
filter_main_ps:
Data|contains:
- 'HostApplication=powershell'
- 'HostApplication=C:\Windows\System32\WindowsPowerShell\v1.0\powershell'
- 'HostApplication=C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell'
# In some cases powershell was invoked with inverted slashes
- 'HostApplication=C:/Windows/System32/WindowsPowerShell/v1.0/powershell'
- 'HostApplication=C:/Windows/SysWOW64/WindowsPowerShell/v1.0/powershell'
- 'HostApplication=C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe'
- 'HostApplication=C:\\\\WINDOWS\\\\SysWOW64\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe'
filter_main_host_application_null:
# Note: Since we're using the raw data field to match. There is no easy way to filter out cases where the "HostApplication" field is null (i.e doesn't exist). We're practically forced to use a regex.
# If you're already mapping and extracting the field, then obviously use that directly.
Data|re: 'HostId=[a-zA-Z0-9-]{36}\s+EngineVersion='
condition: selection and not 1 of filter_main_*
falsepositives:
- Unknown
level: low
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_*Stage 1: selection
selection:
Data|contains: 'HostName=ConsoleHost'
Stage 2: not filter_main_*
filter_main_ps:
Data|contains:
- 'HostApplication=powershell'
- 'HostApplication=C:\Windows\System32\WindowsPowerShell\v1.0\powershell'
- 'HostApplication=C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell'
- 'HostApplication=C:/Windows/System32/WindowsPowerShell/v1.0/powershell'
- 'HostApplication=C:/Windows/SysWOW64/WindowsPowerShell/v1.0/powershell'
- 'HostApplication=C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe'
- 'HostApplication=C:\\\\WINDOWS\\\\SysWOW64\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe'
filter_main_host_application_null:
Data|re: 'HostId=[a-zA-Z0-9-]{36}\s+EngineVersion='
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Data | match |
| field:"Data" kind:match value:"HostName=ConsoleHost" |
Exclusions
The rule actively suppresses these predicates.
Security package (SSP) added (Reg via command)
#Detects scenarios where an attacker adds a reference in the registry to a malicious SSP (Security Support Provider). Note that this rule will not work with "in memory" SSP injection (Mimikatz).
Known False Positives
- None
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Security package (SSP) added (Reg via command)
description: Detects scenarios where an attacker adds a reference in the registry to a malicious SSP (Security Support Provider). Note that this rule will not work with "in memory" SSP injection (Mimikatz).
references:
- https://twitter.com/JohnLaTwC/status/1417106953881497602?s=09
- https://blog.xpnsec.com/exploring-mimikatz-part-2/
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4622
- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn408187(v=ws.11)?redirectedfrom=MSDN
- https://pentestlab.blog/2019/10/21/persistence-security-support-provider/
- https://www.ired.team/offensive-security/credential-access-and-credential-dumping/intercepting-logon-credentials-via-custom-security-support-provider-and-authentication-package
- https://securityintelligence.com/posts/hunting-evidence-dll-side-loading-powershell-sysmon/
- https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16
- https://github.com/S1ckB0y1337/Active-Directory-Exploitation-Cheat-Sheet#custom-ssp
- https://www.sentinelone.com/blog/how-attackers-exploit-security-support-provider-ssp-for-credential-dumping/
tags:
- attack.persistence
- attack.t1547.008
author: mdecrevoisier
status: experimental
logsource:
product: windows
category: process_creation
detection: # reg add "hklm\system\currentcontrolset\control\lsa\" /v "Security Packages" /d "kerberos\0msv1_0\0schannel\0wdigest\0tspkg\0pku2u\0mimilib" /t REG_MULTI_SZ
selection:
NewProcessName|endswith: '\reg.exe'
CommandLine|contains|all:
- 'REG ADD'
- '\SYSTEM\CurrentControlSet\Control\Lsa'
- 'Security Packages'
condition: selection
falsepositives:
- None
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
NewProcessName|endswith: '\reg.exe'
CommandLine|contains|all:
- 'REG ADD'
- '\SYSTEM\CurrentControlSet\Control\Lsa'
- 'Security Packages'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
NewProcessName | ends_with |
| field:"Image" kind:ends_with value:"\reg.exe" |
Service Installation with Suspicious Folder Pattern
#Detects service installation with suspicious folder patterns
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Persistence | |
| Privilege Escalation |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Service-Control-Manager | Event ID 7045: A service was installed in the system. |
Rule Body
title: Service Installation with Suspicious Folder Pattern
id: 1b2ae822-6fe1-43ba-aa7c-d1a3b3d1d5f2
status: test
description: Detects service installation with suspicious folder patterns
references:
- Internal Research
author: pH-T (Nextron Systems)
date: 2022-03-18
modified: 2022-03-24
tags:
- attack.persistence
- attack.privilege-escalation
- car.2013-09-005
- attack.t1543.003
logsource:
product: windows
service: system
detection:
selection_eid:
Provider_Name: 'Service Control Manager'
EventID: 7045
selection_img_paths:
- ImagePath|re: '^[Cc]:\\[Pp]rogram[Dd]ata\\.{1,9}\.exe'
- ImagePath|re: '^[Cc]:\\.{1,9}\.exe'
condition: all of selection_*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_eid
selection_eid:
Provider_Name: 'Service Control Manager'
EventID: 7045
Stage 2: selection_img_paths
selection_img_paths:
- ImagePath|re: '^[Cc]:\\[Pp]rogram[Dd]ata\\.{1,9}\.exe'
- ImagePath|re: '^[Cc]:\\.{1,9}\.exe'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImagePath | regex_match |
| field:"ImagePath" kind:regex_match |
Provider_Name | eq |
| field:"Provider_Name" kind:eq value:"Service Control Manager" |
SharpHound Recon Sessions
#Detects remote RPC calls useb by SharpHound to map remote connections and local group membership.
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Discovery |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| RPCFW | Event ID 3: An RPC server function was called. |
Rule Body
title: SharpHound Recon Sessions
id: 6d580420-ff3f-4e0e-b6b0-41b90c787e28
status: test
description: Detects remote RPC calls useb by SharpHound to map remote connections and local group membership.
references:
- https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-srvs/02b1f559-fda2-4ba3-94c2-806eb2777183
- https://github.com/jsecurity101/MSRPC-to-ATTACK/blob/ddd4608fe8684fcf2fcf9b48c5f0b3c28097f8a3/documents/MS-SRVS.md
- https://github.com/zeronetworks/rpcfirewall
- https://zeronetworks.com/blog/stopping-lateral-movement-via-the-rpc-firewall/
author: Sagie Dulce, Dekel Paz
date: 2022-01-01
tags:
- attack.discovery
- attack.t1033
logsource:
product: rpc_firewall
category: application
definition: 'Requirements: install and apply the RPC Firewall to all processes with "audit:true action:block uuid:4b324fc8-1670-01d3-1278-5a47bf6ee188 opnum:12'
detection:
selection:
EventLog: RPCFW
EventID: 3
InterfaceUuid: 4b324fc8-1670-01d3-1278-5a47bf6ee188
OpNum: 12
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
EventLog: RPCFW
EventID: 3
InterfaceUuid: 4b324fc8-1670-01d3-1278-5a47bf6ee188
OpNum: 12
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventLog | eq |
| field:"EventLog" kind:eq value:"RPCFW" |
InterfaceUuid | eq |
| field:"InterfaceUuid" kind:eq value:"4b324fc8-1670-01d3-1278-5a47bf6ee188" |
OpNum | eq |
| field:"OpNum" kind:eq value:"12" |
Suspicious Execution of Shutdown
#Use of the commandline to shutdown or reboot windows
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Impact |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Suspicious Execution of Shutdown
id: 34ebb878-1b15-4895-b352-ca2eeb99b274
status: test
description: Use of the commandline to shutdown or reboot windows
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1529/T1529.md
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/shutdown
author: frack113
date: 2022-01-01
tags:
- attack.impact
- attack.t1529
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\shutdown.exe'
CommandLine|contains:
- '/r '
- '/s '
condition: selection
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image|endswith: '\shutdown.exe'
CommandLine|contains:
- '/r '
- '/s '
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with value:"\shutdown.exe" |
Suspicious Log Entries
#Detects suspicious log entries in Linux log files
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Impact | No specific technique |
Rule Body
title: Suspicious Log Entries
id: f64b6e9a-5d9d-48a5-8289-e1dd2b3876e1
status: test
description: Detects suspicious log entries in Linux log files
references:
- https://github.com/ossec/ossec-hids/blob/f6502012b7380208db81f82311ad4a1994d39905/etc/rules/syslog_rules.xml
author: Florian Roth (Nextron Systems)
date: 2017-03-25
modified: 2021-11-27
tags:
- attack.impact
logsource:
product: linux
detection:
keywords:
# Generic suspicious log lines
- 'entered promiscuous mode'
# OSSEC https://github.com/ossec/ossec-hids/blob/master/etc/rules/syslog_rules.xml
- 'Deactivating service'
- 'Oversized packet received from'
- 'imuxsock begins to drop messages'
condition: keywords
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
keywordsStage 1: keywords
keywords:
- 'entered promiscuous mode'
- 'Deactivating service'
- 'Oversized packet received from'
- 'imuxsock begins to drop messages'
Suspicious RDP Redirect Using TSCON
#Detects a suspicious RDP session redirect using tscon.exe
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Lateral Movement |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Suspicious RDP Redirect Using TSCON
id: f72aa3e8-49f9-4c7d-bd74-f8ab84ff9bbb
status: test
description: Detects a suspicious RDP session redirect using tscon.exe
references:
- http://www.korznikov.com/2017/03/0-day-or-feature-privilege-escalation.html
- https://medium.com/@networksecurity/rdp-hijacking-how-to-hijack-rds-and-remoteapp-sessions-transparently-to-move-through-an-da2a1e73a5f6
- https://www.hackingarticles.in/rdp-session-hijacking-with-tscon/
author: Florian Roth (Nextron Systems)
date: 2018-03-17
modified: 2023-05-16
tags:
- attack.lateral-movement
- attack.t1563.002
- attack.t1021.001
- car.2013-07-002
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains: ' /dest:rdp-tcp#'
condition: selection
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|contains: ' /dest:rdp-tcp#'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match value:" /dest:rdp-tcp#" |
Suspicious Recursive Takeown
#Adversaries can interact with the DACLs using built-in Windows commands takeown which can grant adversaries higher permissions on specific files and folders
Known False Positives
- Scripts created by developers and admins
- Administrative activity
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Suspicious Recursive Takeown
id: 554601fb-9b71-4bcc-abf4-21a611be4fde
status: test
description: Adversaries can interact with the DACLs using built-in Windows commands takeown which can grant adversaries higher permissions on specific files and folders
references:
- https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/takeown
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1222.001/T1222.001.md#atomic-test-1---take-ownership-using-takeown-utility
author: frack113
date: 2022-01-30
modified: 2022-11-21
tags:
- attack.defense-impairment
- attack.t1222.001
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith: '\takeown.exe'
CommandLine|contains|all:
- '/f '
- '/r'
condition: selection
falsepositives:
- Scripts created by developers and admins
- Administrative activity
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_takeown_recursive_own/info.yml
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Image|endswith: '\takeown.exe'
CommandLine|contains|all:
- '/f '
- '/r'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with value:"\takeown.exe" |
Suspicious SSL Connection
#Adversaries may employ a known encryption algorithm to conceal command and control traffic rather than relying on any inherent protections provided by a communication protocol.
Known False Positives
- Legitimate administrative script
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| PowerShell | Event ID 4104: Creating Scriptblock text (MessageNumber of MessageTotal). |
Rule Body
title: Suspicious SSL Connection
id: 195626f3-5f1b-4403-93b7-e6cfd4d6a078
status: test
description: Adversaries may employ a known encryption algorithm to conceal command and control traffic rather than relying on any inherent protections provided by a communication protocol.
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1573/T1573.md#atomic-test-1---openssl-c2
- https://medium.com/walmartglobaltech/openssl-server-reverse-shell-from-windows-client-aee2dbfa0926
author: frack113
date: 2022-01-23
tags:
- attack.command-and-control
- attack.t1573
logsource:
product: windows
category: ps_script
definition: 'Requirements: Script Block Logging must be enabled'
detection:
selection:
ScriptBlockText|contains|all:
- System.Net.Security.SslStream
- Net.Security.RemoteCertificateValidationCallback
- '.AuthenticateAsClient'
condition: selection
falsepositives:
- Legitimate administrative script
level: low
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
ScriptBlockText|contains|all:
- System.Net.Security.SslStream
- Net.Security.RemoteCertificateValidationCallback
- '.AuthenticateAsClient'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ScriptBlockText | match |
| field:"ScriptBlockText" kind:match |
Tap Driver Installation
#Well-known TAP software installation. Possible preparation for data exfiltration using tunnelling techniques
Known False Positives
- Legitimate OpenVPN TAP installation
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Exfiltration |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Service-Control-Manager | Event ID 7045: A service was installed in the system. |
Rule Body
title: Tap Driver Installation
id: 8e4cf0e5-aa5d-4dc3-beff-dc26917744a9
status: test
description: Well-known TAP software installation. Possible preparation for data exfiltration using tunnelling techniques
references:
- https://community.openvpn.net/openvpn/wiki/ManagingWindowsTAPDrivers
author: Daniil Yugoslavskiy, Ian Davis, oscd.community
date: 2019-10-24
modified: 2022-12-25
tags:
- attack.exfiltration
- attack.t1048
logsource:
product: windows
service: system
detection:
selection:
Provider_Name: 'Service Control Manager'
EventID: 7045
ImagePath|contains: 'tap0901'
condition: selection
falsepositives:
- Legitimate OpenVPN TAP installation
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
Provider_Name: 'Service Control Manager'
EventID: 7045
ImagePath|contains: 'tap0901'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ImagePath | match |
| field:"ImagePath" kind:match value:"tap0901" |
Provider_Name | eq |
| field:"Provider_Name" kind:eq value:"Service Control Manager" |
Unsigned DLL Loaded by Windows Utility
#Detects windows utilities loading an unsigned or untrusted DLL. Adversaries often abuse those programs to proxy execution of malicious code.
MITRE ATT&CK Coverage
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 7: Image loaded |
Rule Body
title: Unsigned DLL Loaded by Windows Utility
id: b5de0c9a-6f19-43e0-af4e-55ad01f550af
status: test
description: |
Detects windows utilities loading an unsigned or untrusted DLL.
Adversaries often abuse those programs to proxy execution of malicious code.
references:
- https://www.elastic.co/security-labs/Hunting-for-Suspicious-Windows-Libraries-for-Execution-and-Evasion
- https://akhere.hashnode.dev/hunting-unsigned-dlls-using-kql
- https://unit42.paloaltonetworks.com/unsigned-dlls/?web_view=true
author: Swachchhanda Shrawan Poudel
date: 2024-02-28
modified: 2025-10-07
tags:
- attack.stealth
- attack.t1218.011
- attack.t1218.010
logsource:
product: windows
category: image_load
detection:
selection:
Image|endswith:
# Note: Add additional utilities that allow the loading of DLLs
- '\InstallUtil.exe'
- '\RegAsm.exe'
- '\RegSvcs.exe'
- '\regsvr32.exe'
- '\rundll32.exe'
filter_main_signed:
Signed: 'true'
filter_main_sig_status:
SignatureStatus:
- 'errorChaining'
- 'errorCode_endpoint'
- 'errorExpired'
- 'trusted'
- 'Valid'
filter_main_signed_null:
Signed: null
filter_main_signed_empty:
Signed:
- ''
- '-'
filter_main_sig_status_null:
SignatureStatus: null
filter_main_sig_status_empty:
SignatureStatus:
- ''
- '-'
filter_main_windows_installer:
Image:
- 'C:\Windows\SysWOW64\rundll32.exe'
- 'C:\Windows\System32\rundll32.exe'
ImageLoaded|startswith: 'C:\Windows\Installer\'
ImageLoaded|endswith:
- '.tmp-\Microsoft.Deployment.WindowsInstaller.dll'
- '.tmp-\Avira.OE.Setup.CustomActions.dll'
filter_main_assembly:
Image|startswith:
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\System32\'
- 'C:\Windows\Microsoft.NET\Framework64'
Image|endswith: '\RegAsm.exe'
ImageLoaded|endswith: '.dll'
ImageLoaded|startswith: 'C:\Windows\assembly\NativeImages'
filter_optional_klite_codec:
Image:
- 'C:\Windows\SysWOW64\regsvr32.exe'
- 'C:\Windows\System32\regsvr32.exe'
ImageLoaded|startswith:
- 'C:\Program Files (x86)\K-Lite Codec Pack\'
- 'C:\Program Files\K-Lite Codec Pack\'
condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
- Unknown
level: medium
Stages and Predicates
Stage 0: condition
selection and not 1 of filter_main_* and not 1 of filter_optional_*Stage 1: selection
selection:
Image|endswith:
- '\InstallUtil.exe'
- '\RegAsm.exe'
- '\RegSvcs.exe'
- '\regsvr32.exe'
- '\rundll32.exe'
Stage 2: not filter_main_*
filter_main_signed:
Signed: 'true'
filter_main_sig_status:
SignatureStatus:
- 'errorChaining'
- 'errorCode_endpoint'
- 'errorExpired'
- 'trusted'
- 'Valid'
filter_main_signed_null:
Signed: null
filter_main_signed_empty:
Signed:
- ''
- '-'
filter_main_sig_status_null:
SignatureStatus: null
filter_main_sig_status_empty:
SignatureStatus:
- ''
- '-'
filter_main_windows_installer:
Image:
- 'C:\Windows\SysWOW64\rundll32.exe'
- 'C:\Windows\System32\rundll32.exe'
ImageLoaded|startswith: 'C:\Windows\Installer\'
ImageLoaded|endswith:
- '.tmp-\Microsoft.Deployment.WindowsInstaller.dll'
- '.tmp-\Avira.OE.Setup.CustomActions.dll'
filter_main_assembly:
Image|startswith:
- 'C:\Windows\SysWOW64\'
- 'C:\Windows\System32\'
- 'C:\Windows\Microsoft.NET\Framework64'
Image|endswith: '\RegAsm.exe'
ImageLoaded|endswith: '.dll'
ImageLoaded|startswith: 'C:\Windows\assembly\NativeImages'
Stage 3: not filter_optional_klite_codec
filter_optional_klite_codec:
Image:
- 'C:\Windows\SysWOW64\regsvr32.exe'
- 'C:\Windows\System32\regsvr32.exe'
ImageLoaded|startswith:
- 'C:\Program Files (x86)\K-Lite Codec Pack\'
- 'C:\Program Files\K-Lite Codec Pack\'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
Image | ends_with |
| field:"Image" kind:ends_with |
Exclusions
The rule actively suppresses these predicates.
Windows Defender Definition Files Removed
#Adversaries may disable security tools to avoid possible detection of their tools and activities by removing Windows Defender Definition Files
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Defense Impairment |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule Body
title: Windows Defender Definition Files Removed
id: 9719a8aa-401c-41af-8108-ced7ec9cd75c
status: test
description: Adversaries may disable security tools to avoid possible detection of their tools and activities by removing Windows Defender Definition Files
references:
- https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1562.001/T1562.001.md
- https://unit42.paloaltonetworks.com/unit42-gorgon-group-slithering-nation-state-cybercrime/
author: frack113
date: 2021-07-07
modified: 2023-07-18
tags:
- attack.defense-impairment
- attack.t1685
logsource:
category: process_creation
product: windows
detection:
selection_img:
- Image|endswith: '\MpCmdRun.exe'
- OriginalFileName: MpCmdRun.exe
selection_cli:
CommandLine|contains|all:
- ' -RemoveDefinitions'
- ' -All'
condition: all of selection_*
falsepositives:
- Unknown
level: high
Stages and Predicates
Stage 0: condition
all of selection_*Stage 1: selection_img
selection_img:
- Image|endswith: '\MpCmdRun.exe'
- OriginalFileName: MpCmdRun.exe
Stage 2: selection_cli
selection_cli:
CommandLine|contains|all:
- ' -RemoveDefinitions'
- ' -All'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
Image | ends_with |
| field:"Image" kind:ends_with value:"\MpCmdRun.exe" |
OriginalFileName | eq |
| field:"OriginalFileName" kind:eq value:"MpCmdRun.exe" |
Wscript Shell Run In CommandLine
#Detects the presence of the keywords "Wscript", "Shell" and "Run" in the command, which could indicate a suspicious activity
Known False Positives
- Inline scripting can be used by some rare third party applications or administrators. Investigate and apply additional filters accordingly
MITRE ATT&CK Coverage
| Tactic | Techniques |
|---|---|
| Execution |
Telemetry Coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
Rule Body
title: Wscript Shell Run In CommandLine
id: 2c28c248-7f50-417a-9186-a85b223010ee
status: test
description: Detects the presence of the keywords "Wscript", "Shell" and "Run" in the command, which could indicate a suspicious activity
references:
- https://web.archive.org/web/20220830122045/http://blog.talosintelligence.com/2022/08/modernloader-delivers-multiple-stealers.html
- https://blog.talosintelligence.com/modernloader-delivers-multiple-stealers-cryptominers-and-rats/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-31
modified: 2023-05-15
tags:
- attack.execution
- attack.t1059
logsource:
category: process_creation
product: windows
detection:
selection:
CommandLine|contains|all:
- 'Wscript.'
- '.Shell'
- '.Run'
condition: selection
falsepositives:
- Inline scripting can be used by some rare third party applications or administrators. Investigate and apply additional filters accordingly
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
CommandLine|contains|all:
- 'Wscript.'
- '.Shell'
- '.Run'
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |