SOAR

Panther

1,492 rules · Sigma detections in Panther syntax
The same Sigma detection corpus, machine-rendered into Panther query syntax and ready to paste. Switch platforms above for identical coverage in another language, or choose Sigma (generic) for the portable YAML.
Using these Sigma rules
Deploy. Pick your SIEM above and paste the rendered query straight into a saved search or detection rule, or expand any rule to convert its generic YAML inline to the language you run.
Adapt. Map the field names to your log schema - Sigma assumes a normalised taxonomy - and tune thresholds and timeframes to your own baseline before you trust the alert.
Validate. Every rule is mapped to ATT&CK, so run the matching Atomic Red Team test on /atomic to confirm the rule actually fires before you rely on it.

Detection rules

50 shown of 1,492
medium
Disabled MFA to Bypass Authentication Mechanisms
Detection for when multi factor authentication has been disabled, which might indicate a malicious activity to bypass authentication mechanisms.
status test author @ionsor id 7ea78478-a4f9-42a6-9dcd-f861816122bf
panther query
def rule(event):
    if all(
        [
            event.deep_get("eventSource", default="") == "AzureActiveDirectory",
            event.deep_get("eventName", default="") == "Disable Strong Authentication.",
            event.deep_get("status", default="") == "success",
        ]
    ):
        return True
    return False
view Sigma YAML
title: Disabled MFA to Bypass Authentication Mechanisms
id: 7ea78478-a4f9-42a6-9dcd-f861816122bf
status: test
description: Detection for when multi factor authentication has been disabled, which might indicate a malicious activity to bypass authentication mechanisms.
references:
    - https://learn.microsoft.com/en-us/azure/active-directory/authentication/howto-mfa-userstates
author: '@ionsor'
date: 2022-02-08
tags:
    - attack.credential-access
    - attack.persistence
    - attack.defense-impairment
    - attack.t1556
logsource:
    product: azure
    service: activitylogs
detection:
    selection:
        eventSource: AzureActiveDirectory
        eventName: 'Disable Strong Authentication.'
        status: success
    condition: selection
falsepositives:
    - Authorized modification by administrators
level: medium
Convert to SIEM query
medium
Disabling Security Tools
Detects disabling security tools
status test author Ömer Günal, Alejandro Ortuno, oscd.community id e3a8a052-111f-4606-9aee-f28ebeb76776
panther query
def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("Image", default="").endswith("/service"),
                    "iptables" in event.deep_get("CommandLine", default=""),
                    "stop" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/service"),
                    "ip6tables" in event.deep_get("CommandLine", default=""),
                    "stop" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/chkconfig"),
                    "iptables" in event.deep_get("CommandLine", default=""),
                    "stop" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/chkconfig"),
                    "ip6tables" in event.deep_get("CommandLine", default=""),
                    "stop" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/systemctl"),
                    "firewalld" in event.deep_get("CommandLine", default=""),
                    "stop" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/systemctl"),
                    "firewalld" in event.deep_get("CommandLine", default=""),
                    "disable" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/service"),
                    "cbdaemon" in event.deep_get("CommandLine", default=""),
                    "stop" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/chkconfig"),
                    "cbdaemon" in event.deep_get("CommandLine", default=""),
                    "off" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/systemctl"),
                    "cbdaemon" in event.deep_get("CommandLine", default=""),
                    "stop" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/systemctl"),
                    "cbdaemon" in event.deep_get("CommandLine", default=""),
                    "disable" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/setenforce"),
                    "0" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/systemctl"),
                    "stop" in event.deep_get("CommandLine", default=""),
                    "falcon-sensor" in event.deep_get("CommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("/systemctl"),
                    "disable" in event.deep_get("CommandLine", default=""),
                    "falcon-sensor" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Disabling Security Tools
id: e3a8a052-111f-4606-9aee-f28ebeb76776
status: test
description: Detects disabling security tools
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1562.004/T1562.004.md
author: Ömer Günal, Alejandro Ortuno, oscd.community
date: 2020-06-17
modified: 2022-10-09
tags:
    - attack.defense-impairment
    - attack.t1686
logsource:
    category: process_creation
    product: linux
detection:
    selection_iptables_1:
        Image|endswith: '/service'
        CommandLine|contains|all:
            - 'iptables'
            - 'stop'
    selection_iptables_2:
        Image|endswith: '/service'
        CommandLine|contains|all:
            - 'ip6tables'
            - 'stop'
    selection_iptables_3:
        Image|endswith: '/chkconfig'
        CommandLine|contains|all:
            - 'iptables'
            - 'stop'
    selection_iptables_4:
        Image|endswith: '/chkconfig'
        CommandLine|contains|all:
            - 'ip6tables'
            - 'stop'
    selection_firewall_1:
        Image|endswith: '/systemctl'
        CommandLine|contains|all:
            - 'firewalld'
            - 'stop'
    selection_firewall_2:
        Image|endswith: '/systemctl'
        CommandLine|contains|all:
            - 'firewalld'
            - 'disable'
    selection_carbonblack_1:
        Image|endswith: '/service'
        CommandLine|contains|all:
            - 'cbdaemon'
            - 'stop'
    selection_carbonblack_2:
        Image|endswith: '/chkconfig'
        CommandLine|contains|all:
            - 'cbdaemon'
            - 'off'
    selection_carbonblack_3:
        Image|endswith: '/systemctl'
        CommandLine|contains|all:
            - 'cbdaemon'
            - 'stop'
    selection_carbonblack_4:
        Image|endswith: '/systemctl'
        CommandLine|contains|all:
            - 'cbdaemon'
            - 'disable'
    selection_selinux:
        Image|endswith: '/setenforce'
        CommandLine|contains: '0'
    selection_crowdstrike_1:
        Image|endswith: '/systemctl'
        CommandLine|contains|all:
            - 'stop'
            - 'falcon-sensor'
    selection_crowdstrike_2:
        Image|endswith: '/systemctl'
        CommandLine|contains|all:
            - 'disable'
            - 'falcon-sensor'
    condition: 1 of selection*
falsepositives:
    - Legitimate administration activities
level: medium
Convert to SIEM query
medium
Disabling Security Tools - Builtin
Detects disabling security tools
status test author Ömer Günal, Alejandro Ortuno, oscd.community id 49f5dfc1-f92e-4d34-96fa-feba3f6acf36
panther query
import json


def rule(event):
    if any(
        [
            "stopping iptables" in json.dumps(event.to_dict()),
            "stopping ip6tables" in json.dumps(event.to_dict()),
            "stopping firewalld" in json.dumps(event.to_dict()),
            "stopping cbdaemon" in json.dumps(event.to_dict()),
            "stopping falcon-sensor" in json.dumps(event.to_dict()),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Disabling Security Tools - Builtin
id: 49f5dfc1-f92e-4d34-96fa-feba3f6acf36
related:
    - id: e3a8a052-111f-4606-9aee-f28ebeb76776
      type: derived
status: test
description: Detects disabling security tools
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1562.004/T1562.004.md
author: Ömer Günal, Alejandro Ortuno, oscd.community
date: 2020-06-17
modified: 2022-11-26
tags:
    - attack.defense-impairment
    - attack.t1686
logsource:
    product: linux
    service: syslog
detection:
    keywords:
        - 'stopping iptables'
        - 'stopping ip6tables'
        - 'stopping firewalld'
        - 'stopping cbdaemon'
        - 'stopping falcon-sensor'
    condition: keywords
falsepositives:
    - Legitimate administration activities
level: medium
Convert to SIEM query
medium
Disk Image Creation Via Hdiutil - MacOS
Detects the execution of the hdiutil utility in order to create a disk image.
status test author Omar Khaled (@beacon_exe) id 1cf98dc2-fcb0-47c9-8aea-654c9284d1ae
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/hdiutil"),
            "create" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Disk Image Creation Via Hdiutil - MacOS
id: 1cf98dc2-fcb0-47c9-8aea-654c9284d1ae
status: test
description: Detects the execution of the hdiutil utility in order to create a disk image.
references:
    - https://www.loobins.io/binaries/hdiutil/
    - https://www.sentinelone.com/blog/from-the-front-linesunsigned-macos-orat-malware-gambles-for-the-win/
    - https://ss64.com/mac/hdiutil.html
author: Omar Khaled (@beacon_exe)
date: 2024-08-10
tags:
    - attack.exfiltration
logsource:
    product: macos
    category: process_creation
detection:
    selection:
        Image|endswith: /hdiutil
        CommandLine|contains: 'create'
    condition: selection
falsepositives:
    - Legitimate usage of hdiutil by administrators and users.
level: medium
Convert to SIEM query
medium
Disk Image Mounting Via Hdiutil - MacOS
Detects the execution of the hdiutil utility in order to mount disk images.
status test author Omar Khaled (@beacon_exe) id bf241472-f014-4f01-a869-96f99330ca8c
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/hdiutil"),
            any(
                [
                    "attach " in event.deep_get("CommandLine", default=""),
                    "mount " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Disk Image Mounting Via Hdiutil - MacOS
id: bf241472-f014-4f01-a869-96f99330ca8c
status: test
description: Detects the execution of the hdiutil utility in order to mount disk images.
references:
    - https://www.loobins.io/binaries/hdiutil/
    - https://www.sentinelone.com/blog/from-the-front-linesunsigned-macos-orat-malware-gambles-for-the-win/
    - https://ss64.com/mac/hdiutil.html
author: Omar Khaled (@beacon_exe)
date: 2024-08-10
tags:
    - attack.initial-access
    - attack.collection
    - attack.t1566.001
    - attack.t1560.001
logsource:
    product: macos
    category: process_creation
detection:
    selection:
        Image|endswith: /hdiutil
        CommandLine|contains:
            - 'attach '
            - 'mount '
    condition: selection
falsepositives:
    - Legitimate usage of hdiutil by administrators and users.
level: medium
Convert to SIEM query
medium
Diskshadow Child Process Spawned
Detects any child process spawning from "Diskshadow.exe". This could be due to executing Diskshadow in interpreter mode or script mode and using the "exec" flag to launch other applications.
status test author Harjot Singh @cyb3rjy0t id 56b1dde8-b274-435f-a73a-fb75eb81262a
panther query
def rule(event):
    if all(
        [
            event.deep_get("ParentImage", default="").endswith("\\diskshadow.exe"),
            not event.deep_get("Image", default="").endswith(":\\Windows\\System32\\WerFault.exe"),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Diskshadow Child Process Spawned
id: 56b1dde8-b274-435f-a73a-fb75eb81262a
related:
    - id: fa1a7e52-3d02-435b-81b8-00da14dd66c1 # Diskshadow Script Mode - Execution From Potential Suspicious Location
      type: similar
    - id: 1dde5376-a648-492e-9e54-4241dd9b0c7f # Diskshadow Script Mode - Uncommon Script Extension Execution
      type: similar
    - id: 9f546b25-5f12-4c8d-8532-5893dcb1e4b8 # Potentially Suspicious Child Process Of DiskShadow.EXE
      type: similar
    - id: 0c2f8629-7129-4a8a-9897-7e0768f13ff2 # Diskshadow Script Mode Execution
      type: similar
status: test
description: Detects any child process spawning from "Diskshadow.exe". This could be due to executing Diskshadow in interpreter mode or script mode and using the "exec" flag to launch other applications.
references:
    - https://bohops.com/2018/03/26/diskshadow-the-return-of-vss-evasion-persistence-and-active-directory-database-extraction/
    - https://www.ired.team/offensive-security/credential-access-and-credential-dumping/ntds.dit-enumeration
    - https://medium.com/@cyberjyot/lolbin-execution-via-diskshadow-f6ff681a27a4
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskshadow
author: Harjot Singh @cyb3rjy0t
date: 2023-09-15
tags:
    - attack.stealth
    - attack.t1218
    - attack.execution
    - detection.threat-hunting
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        ParentImage|endswith: '\diskshadow.exe'
    filter_main_werfault:
        Image|endswith: ':\Windows\System32\WerFault.exe'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Likely from legitimate usage of Diskshadow in Interpreter mode.
level: medium
Convert to SIEM query
medium
Diskshadow Script Mode - Execution From Potential Suspicious Location
Detects execution of "Diskshadow.exe" in script mode using the "/s" flag where the script is located in a potentially suspicious location.
status test author Nasreddine Bencherchali (Nextron Systems) id fa1a7e52-3d02-435b-81b8-00da14dd66c1
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("OriginalFileName", default="") == "diskshadow.exe",
                    event.deep_get("Image", default="").endswith("\\diskshadow.exe"),
                ]
            ),
            any(
                [
                    "-s " in event.deep_get("CommandLine", default=""),
                    "/s " in event.deep_get("CommandLine", default=""),
                    "–s " in event.deep_get("CommandLine", default=""),
                    "—s " in event.deep_get("CommandLine", default=""),
                    "―s " in event.deep_get("CommandLine", default=""),
                ]
            ),
            any(
                [
                    ":\\Temp\\" in event.deep_get("CommandLine", default=""),
                    ":\\Windows\\Temp\\" in event.deep_get("CommandLine", default=""),
                    "\\AppData\\Local\\" in event.deep_get("CommandLine", default=""),
                    "\\AppData\\Roaming\\" in event.deep_get("CommandLine", default=""),
                    "\\ProgramData\\" in event.deep_get("CommandLine", default=""),
                    "\\Users\\Public\\" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Diskshadow Script Mode - Execution From Potential Suspicious Location
id: fa1a7e52-3d02-435b-81b8-00da14dd66c1
related:
    - id: 1dde5376-a648-492e-9e54-4241dd9b0c7f # Diskshadow Script Mode - Uncommon Script Extension Execution
      type: similar
    - id: 9f546b25-5f12-4c8d-8532-5893dcb1e4b8 # Potentially Suspicious Child Process Of DiskShadow.EXE
      type: similar
    - id: 56b1dde8-b274-435f-a73a-fb75eb81262a # Diskshadow Child Process Spawned
      type: similar
    - id: 0c2f8629-7129-4a8a-9897-7e0768f13ff2 # Diskshadow Script Mode Execution
      type: similar
status: test
description: Detects execution of "Diskshadow.exe" in script mode using the "/s" flag where the script is located in a potentially suspicious location.
references:
    - https://bohops.com/2018/03/26/diskshadow-the-return-of-vss-evasion-persistence-and-active-directory-database-extraction/
    - https://www.ired.team/offensive-security/credential-access-and-credential-dumping/ntds.dit-enumeration
    - https://medium.com/@cyberjyot/lolbin-execution-via-diskshadow-f6ff681a27a4
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskshadow
    - https://www.lifars.com/wp-content/uploads/2022/01/GriefRansomware_Whitepaper-2.pdf
    - https://www.zscaler.com/blogs/security-research/technical-analysis-crytox-ransomware
    - https://research.checkpoint.com/2022/evilplayout-attack-against-irans-state-broadcaster/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-09-15
modified: 2024-03-05
tags:
    - attack.stealth
    - attack.t1218
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName: 'diskshadow.exe'
        - Image|endswith: '\diskshadow.exe'
    selection_cli:
        CommandLine|contains|windash: '-s '
    selection_paths:
        CommandLine|contains:
            # Note: Add additional susp paths based on your org needs
            - ':\Temp\'
            - ':\Windows\Temp\'
            - '\AppData\Local\'
            - '\AppData\Roaming\'
            - '\ProgramData\'
            - '\Users\Public\'
    condition: all of selection_*
falsepositives:
    - False positives may occur if you execute the script from one of the paths mentioned in the rule. Apply additional filters that fits your org needs.
level: medium
Convert to SIEM query
medium
Diskshadow Script Mode - Uncommon Script Extension Execution
Detects execution of "Diskshadow.exe" in script mode to execute an script with a potentially uncommon extension. Initial baselining of the allowed extension list is required.
status test author Nasreddine Bencherchali (Nextron Systems) id 1dde5376-a648-492e-9e54-4241dd9b0c7f
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("OriginalFileName", default="") == "diskshadow.exe",
                    event.deep_get("Image", default="").endswith("\\diskshadow.exe"),
                ]
            ),
            any(
                [
                    "-s " in event.deep_get("CommandLine", default=""),
                    "/s " in event.deep_get("CommandLine", default=""),
                    "–s " in event.deep_get("CommandLine", default=""),
                    "—s " in event.deep_get("CommandLine", default=""),
                    "―s " in event.deep_get("CommandLine", default=""),
                ]
            ),
            not ".txt" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Diskshadow Script Mode - Uncommon Script Extension Execution
id: 1dde5376-a648-492e-9e54-4241dd9b0c7f
related:
    - id: fa1a7e52-3d02-435b-81b8-00da14dd66c1 # Diskshadow Script Mode - Execution From Potential Suspicious Location
      type: similar
    - id: 9f546b25-5f12-4c8d-8532-5893dcb1e4b8 # Potentially Suspicious Child Process Of DiskShadow.EXE
      type: similar
    - id: 56b1dde8-b274-435f-a73a-fb75eb81262a # Diskshadow Child Process Spawned
      type: similar
    - id: 0c2f8629-7129-4a8a-9897-7e0768f13ff2 # Diskshadow Script Mode Execution
      type: similar
status: test
description: |
    Detects execution of "Diskshadow.exe" in script mode to execute an script with a potentially uncommon extension.
    Initial baselining of the allowed extension list is required.
references:
    - https://bohops.com/2018/03/26/diskshadow-the-return-of-vss-evasion-persistence-and-active-directory-database-extraction/
    - https://www.ired.team/offensive-security/credential-access-and-credential-dumping/ntds.dit-enumeration
    - https://medium.com/@cyberjyot/lolbin-execution-via-diskshadow-f6ff681a27a4
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskshadow
    - https://www.lifars.com/wp-content/uploads/2022/01/GriefRansomware_Whitepaper-2.pdf
    - https://www.zscaler.com/blogs/security-research/technical-analysis-crytox-ransomware
    - https://research.checkpoint.com/2022/evilplayout-attack-against-irans-state-broadcaster/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-09-15
modified: 2024-03-05
tags:
    - attack.stealth
    - attack.t1218
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName: 'diskshadow.exe'
        - Image|endswith: '\diskshadow.exe'
    selection_flag:
        CommandLine|contains|windash: '-s '
    filter_main_ext:
        # Note: can be changed to an "endswith" to avoid rare FPs. But you need to account for quoted paths
        # Note: Using the ".txt" is based on the MS documentation example. Best add the extension you use internally before using this rule
        CommandLine|contains: '.txt'
    condition: all of selection_* and not 1 of filter_main_*
falsepositives:
    - False postitve might occur with legitimate or uncommon extensions used internally. Initial baseline is required.
level: medium
Convert to SIEM query
medium
Diskshadow Script Mode Execution
Detects execution of "Diskshadow.exe" in script mode using the "/s" flag. Attackers often abuse "diskshadow" to execute scripts that deleted the shadow copies on the systems. Investigate the content of the scripts and its location.
status test author Ivan Dyachkov, oscd.community id 0c2f8629-7129-4a8a-9897-7e0768f13ff2
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("OriginalFileName", default="") == "diskshadow.exe",
                    event.deep_get("Image", default="").endswith("\\diskshadow.exe"),
                ]
            ),
            any(
                [
                    "-s " in event.deep_get("CommandLine", default=""),
                    "/s " in event.deep_get("CommandLine", default=""),
                    "–s " in event.deep_get("CommandLine", default=""),
                    "—s " in event.deep_get("CommandLine", default=""),
                    "―s " in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Diskshadow Script Mode Execution
id: 0c2f8629-7129-4a8a-9897-7e0768f13ff2
related:
    - id: fa1a7e52-3d02-435b-81b8-00da14dd66c1 # Diskshadow Script Mode - Execution From Potential Suspicious Location
      type: similar
    - id: 1dde5376-a648-492e-9e54-4241dd9b0c7f # Diskshadow Script Mode - Uncommon Script Extension Execution
      type: similar
    - id: 9f546b25-5f12-4c8d-8532-5893dcb1e4b8 # Potentially Suspicious Child Process Of DiskShadow.EXE
      type: similar
    - id: 56b1dde8-b274-435f-a73a-fb75eb81262a # Diskshadow Child Process Spawned
      type: similar
status: test
description: |
    Detects execution of "Diskshadow.exe" in script mode using the "/s" flag. Attackers often abuse "diskshadow" to execute scripts that deleted the shadow copies on the systems. Investigate the content of the scripts and its location.
references:
    - https://bohops.com/2018/03/26/diskshadow-the-return-of-vss-evasion-persistence-and-active-directory-database-extraction/
    - https://www.ired.team/offensive-security/credential-access-and-credential-dumping/ntds.dit-enumeration
    - https://medium.com/@cyberjyot/lolbin-execution-via-diskshadow-f6ff681a27a4
    - https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/diskshadow
author: Ivan Dyachkov, oscd.community
date: 2020-10-07
modified: 2024-03-13
tags:
    - attack.stealth
    - attack.t1218
    - attack.execution
    - detection.threat-hunting
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName: 'diskshadow.exe'
        - Image|endswith: '\diskshadow.exe'
    selection_cli:
        CommandLine|contains|windash: '-s '
    condition: all of selection_*
falsepositives:
    - Likely from legitimate backup scripts
level: medium
Convert to SIEM query
medium
Dism Remove Online Package
Deployment Image Servicing and Management tool. DISM is used to enumerate, install, uninstall, configure, and update features and packages in Windows images
status test author frack113 id 43e32da2-fdd0-4156-90de-50dfd62636f9
panther query
def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("Image", default="").endswith("\\DismHost.exe"),
                    "/Online" in event.deep_get("ParentCommandLine", default=""),
                    "/Disable-Feature" in event.deep_get("ParentCommandLine", default=""),
                ]
            ),
            all(
                [
                    event.deep_get("Image", default="").endswith("\\Dism.exe"),
                    "/Online" in event.deep_get("CommandLine", default=""),
                    "/Disable-Feature" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Dism Remove Online Package
id: 43e32da2-fdd0-4156-90de-50dfd62636f9
status: test
description: Deployment Image Servicing and Management tool. DISM is used to enumerate, install, uninstall, configure, and update features and packages in Windows images
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1562.001/T1562.001.md#atomic-test-26---disable-windows-defender-with-dism
    - https://www.trendmicro.com/en_us/research/22/h/ransomware-actor-abuses-genshin-impact-anti-cheat-driver-to-kill-antivirus.html
author: frack113
date: 2022-01-16
modified: 2022-08-26
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection_dismhost:
        Image|endswith: '\DismHost.exe'
        ParentCommandLine|contains|all:
            - '/Online'
            - '/Disable-Feature'
            # - '/FeatureName:'
            # - '/Remove'
            # /NoRestart
            # /quiet
    selection_dism:
        Image|endswith: '\Dism.exe'
        CommandLine|contains|all:
            - '/Online'
            - '/Disable-Feature'
            # - '/FeatureName:'
            # - '/Remove'
            # /NoRestart
            # /quiet
    condition: 1 of selection_*
falsepositives:
    - Legitimate script
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_dism_remove/info.yml
simulation:
    - type: atomic-red-team
      name: Disable Windows Defender with DISM
      technique: T1562.001
      atomic_guid: 871438ac-7d6e-432a-b27d-3e7db69faf58
Convert to SIEM query
medium
Displaying Hidden Files Feature Disabled
Detects modifications to the "Hidden" and "ShowSuperHidden" explorer registry values in order to disable showing of hidden files and system files. This technique is abused by several malware families to hide their files from normal users.
status test author frack113 id 5a5152f1-463f-436b-b2f5-8eceb3964b42
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("TargetObject", default="").endswith(
                        "\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\ShowSuperHidden"
                    ),
                    event.deep_get("TargetObject", default="").endswith(
                        "\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced\\Hidden"
                    ),
                ]
            ),
            event.deep_get("Details", default="") == "DWORD (0x00000000)",
        ]
    ):
        return True
    return False
view Sigma YAML
title: Displaying Hidden Files Feature Disabled
id: 5a5152f1-463f-436b-b2f5-8eceb3964b42
status: test
description: |
    Detects modifications to the "Hidden" and "ShowSuperHidden" explorer registry values in order to disable showing of hidden files and system files.
    This technique is abused by several malware families to hide their files from normal users.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1564.001/T1564.001.md#atomic-test-8---hide-files-through-registry
author: frack113
date: 2022-04-02
modified: 2024-03-26
tags:
    - attack.stealth
    - attack.t1564.001
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|endswith:
            - '\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden'
            - '\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden'
        Details: 'DWORD (0x00000000)'
    condition: selection
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Django Framework Exceptions
Detects suspicious Django web application framework exceptions that could indicate exploitation attempts
status stable author Thomas Patzke id fd435618-981e-4a7c-81f8-f78ce480d616
panther query
import json


def rule(event):
    if any(
        [
            "SuspiciousOperation" in json.dumps(event.to_dict()),
            "DisallowedHost" in json.dumps(event.to_dict()),
            "DisallowedModelAdminLookup" in json.dumps(event.to_dict()),
            "DisallowedModelAdminToField" in json.dumps(event.to_dict()),
            "DisallowedRedirect" in json.dumps(event.to_dict()),
            "InvalidSessionKey" in json.dumps(event.to_dict()),
            "RequestDataTooBig" in json.dumps(event.to_dict()),
            "SuspiciousFileOperation" in json.dumps(event.to_dict()),
            "SuspiciousMultipartForm" in json.dumps(event.to_dict()),
            "SuspiciousSession" in json.dumps(event.to_dict()),
            "TooManyFieldsSent" in json.dumps(event.to_dict()),
            "PermissionDenied" in json.dumps(event.to_dict()),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Django Framework Exceptions
id: fd435618-981e-4a7c-81f8-f78ce480d616
status: stable
description: Detects suspicious Django web application framework exceptions that could indicate exploitation attempts
references:
    - https://docs.djangoproject.com/en/1.11/ref/exceptions/
    - https://docs.djangoproject.com/en/1.11/topics/logging/#django-security
author: Thomas Patzke
date: 2017-08-05
modified: 2020-09-01
tags:
    - attack.initial-access
    - attack.t1190
logsource:
    category: application
    product: django
detection:
    keywords:
        - SuspiciousOperation
        # Subclasses of SuspiciousOperation
        - DisallowedHost
        - DisallowedModelAdminLookup
        - DisallowedModelAdminToField
        - DisallowedRedirect
        - InvalidSessionKey
        - RequestDataTooBig
        - SuspiciousFileOperation
        - SuspiciousMultipartForm
        - SuspiciousSession
        - TooManyFieldsSent
        # Further security-related exceptions
        - PermissionDenied
    condition: keywords
falsepositives:
    - Application bugs
level: medium
Convert to SIEM query
medium
DllUnregisterServer Function Call Via Msiexec.EXE
Detects MsiExec loading a DLL and calling its DllUnregisterServer function
status test author frack113 id 84f52741-8834-4a8c-a413-2eb2269aa6c8
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\msiexec.exe"),
                    event.deep_get("OriginalFileName", default="") == "\\msiexec.exe",
                ]
            ),
            any(
                [
                    " -z " in event.deep_get("CommandLine", default=""),
                    " /z " in event.deep_get("CommandLine", default=""),
                    " –z " in event.deep_get("CommandLine", default=""),
                    " —z " in event.deep_get("CommandLine", default=""),
                    " ―z " in event.deep_get("CommandLine", default=""),
                ]
            ),
            ".dll" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: DllUnregisterServer Function Call Via Msiexec.EXE
id: 84f52741-8834-4a8c-a413-2eb2269aa6c8
status: test
description: Detects MsiExec loading a DLL and calling its DllUnregisterServer function
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1218.007/T1218.007.md
    - https://lolbas-project.github.io/lolbas/Binaries/Msiexec/
    - https://twitter.com/_st0pp3r_/status/1583914515996897281
author: frack113
date: 2022-04-24
modified: 2024-03-13
tags:
    - attack.stealth
    - attack.t1218.007
logsource:
    product: windows
    category: process_creation
detection:
    selection_img:
        - Image|endswith: '\msiexec.exe'
        - OriginalFileName: '\msiexec.exe'
    selection_flag:
        CommandLine|contains|windash: ' -z '
    selection_dll:
        CommandLine|contains: '.dll'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Dllhost.EXE Initiated Network Connection To Non-Local IP Address
Detects Dllhost.EXE initiating a network connection to a non-local IP address. Aside from Microsoft own IP range that needs to be excluded. Network communication from Dllhost will depend entirely on the hosted DLL. An initial baseline is recommended before deployment.
status test author bartblaze id cfed2f44-16df-4bf3-833a-79405198b277
panther query
import ipaddress


def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\dllhost.exe"),
            event.deep_get("Initiated", default="") == "true",
            not any(
                [
                    any(
                        [
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("::1/128"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("10.0.0.0/8"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("127.0.0.0/8"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("172.16.0.0/12"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("192.168.0.0/16"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("169.254.0.0/16"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("fc00::/7"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("fe80::/10"),
                        ]
                    ),
                    any(
                        [
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("20.184.0.0/13"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("20.192.0.0/10"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("23.72.0.0/13"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("51.10.0.0/15"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("51.103.0.0/16"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("51.104.0.0/15"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("52.224.0.0/11"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("150.171.0.0/19"),
                            ipaddress.ip_address(event.deep_get("DestinationIp", default=""))
                            in ipaddress.ip_network("204.79.197.0/24"),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Dllhost.EXE Initiated Network Connection To Non-Local IP Address
id: cfed2f44-16df-4bf3-833a-79405198b277
status: test
description: |
    Detects Dllhost.EXE initiating a network connection to a non-local IP address.
    Aside from Microsoft own IP range that needs to be excluded. Network communication from Dllhost will depend entirely on the hosted DLL.
    An initial baseline is recommended before deployment.
references:
    - https://redcanary.com/blog/child-processes/
    - https://nasbench.medium.com/what-is-the-dllhost-exe-process-actually-running-ef9fe4c19c08
author: bartblaze
date: 2020-07-13
modified: 2024-07-16
tags:
    - attack.stealth
    - attack.t1218
    - attack.execution
    - attack.t1559.001
    - detection.threat-hunting
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        Image|endswith: '\dllhost.exe'
        Initiated: 'true'
    filter_main_local_ranges:
        DestinationIp|cidr:
            - '::1/128'  # IPv6 loopback
            - '10.0.0.0/8'
            - '127.0.0.0/8'
            - '172.16.0.0/12'
            - '192.168.0.0/16'
            - '169.254.0.0/16'
            - 'fc00::/7'  # IPv6 private addresses
            - 'fe80::/10'  # IPv6 link-local addresses
    filter_main_msrange:
        DestinationIp|cidr:
            - '20.184.0.0/13' # Microsoft Corporation
            - '20.192.0.0/10' # Microsoft Corporation
            - '23.72.0.0/13'  # Akamai International B.V.
            - '51.10.0.0/15'  # Microsoft Corporation
            - '51.103.0.0/16' # Microsoft Corporation
            - '51.104.0.0/15' # Microsoft Corporation
            - '52.224.0.0/11'  # Microsoft Corporation
            - '150.171.0.0/19'  # Microsoft Corporation
            - '204.79.197.0/24' # Microsoft Corporation'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Communication to other corporate systems that use IP addresses from public address spaces
level: medium
Convert to SIEM query
medium
Domain Trust Discovery Via Dsquery
Detects execution of "dsquery.exe" for domain trust discovery
status test author E.M. Anhaus, Tony Lambert, oscd.community, omkar72 id 3bad990e-4848-4a78-9530-b427d854aac0
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\dsquery.exe"),
                    event.deep_get("OriginalFileName", default="") == "dsquery.exe",
                ]
            ),
            "trustedDomain" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Domain Trust Discovery Via Dsquery
id: 3bad990e-4848-4a78-9530-b427d854aac0
related:
    - id: b23fcb74-b1cb-4ff7-a31d-bfe2a7ba453b
      type: similar
    - id: 77815820-246c-47b8-9741-e0def3f57308
      type: obsolete
status: test
description: Detects execution of "dsquery.exe" for domain trust discovery
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1482/T1482.md
    - https://posts.specterops.io/an-introduction-to-manual-active-directory-querying-with-dsquery-and-ldapsearch-84943c13d7eb?gi=41b97a644843
author: E.M. Anhaus, Tony Lambert, oscd.community, omkar72
date: 2019-10-24
modified: 2023-02-02
tags:
    - attack.discovery
    - attack.t1482
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\dsquery.exe'
        - OriginalFileName: 'dsquery.exe'
    selection_cli:
        CommandLine|contains: 'trustedDomain'
    condition: all of selection_*
falsepositives:
    - Legitimate use of the utilities by legitimate user for legitimate reason
level: medium
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_dsquery_domain_trust_discovery/info.yml
simulation:
    - type: atomic-red-team
      name: Windows - Discover domain trusts with dsquery
      technique: T1482
      atomic_guid: 4700a710-c821-4e17-a3ec-9e4c81d6845f
Convert to SIEM query
medium
DotNET Assembly DLL Loaded Via Office Application
Detects any assembly DLL being loaded by an Office Product
status test author Antonlovesdnb id ff0f2b05-09db-4095-b96d-1b75ca24894a
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\excel.exe"),
                    event.deep_get("Image", default="").endswith("\\mspub.exe"),
                    event.deep_get("Image", default="").endswith("\\onenote.exe"),
                    event.deep_get("Image", default="").endswith("\\onenoteim.exe"),
                    event.deep_get("Image", default="").endswith("\\outlook.exe"),
                    event.deep_get("Image", default="").endswith("\\powerpnt.exe"),
                    event.deep_get("Image", default="").endswith("\\winword.exe"),
                ]
            ),
            event.deep_get("ImageLoaded", default="").startswith("C:\\Windows\\assembly\\"),
        ]
    ):
        return True
    return False
view Sigma YAML
title: DotNET Assembly DLL Loaded Via Office Application
id: ff0f2b05-09db-4095-b96d-1b75ca24894a
status: test
description: Detects any assembly DLL being loaded by an Office Product
references:
    - https://medium.com/threatpunter/detecting-adversary-tradecraft-with-image-load-event-logging-and-eql-8de93338c16
author: Antonlovesdnb
date: 2020-02-19
modified: 2023-03-29
tags:
    - attack.execution
    - attack.t1204.002
logsource:
    category: image_load
    product: windows
detection:
    selection:
        Image|endswith:
            - '\excel.exe'
            - '\mspub.exe'
            - '\onenote.exe'
            - '\onenoteim.exe' # Just in case
            - '\outlook.exe'
            - '\powerpnt.exe'
            - '\winword.exe'
        ImageLoaded|startswith: 'C:\Windows\assembly\'
    condition: selection
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Download File To Potentially Suspicious Directory Via Wget
Detects the use of wget to download content to a suspicious directory
status test author Joseliyo Sanchez, @Joseliyo_Jstnk id cf610c15-ed71-46e1-bdf8-2bd1a99de6c4
panther query
import re


def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/wget"),
            any(
                [
                    re.match(r"\\s-O\\s", event.deep_get("CommandLine", default="")),
                    "--output-document" in event.deep_get("CommandLine", default=""),
                ]
            ),
            "/tmp/" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Download File To Potentially Suspicious Directory Via Wget
id: cf610c15-ed71-46e1-bdf8-2bd1a99de6c4
status: test
description: Detects the use of wget to download content to a suspicious directory
references:
    - https://blogs.jpcert.or.jp/en/2023/05/gobrat.html
    - https://jstnk9.github.io/jstnk9/research/GobRAT-Malware/
    - https://www.virustotal.com/gui/file/60bcd645450e4c846238cf0e7226dc40c84c96eba99f6b2cffcd0ab4a391c8b3/detection
    - https://www.virustotal.com/gui/file/3e44c807a25a56f4068b5b8186eee5002eed6f26d665a8b791c472ad154585d1/detection
author: Joseliyo Sanchez, @Joseliyo_Jstnk
date: 2023-06-02
tags:
    - attack.command-and-control
    - attack.t1105
logsource:
    category: process_creation
    product: linux
detection:
    selection_img:
        Image|endswith: '/wget'
    selection_output:
        - CommandLine|re: '\s-O\s' # We use regex to ensure a case sensitive argument detection
        - CommandLine|contains: '--output-document'
    selection_path:
        CommandLine|contains: '/tmp/'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Download from Suspicious Dyndns Hosts
Detects download of certain file types from hosts with dynamic DNS names (selected list)
status test author Florian Roth (Nextron Systems) id 195c1119-ef07-4909-bb12-e66f5e07bf3c
panther query
def rule(event):
    if all(
        [
            event.deep_get("c-uri-extension", default="")
            in [
                "exe",
                "vbs",
                "bat",
                "rar",
                "ps1",
                "doc",
                "docm",
                "xls",
                "xlsm",
                "pptm",
                "rtf",
                "hta",
                "dll",
                "ws",
                "wsf",
                "sct",
                "zip",
            ],
            any(
                [
                    event.deep_get("cs-host", default="").endswith(".hopto.org"),
                    event.deep_get("cs-host", default="").endswith(".no-ip.org"),
                    event.deep_get("cs-host", default="").endswith(".no-ip.info"),
                    event.deep_get("cs-host", default="").endswith(".no-ip.biz"),
                    event.deep_get("cs-host", default="").endswith(".no-ip.com"),
                    event.deep_get("cs-host", default="").endswith(".noip.com"),
                    event.deep_get("cs-host", default="").endswith(".ddns.name"),
                    event.deep_get("cs-host", default="").endswith(".myftp.org"),
                    event.deep_get("cs-host", default="").endswith(".myftp.biz"),
                    event.deep_get("cs-host", default="").endswith(".serveblog.net"),
                    event.deep_get("cs-host", default="").endswith(".servebeer.com"),
                    event.deep_get("cs-host", default="").endswith(".servemp3.com"),
                    event.deep_get("cs-host", default="").endswith(".serveftp.com"),
                    event.deep_get("cs-host", default="").endswith(".servequake.com"),
                    event.deep_get("cs-host", default="").endswith(".servehalflife.com"),
                    event.deep_get("cs-host", default="").endswith(".servehttp.com"),
                    event.deep_get("cs-host", default="").endswith(".servegame.com"),
                    event.deep_get("cs-host", default="").endswith(".servepics.com"),
                    event.deep_get("cs-host", default="").endswith(".myvnc.com"),
                    event.deep_get("cs-host", default="").endswith(".ignorelist.com"),
                    event.deep_get("cs-host", default="").endswith(".jkub.com"),
                    event.deep_get("cs-host", default="").endswith(".dlinkddns.com"),
                    event.deep_get("cs-host", default="").endswith(".jumpingcrab.com"),
                    event.deep_get("cs-host", default="").endswith(".ddns.info"),
                    event.deep_get("cs-host", default="").endswith(".mooo.com"),
                    event.deep_get("cs-host", default="").endswith(".dns-dns.com"),
                    event.deep_get("cs-host", default="").endswith(".strangled.net"),
                    event.deep_get("cs-host", default="").endswith(".adultdns.net"),
                    event.deep_get("cs-host", default="").endswith(".craftx.biz"),
                    event.deep_get("cs-host", default="").endswith(".ddns01.com"),
                    event.deep_get("cs-host", default="").endswith(".dns53.biz"),
                    event.deep_get("cs-host", default="").endswith(".dnsapi.info"),
                    event.deep_get("cs-host", default="").endswith(".dnsd.info"),
                    event.deep_get("cs-host", default="").endswith(".dnsdynamic.com"),
                    event.deep_get("cs-host", default="").endswith(".dnsdynamic.net"),
                    event.deep_get("cs-host", default="").endswith(".dnsget.org"),
                    event.deep_get("cs-host", default="").endswith(".fe100.net"),
                    event.deep_get("cs-host", default="").endswith(".flashserv.net"),
                    event.deep_get("cs-host", default="").endswith(".ftp21.net"),
                    event.deep_get("cs-host", default="").endswith(".http01.com"),
                    event.deep_get("cs-host", default="").endswith(".http80.info"),
                    event.deep_get("cs-host", default="").endswith(".https443.com"),
                    event.deep_get("cs-host", default="").endswith(".imap01.com"),
                    event.deep_get("cs-host", default="").endswith(".kadm5.com"),
                    event.deep_get("cs-host", default="").endswith(".mysq1.net"),
                    event.deep_get("cs-host", default="").endswith(".ns360.info"),
                    event.deep_get("cs-host", default="").endswith(".ntdll.net"),
                    event.deep_get("cs-host", default="").endswith(".ole32.com"),
                    event.deep_get("cs-host", default="").endswith(".proxy8080.com"),
                    event.deep_get("cs-host", default="").endswith(".sql01.com"),
                    event.deep_get("cs-host", default="").endswith(".ssh01.com"),
                    event.deep_get("cs-host", default="").endswith(".ssh22.net"),
                    event.deep_get("cs-host", default="").endswith(".tempors.com"),
                    event.deep_get("cs-host", default="").endswith(".tftpd.net"),
                    event.deep_get("cs-host", default="").endswith(".ttl60.com"),
                    event.deep_get("cs-host", default="").endswith(".ttl60.org"),
                    event.deep_get("cs-host", default="").endswith(".user32.com"),
                    event.deep_get("cs-host", default="").endswith(".voip01.com"),
                    event.deep_get("cs-host", default="").endswith(".wow64.net"),
                    event.deep_get("cs-host", default="").endswith(".x64.me"),
                    event.deep_get("cs-host", default="").endswith(".xns01.com"),
                    event.deep_get("cs-host", default="").endswith(".dyndns.org"),
                    event.deep_get("cs-host", default="").endswith(".dyndns.info"),
                    event.deep_get("cs-host", default="").endswith(".dyndns.tv"),
                    event.deep_get("cs-host", default="").endswith(".dyndns-at-home.com"),
                    event.deep_get("cs-host", default="").endswith(".dnsomatic.com"),
                    event.deep_get("cs-host", default="").endswith(".zapto.org"),
                    event.deep_get("cs-host", default="").endswith(".webhop.net"),
                    event.deep_get("cs-host", default="").endswith(".25u.com"),
                    event.deep_get("cs-host", default="").endswith(".slyip.net"),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Download from Suspicious Dyndns Hosts
id: 195c1119-ef07-4909-bb12-e66f5e07bf3c
status: test
description: Detects download of certain file types from hosts with dynamic DNS names (selected list)
references:
    - https://www.alienvault.com/blogs/security-essentials/dynamic-dns-security-and-potential-threats
author: Florian Roth (Nextron Systems)
date: 2017-11-08
modified: 2023-05-18
tags:
    - attack.command-and-control
    - attack.t1105
    - attack.t1568
logsource:
    category: proxy
detection:
    selection:
        c-uri-extension:
            - 'exe'
            - 'vbs'
            - 'bat'
            - 'rar'
            - 'ps1'
            - 'doc'
            - 'docm'
            - 'xls'
            - 'xlsm'
            - 'pptm'
            - 'rtf'
            - 'hta'
            - 'dll'
            - 'ws'
            - 'wsf'
            - 'sct'
            - 'zip'
            # If you want to add more extensions - see https://docs.google.com/spreadsheets/d/1TWS238xacAto-fLKh1n5uTsdijWdCEsGIM0Y0Hvmc5g/
        cs-host|endswith:
            - '.hopto.org'
            - '.no-ip.org'
            - '.no-ip.info'
            - '.no-ip.biz'
            - '.no-ip.com'
            - '.noip.com'
            - '.ddns.name'
            - '.myftp.org'
            - '.myftp.biz'
            - '.serveblog.net'
            - '.servebeer.com'
            - '.servemp3.com'
            - '.serveftp.com'
            - '.servequake.com'
            - '.servehalflife.com'
            - '.servehttp.com'
            - '.servegame.com'
            - '.servepics.com'
            - '.myvnc.com'
            - '.ignorelist.com'
            - '.jkub.com'
            - '.dlinkddns.com'
            - '.jumpingcrab.com'
            - '.ddns.info'
            - '.mooo.com'
            - '.dns-dns.com'
            - '.strangled.net'
            - '.adultdns.net'
            - '.craftx.biz'
            - '.ddns01.com'
            - '.dns53.biz'
            - '.dnsapi.info'
            - '.dnsd.info'
            - '.dnsdynamic.com'
            - '.dnsdynamic.net'
            - '.dnsget.org'
            - '.fe100.net'
            - '.flashserv.net'
            - '.ftp21.net'
            - '.http01.com'
            - '.http80.info'
            - '.https443.com'
            - '.imap01.com'
            - '.kadm5.com'
            - '.mysq1.net'
            - '.ns360.info'
            - '.ntdll.net'
            - '.ole32.com'
            - '.proxy8080.com'
            - '.sql01.com'
            - '.ssh01.com'
            - '.ssh22.net'
            - '.tempors.com'
            - '.tftpd.net'
            - '.ttl60.com'
            - '.ttl60.org'
            - '.user32.com'
            - '.voip01.com'
            - '.wow64.net'
            - '.x64.me'
            - '.xns01.com'
            - '.dyndns.org'
            - '.dyndns.info'
            - '.dyndns.tv'
            - '.dyndns-at-home.com'
            - '.dnsomatic.com'
            - '.zapto.org'
            - '.webhop.net'
            - '.25u.com'
            - '.slyip.net'
    condition: selection
falsepositives:
    - Software downloads
level: medium
Convert to SIEM query
medium
Driver/DLL Installation Via Odbcconf.EXE
Detects execution of "odbcconf" with "INSTALLDRIVER" which installs a new ODBC driver. Attackers abuse this to install and run malicious DLLs.
status test author Nasreddine Bencherchali (Nextron Systems) id 3f5491e2-8db8-496b-9e95-1029fce852d4
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\odbcconf.exe"),
                    event.deep_get("OriginalFileName", default="") == "odbcconf.exe",
                ]
            ),
            "INSTALLDRIVER " in event.deep_get("CommandLine", default=""),
            ".dll" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Driver/DLL Installation Via Odbcconf.EXE
id: 3f5491e2-8db8-496b-9e95-1029fce852d4
related:
    - id: cb0fe7c5-f3a3-484d-aa25-d350a7912729
      type: similar
status: test
description: Detects execution of "odbcconf" with "INSTALLDRIVER" which installs a new ODBC driver. Attackers abuse this to install and run malicious DLLs.
references:
    - https://lolbas-project.github.io/lolbas/Binaries/Odbcconf/
    - https://web.archive.org/web/20191023232753/https://twitter.com/Hexacorn/status/1187143326673330176
    - https://www.hexacorn.com/blog/2020/08/23/odbcconf-lolbin-trifecta/
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|all:
            - 'INSTALLDRIVER '
            - '.dll'
    condition: all of selection_*
falsepositives:
    - Legitimate driver DLLs being registered via "odbcconf" will generate false positives. Investigate the path of the DLL and its contents to determine if the action is authorized.
level: medium
Convert to SIEM query
medium
DriverQuery.EXE Execution
Detect usage of the "driverquery" utility. Which can be used to perform reconnaissance on installed drivers
status test author Nasreddine Bencherchali (Nextron Systems) id a20def93-0709-4eae-9bd2-31206e21e6b2
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("driverquery.exe"),
                    event.deep_get("OriginalFileName", default="") == "drvqry.exe",
                ]
            ),
            not any(
                [
                    any(
                        [
                            event.deep_get("ParentImage", default="").endswith("\\cscript.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\mshta.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\regsvr32.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\rundll32.exe"),
                            event.deep_get("ParentImage", default="").endswith("\\wscript.exe"),
                        ]
                    ),
                    any(
                        [
                            "\\AppData\\Local\\" in event.deep_get("ParentImage", default=""),
                            "\\Users\\Public\\" in event.deep_get("ParentImage", default=""),
                            "\\Windows\\Temp\\" in event.deep_get("ParentImage", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: DriverQuery.EXE Execution
id: a20def93-0709-4eae-9bd2-31206e21e6b2
related:
    - id: 9fc3072c-dc8f-4bf7-b231-18950000fadd
      type: similar
status: test
description: Detect usage of the "driverquery" utility. Which can be used to perform reconnaissance on installed drivers
references:
    - https://thedfirreport.com/2023/01/09/unwrapping-ursnifs-gifts/
    - https://www.vmray.com/cyber-security-blog/analyzing-ursnif-behavior-malware-sandbox/
    - https://www.fireeye.com/blog/threat-research/2020/01/saigon-mysterious-ursnif-fork.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-19
modified: 2023-09-29
tags:
    - attack.discovery
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        - Image|endswith: 'driverquery.exe'
        - OriginalFileName: 'drvqry.exe'
    filter_main_other: # These are covered in 9fc3072c-dc8f-4bf7-b231-18950000fadd to avoid duplicate alerting
        - ParentImage|endswith:
              - '\cscript.exe'
              - '\mshta.exe'
              - '\regsvr32.exe'
              - '\rundll32.exe'
              - '\wscript.exe'
        - ParentImage|contains:
              - '\AppData\Local\'
              - '\Users\Public\'
              - '\Windows\Temp\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Legitimate use by third party tools in order to investigate installed drivers
level: medium # Level could be reduced to low if this utility is often used in your environment
regression_tests_path: regression_data/rules/windows/process_creation/proc_creation_win_driverquery_usage/info.yml
Convert to SIEM query
medium
Drop Binaries Into Spool Drivers Color Folder
Detects the creation of suspcious binary files inside the "\windows\system32\spool\drivers\color\" as seen in the blog referenced below
status test author Nasreddine Bencherchali (Nextron Systems) id ce7066a6-508a-42d3-995b-2952c65dc2ce
panther query
def rule(event):
    if all(
        [
            event.deep_get("TargetFilename", default="").startswith(
                "C:\\Windows\\System32\\spool\\drivers\\color\\"
            ),
            any(
                [
                    event.deep_get("TargetFilename", default="").endswith(".dll"),
                    event.deep_get("TargetFilename", default="").endswith(".exe"),
                    event.deep_get("TargetFilename", default="").endswith(".sys"),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Drop Binaries Into Spool Drivers Color Folder
id: ce7066a6-508a-42d3-995b-2952c65dc2ce
status: test
description: Detects the creation of suspcious binary files inside the "\windows\system32\spool\drivers\color\" as seen in the blog referenced below
references:
    - https://www.microsoft.com/security/blog/2022/07/27/untangling-knotweed-european-private-sector-offensive-actor-using-0-day-exploits/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-07-28
tags:
    - attack.stealth
logsource:
    product: windows
    category: file_event
detection:
    selection:
        TargetFilename|startswith: 'C:\Windows\System32\spool\drivers\color\'
        TargetFilename|endswith:
            - '.dll'
            - '.exe'
            - '.sys'
    condition: selection
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Dropping Of Password Filter DLL
Detects dropping of dll files in system32 that may be used to retrieve user credentials from LSASS
status test author Sreeman id b7966f4a-b333-455b-8370-8ca53c229762
panther query
def rule(event):
    if all(
        [
            "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Lsa"
            in event.deep_get("CommandLine", default=""),
            "scecli\\0" in event.deep_get("CommandLine", default=""),
            "reg add" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Dropping Of Password Filter DLL
id: b7966f4a-b333-455b-8370-8ca53c229762
status: test
description: Detects dropping of dll files in system32 that may be used to retrieve user credentials from LSASS
references:
    - https://pentestlab.blog/2020/02/10/credential-access-password-filter-dll/
    - https://github.com/3gstudent/PasswordFilter/tree/master/PasswordFilter
author: Sreeman
date: 2020-10-29
modified: 2022-10-09
tags:
    - attack.persistence
    - attack.credential-access
    - attack.defense-impairment
    - attack.t1556.002
logsource:
    category: process_creation
    product: windows
detection:
    selection_cmdline:
        CommandLine|contains|all:
            - 'HKLM\SYSTEM\CurrentControlSet\Control\Lsa'
            - 'scecli\0*'
            - 'reg add'
    condition: selection_cmdline
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Dump Credentials from Windows Credential Manager With PowerShell
Adversaries may search for common password storage locations to obtain user credentials. Passwords are stored in several places on a system, depending on the operating system or application holding the credentials.
status test author frack113 id 99c49d9c-34ea-45f7-84a7-4751ae6b2cbc
panther query
def rule(event):
    if any(
        [
            any(
                [
                    "Get-PasswordVaultCredentials" in event.deep_get("ScriptBlockText", default=""),
                    "Get-CredManCreds" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            all(
                [
                    "New-Object" in event.deep_get("ScriptBlockText", default=""),
                    "Windows.Security.Credentials.PasswordVault"
                    in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            all(
                [
                    "New-Object" in event.deep_get("ScriptBlockText", default=""),
                    "Microsoft.CSharp.CSharpCodeProvider"
                    in event.deep_get("ScriptBlockText", default=""),
                    "[System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())"
                    in event.deep_get("ScriptBlockText", default=""),
                    "Collections.ArrayList" in event.deep_get("ScriptBlockText", default=""),
                    "System.CodeDom.Compiler.CompilerParameters"
                    in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Dump Credentials from Windows Credential Manager With PowerShell
id: 99c49d9c-34ea-45f7-84a7-4751ae6b2cbc
status: test
description: |
    Adversaries may search for common password storage locations to obtain user credentials.
    Passwords are stored in several places on a system, depending on the operating system or application holding the credentials.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1555/T1555.md
author: frack113
date: 2021-12-20
modified: 2022-12-25
tags:
    - attack.credential-access
    - attack.t1555
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_kiddie:
        ScriptBlockText|contains:
            - 'Get-PasswordVaultCredentials'
            - 'Get-CredManCreds'
    selection_rename_Password:
        ScriptBlockText|contains|all:
            - 'New-Object'
            - 'Windows.Security.Credentials.PasswordVault'
    selection_rename_credman:
        ScriptBlockText|contains|all:
            - 'New-Object'
            - 'Microsoft.CSharp.CSharpCodeProvider'
            - '[System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())'
            - 'Collections.ArrayList'
            - 'System.CodeDom.Compiler.CompilerParameters'
    condition: 1 of selection_*
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Dump Ntds.dit To Suspicious Location
Detects potential abuse of ntdsutil to dump ntds.dit database to a suspicious location
status test author Nasreddine Bencherchali (Nextron Systems) id 94dc4390-6b7c-4784-8ffc-335334404650
panther query
def rule(event):
    if all(
        [
            event.deep_get("Provider_Name", default="") == "ESENT",
            event.deep_get("EventID", default="") == 325,
            "ntds.dit" in event.deep_get("Data", default=""),
            any(
                [
                    ":\\ntds.dit" in event.deep_get("Data", default=""),
                    "\\Appdata\\" in event.deep_get("Data", default=""),
                    "\\Desktop\\" in event.deep_get("Data", default=""),
                    "\\Downloads\\" in event.deep_get("Data", default=""),
                    "\\Perflogs\\" in event.deep_get("Data", default=""),
                    "\\Temp\\" in event.deep_get("Data", default=""),
                    "\\Users\\Public\\" in event.deep_get("Data", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Dump Ntds.dit To Suspicious Location
id: 94dc4390-6b7c-4784-8ffc-335334404650
status: test
description: Detects potential abuse of ntdsutil to dump ntds.dit database to a suspicious location
references:
    - https://twitter.com/mgreen27/status/1558223256704122882
    - https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/jj574207(v=ws.11)
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-08-14
modified: 2023-10-23
tags:
    - attack.execution
logsource:
    product: windows
    service: application
    # warning: The 'data' field used in the detection section is the container for the event data as a whole. You may have to adapt the rule for your backend accordingly
detection:
    selection_root:
        Provider_Name: 'ESENT'
        EventID: 325 # New Database Created
        Data|contains: 'ntds.dit'
    selection_paths:
        Data|contains:
            # Add more locations that you don't use in your env or that are just suspicious
            - ':\ntds.dit'
            - '\Appdata\'
            - '\Desktop\'
            - '\Downloads\'
            - '\Perflogs\'
            - '\Temp\'
            - '\Users\Public\'
    condition: all of selection_*
falsepositives:
    - Legitimate backup operation/creating shadow copies
level: medium
Convert to SIEM query
medium
DumpMinitool Execution
Detects the use of "DumpMinitool.exe" a tool that allows the dump of process memory via the use of the "MiniDumpWriteDump"
status test author Nasreddine Bencherchali (Nextron Systems), Florian Roth (Nextron Systems) id dee0a7a3-f200-4112-a99b-952196d81e42
panther query
def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\DumpMinitool.exe"),
                            event.deep_get("Image", default="").endswith("\\DumpMinitool.x86.exe"),
                            event.deep_get("Image", default="").endswith(
                                "\\DumpMinitool.arm64.exe"
                            ),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in ["DumpMinitool.exe", "DumpMinitool.x86.exe", "DumpMinitool.arm64.exe"],
                ]
            ),
            any(
                [
                    " Full" in event.deep_get("CommandLine", default=""),
                    " Mini" in event.deep_get("CommandLine", default=""),
                    " WithHeap" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: DumpMinitool Execution
id: dee0a7a3-f200-4112-a99b-952196d81e42
status: test
description: Detects the use of "DumpMinitool.exe" a tool that allows the dump of process memory via the use of the "MiniDumpWriteDump"
references:
    - https://twitter.com/mrd0x/status/1511415432888131586
    - https://twitter.com/mrd0x/status/1511489821247684615
    - https://lolbas-project.github.io/lolbas/OtherMSBinaries/DumpMinitool/
    - https://gist.github.com/nasbench/6d58c3c125e2fa1b8f7a09754c1b087f
author: Nasreddine Bencherchali (Nextron Systems), Florian Roth (Nextron Systems)
date: 2022-04-06
modified: 2023-04-12
tags:
    - attack.stealth
    - attack.t1036
    - attack.t1003.001
    - attack.credential-access
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith:
              - '\DumpMinitool.exe'
              - '\DumpMinitool.x86.exe'
              - '\DumpMinitool.arm64.exe'
        - OriginalFileName:
              - 'DumpMinitool.exe'
              - 'DumpMinitool.x86.exe'
              - 'DumpMinitool.arm64.exe'
    selection_cli:
        CommandLine|contains:
            - ' Full'
            - ' Mini'
            - ' WithHeap'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Dumping Process via Sqldumper.exe
Detects process dump via legitimate sqldumper.exe binary
status test author Kirill Kiryanov, oscd.community id 23ceaf5c-b6f1-4a32-8559-f2ff734be516
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\sqldumper.exe"),
            any(
                [
                    "0x0110" in event.deep_get("CommandLine", default=""),
                    "0x01100:40" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Dumping Process via Sqldumper.exe
id: 23ceaf5c-b6f1-4a32-8559-f2ff734be516
status: test
description: Detects process dump via legitimate sqldumper.exe binary
references:
    - https://twitter.com/countuponsec/status/910977826853068800
    - https://twitter.com/countuponsec/status/910969424215232518
    - https://lolbas-project.github.io/lolbas/OtherMSBinaries/Sqldumper/
author: Kirill Kiryanov, oscd.community
date: 2020-10-08
modified: 2021-11-27
tags:
    - attack.credential-access
    - attack.t1003.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\sqldumper.exe'
        CommandLine|contains:
            - '0x0110'
            - '0x01100:40'
    condition: selection
falsepositives:
    - Legitimate MSSQL Server actions
level: medium
Convert to SIEM query
medium
Dynamic .NET Compilation Via Csc.EXE
Detects execution of "csc.exe" to compile .NET code. Attackers often leverage this to compile code on the fly and use it in other stages.
status test author Florian Roth (Nextron Systems), X__Junior (Nextron Systems) id dcaa3f04-70c3-427a-80b4-b870d73c94c4
panther query
import re


def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\csc.exe"),
            any(
                [
                    any(
                        [
                            ":\\Perflogs\\" in event.deep_get("CommandLine", default=""),
                            ":\\Users\\Public\\" in event.deep_get("CommandLine", default=""),
                            "\\AppData\\Local\\Temp\\" in event.deep_get("CommandLine", default=""),
                            "\\Temporary Internet" in event.deep_get("CommandLine", default=""),
                            "\\Windows\\Temp\\" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                    any(
                        [
                            all(
                                [
                                    ":\\Users\\" in event.deep_get("CommandLine", default=""),
                                    "\\Favorites\\" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            all(
                                [
                                    ":\\Users\\" in event.deep_get("CommandLine", default=""),
                                    "\\Favourites\\" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            all(
                                [
                                    ":\\Users\\" in event.deep_get("CommandLine", default=""),
                                    "\\Contacts\\" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                            all(
                                [
                                    ":\\Users\\" in event.deep_get("CommandLine", default=""),
                                    "\\Pictures\\" in event.deep_get("CommandLine", default=""),
                                ]
                            ),
                        ]
                    ),
                    re.match(
                        r"(?:[Pp]rogram[Dd]ata|%(?:[Ll]ocal)?[Aa]pp[Dd]ata%|\\\\[Aa]pp[Dd]ata\\\\(?:[Ll]ocal(?:[Ll]ow)?|[Rr]oaming))\\\\[^\\\\]{1,256}$",
                        event.deep_get("CommandLine", default=""),
                    ),
                ]
            ),
            not any(
                [
                    any(
                        [
                            event.deep_get("ParentImage", default="").startswith(
                                "C:\\Program Files (x86)\\"
                            ),
                            event.deep_get("ParentImage", default="").startswith(
                                "C:\\Program Files\\"
                            ),
                        ]
                    ),
                    event.deep_get("ParentImage", default="")
                    == "C:\\Windows\\System32\\sdiagnhost.exe",
                    event.deep_get("ParentImage", default="")
                    == "C:\\Windows\\System32\\inetsrv\\w3wp.exe",
                ]
            ),
            not any(
                [
                    event.deep_get("ParentImage", default="")
                    in [
                        "C:\\ProgramData\\chocolatey\\choco.exe",
                        "C:\\ProgramData\\chocolatey\\tools\\shimgen.exe",
                    ],
                    "\\ProgramData\\Microsoft\\Windows Defender Advanced Threat Protection"
                    in event.deep_get("ParentCommandLine", default=""),
                    any(
                        [
                            "JwB7ACIAZgBhAGkAbABlAGQAIgA6AHQAcgB1AGUALAAiAG0AcwBnACIAOgAiAEEAbgBzAGkAYgBsAGUAIAByAGUAcQB1AGkAcgBlAHMAIABQAG8AdwBlAHIAUwBoAGUAbABsACAAdgAzAC4AMAAgAG8AcgAgAG4AZQB3AGUAcgAiAH0AJw"
                            in event.deep_get("ParentCommandLine", default=""),
                            "cAewAiAGYAYQBpAGwAZQBkACIAOgB0AHIAdQBlACwAIgBtAHMAZwAiADoAIgBBAG4AcwBpAGIAbABlACAAcgBlAHEAdQBpAHIAZQBzACAAUABvAHcAZQByAFMAaABlAGwAbAAgAHYAMwAuADAAIABvAHIAIABuAGUAdwBlAHIAIgB9ACcA"
                            in event.deep_get("ParentCommandLine", default=""),
                            "nAHsAIgBmAGEAaQBsAGUAZAAiADoAdAByAHUAZQAsACIAbQBzAGcAIgA6ACIAQQBuAHMAaQBiAGwAZQAgAHIAZQBxAHUAaQByAGUAcwAgAFAAbwB3AGUAcgBTAGgAZQBsAGwAIAB2ADMALgAwACAAbwByACAAbgBlAHcAZQByACIAfQAnA"
                            in event.deep_get("ParentCommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Dynamic .NET Compilation Via Csc.EXE
id: dcaa3f04-70c3-427a-80b4-b870d73c94c4
status: test
description: Detects execution of "csc.exe" to compile .NET code. Attackers often leverage this to compile code on the fly and use it in other stages.
references:
    - https://securityboulevard.com/2019/08/agent-tesla-evading-edr-by-removing-api-hooks/
    - https://www.clearskysec.com/wp-content/uploads/2018/11/MuddyWater-Operations-in-Lebanon-and-Oman.pdf
    - https://app.any.run/tasks/c6993447-d1d8-414e-b856-675325e5aa09/
    - https://twitter.com/gN3mes1s/status/1206874118282448897
    - https://github.com/redcanaryco/atomic-red-team/blob/b27a3cb25025161d49ac861cb216db68c46a3537/atomics/T1027.004/T1027.004.md#atomic-test-1---compile-after-delivery-using-cscexe
author: Florian Roth (Nextron Systems), X__Junior (Nextron Systems)
date: 2019-08-24
modified: 2026-03-23
tags:
    - attack.stealth
    - attack.t1027.004
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        Image|endswith: '\csc.exe'
    selection_susp_location_1:
        CommandLine|contains:
            - ':\Perflogs\'
            - ':\Users\Public\'
            - '\AppData\Local\Temp\' # User execution
            - '\Temporary Internet'
            - '\Windows\Temp\' # Admin execution
    selection_susp_location_2:
        - CommandLine|contains|all:
              - ':\Users\'
              - '\Favorites\'
        - CommandLine|contains|all:
              - ':\Users\'
              - '\Favourites\'
        - CommandLine|contains|all:
              - ':\Users\'
              - '\Contacts\'
        - CommandLine|contains|all:
              - ':\Users\'
              - '\Pictures\'
    selection_susp_location_3:
        CommandLine|re: '(?:[Pp]rogram[Dd]ata|%(?:[Ll]ocal)?[Aa]pp[Dd]ata%|\\[Aa]pp[Dd]ata\\(?:[Ll]ocal(?:[Ll]ow)?|[Rr]oaming))\\[^\\]{1,256}$'
    filter_main_programfiles:
        # Note: this is a generic filter. You could baseline execution in your env for a more robust rule
        ParentImage|startswith:
            - 'C:\Program Files (x86)\' # https://twitter.com/gN3mes1s/status/1206874118282448897
            - 'C:\Program Files\' # https://twitter.com/gN3mes1s/status/1206874118282448897
    filter_main_sdiagnhost:
        ParentImage: 'C:\Windows\System32\sdiagnhost.exe' # https://twitter.com/gN3mes1s/status/1206874118282448897
    filter_main_w3p:
        ParentImage: 'C:\Windows\System32\inetsrv\w3wp.exe' # https://twitter.com/gabriele_pippi/status/1206907900268072962
    filter_optional_chocolatey:
        ParentImage: # Chocolatey https://chocolatey.org/
            - 'C:\ProgramData\chocolatey\choco.exe'
            - 'C:\ProgramData\chocolatey\tools\shimgen.exe'
    filter_optional_defender:
        ParentCommandLine|contains: '\ProgramData\Microsoft\Windows Defender Advanced Threat Protection'
    filter_optional_ansible:
        # Note: As ansible is widely used we exclude it with this generic filter.
        # A better option would be to filter based on script content basis or other marker while hunting
        ParentCommandLine|contains:
            # '{"failed":true,"msg":"Ansible requires PowerShell v3.0 or newer"}'
            - 'JwB7ACIAZgBhAGkAbABlAGQAIgA6AHQAcgB1AGUALAAiAG0AcwBnACIAOgAiAEEAbgBzAGkAYgBsAGUAIAByAGUAcQB1AGkAcgBlAHMAIABQAG8AdwBlAHIAUwBoAGUAbABsACAAdgAzAC4AMAAgAG8AcgAgAG4AZQB3AGUAcgAiAH0AJw'
            - 'cAewAiAGYAYQBpAGwAZQBkACIAOgB0AHIAdQBlACwAIgBtAHMAZwAiADoAIgBBAG4AcwBpAGIAbABlACAAcgBlAHEAdQBpAHIAZQBzACAAUABvAHcAZQByAFMAaABlAGwAbAAgAHYAMwAuADAAIABvAHIAIABuAGUAdwBlAHIAIgB9ACcA'
            - 'nAHsAIgBmAGEAaQBsAGUAZAAiADoAdAByAHUAZQAsACIAbQBzAGcAIgA6ACIAQQBuAHMAaQBiAGwAZQAgAHIAZQBxAHUAaQByAGUAcwAgAFAAbwB3AGUAcgBTAGgAZQBsAGwAIAB2ADMALgAwACAAbwByACAAbgBlAHcAZQByACIAfQAnA'
    condition: selection_img and 1 of selection_susp_location_* and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Legitimate software from program files - https://twitter.com/gN3mes1s/status/1206874118282448897
    - Legitimate Microsoft software - https://twitter.com/gabriele_pippi/status/1206907900268072962
    - Ansible
level: medium
Convert to SIEM query
medium
Dynamic .NET Compilation Via Csc.EXE - Hunting
Detects execution of "csc.exe" to compile .NET code. Attackers often leverage this to compile code on the fly and use it in other stages.
status test author Nasreddine Bencherchali (Nextron Systems) id acf2807c-805b-4042-aab9-f86b6ba9cb2b
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("\\csc.exe"),
            "/noconfig /fullpaths @" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Dynamic .NET Compilation Via Csc.EXE - Hunting
id: acf2807c-805b-4042-aab9-f86b6ba9cb2b
related:
    - id: dcaa3f04-70c3-427a-80b4-b870d73c94c4
      type: derived
status: test
description: Detects execution of "csc.exe" to compile .NET code. Attackers often leverage this to compile code on the fly and use it in other stages.
references:
    - https://securityboulevard.com/2019/08/agent-tesla-evading-edr-by-removing-api-hooks/
    - https://www.clearskysec.com/wp-content/uploads/2018/11/MuddyWater-Operations-in-Lebanon-and-Oman.pdf
    - https://app.any.run/tasks/c6993447-d1d8-414e-b856-675325e5aa09/
    - https://twitter.com/gN3mes1s/status/1206874118282448897
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-08-02
tags:
    - attack.stealth
    - attack.t1027.004
    - detection.threat-hunting
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|endswith: '\csc.exe'
        CommandLine|contains: '/noconfig /fullpaths @'
    condition: selection
falsepositives:
    - Many legitimate applications make use of dynamic compilation. Use this rule to hunt for anomalies
level: medium
Convert to SIEM query
medium
ESXi Account Creation Via ESXCLI
Detects user account creation on ESXi system via esxcli
status test author Cedric Maurugeon id b28e4eb3-8bbc-4f0c-819f-edfe8e2f25db
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/esxcli"),
            "system " in event.deep_get("CommandLine", default=""),
            "account " in event.deep_get("CommandLine", default=""),
            "add " in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: ESXi Account Creation Via ESXCLI
id: b28e4eb3-8bbc-4f0c-819f-edfe8e2f25db
status: test
description: Detects user account creation on ESXi system via esxcli
references:
    - https://developer.broadcom.com/xapis/esxcli-command-reference/7.0.0/namespace/esxcli_system.html
author: Cedric Maurugeon
date: 2023-08-22
tags:
    - attack.persistence
    - attack.execution
    - attack.t1136
    - attack.t1059.012
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/esxcli'
        CommandLine|contains|all:
            - 'system '
            - 'account '
            - 'add '
    condition: selection
falsepositives:
    - Legitimate administration activities
level: medium
Convert to SIEM query
medium
ESXi Network Configuration Discovery Via ESXCLI
Detects execution of the "esxcli" command with the "network" flag in order to retrieve information about the network configuration.
status test author Cedric Maurugeon id 33e814e0-1f00-4e43-9c34-31fb7ae2b174
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/esxcli"),
            "network" in event.deep_get("CommandLine", default=""),
            any(
                [
                    " get" in event.deep_get("CommandLine", default=""),
                    " list" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: ESXi Network Configuration Discovery Via ESXCLI
id: 33e814e0-1f00-4e43-9c34-31fb7ae2b174
status: test
description: Detects execution of the "esxcli" command with the "network" flag in order to retrieve information about the network configuration.
references:
    - https://www.crowdstrike.com/blog/hypervisor-jackpotting-ecrime-actors-increase-targeting-of-esxi-servers/
    - https://developer.broadcom.com/xapis/esxcli-command-reference/7.0.0/namespace/esxcli_network.html
author: Cedric Maurugeon
date: 2023-09-04
tags:
    - attack.discovery
    - attack.execution
    - attack.t1033
    - attack.t1007
    - attack.t1059.012
logsource:
    category: process_creation
    product: linux
detection:
    selection_img:
        Image|endswith: '/esxcli'
        CommandLine|contains: 'network'
    selection_cli:
        CommandLine|contains:
            - ' get'
            - ' list'
    condition: all of selection_*
falsepositives:
    - Legitimate administration activities
# Note: level can be reduced to low in some envs
level: medium
Convert to SIEM query
medium
ESXi Storage Information Discovery Via ESXCLI
Detects execution of the "esxcli" command with the "storage" flag in order to retrieve information about the storage status and other related information. Seen used by malware such as DarkSide and LockBit.
status test author Nasreddine Bencherchali (Nextron Systems), Cedric Maurugeon id f41dada5-3f56-4232-8503-3fb7f9cf2d60
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/esxcli"),
            "storage" in event.deep_get("CommandLine", default=""),
            any(
                [
                    " get" in event.deep_get("CommandLine", default=""),
                    " list" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: ESXi Storage Information Discovery Via ESXCLI
id: f41dada5-3f56-4232-8503-3fb7f9cf2d60
status: test
description: Detects execution of the "esxcli" command with the "storage" flag in order to retrieve information about the storage status and other related information. Seen used by malware such as DarkSide and LockBit.
references:
    - https://www.trendmicro.com/en_us/research/21/e/darkside-linux-vms-targeted.html
    - https://www.trendmicro.com/en_us/research/22/a/analysis-and-Impact-of-lockbit-ransomwares-first-linux-and-vmware-esxi-variant.html
    - https://developer.broadcom.com/xapis/esxcli-command-reference/7.0.0/namespace/esxcli_storage.html
author: Nasreddine Bencherchali (Nextron Systems), Cedric Maurugeon
date: 2023-09-04
tags:
    - attack.discovery
    - attack.execution
    - attack.t1033
    - attack.t1007
    - attack.t1059.012
logsource:
    category: process_creation
    product: linux
detection:
    selection_img:
        Image|endswith: '/esxcli'
        CommandLine|contains: 'storage'
    selection_cli:
        CommandLine|contains:
            - ' get'
            - ' list'
    condition: all of selection_*
falsepositives:
    - Legitimate administration activities
# Note: level can be reduced to low in some envs
level: medium
Convert to SIEM query
medium
ESXi Syslog Configuration Change Via ESXCLI
Detects changes to the ESXi syslog configuration via "esxcli"
status test author Cedric Maurugeon id 38eb1dbb-011f-40b1-a126-cf03a0210563
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/esxcli"),
            "system" in event.deep_get("CommandLine", default=""),
            "syslog" in event.deep_get("CommandLine", default=""),
            "config" in event.deep_get("CommandLine", default=""),
            " set" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: ESXi Syslog Configuration Change Via ESXCLI
id: 38eb1dbb-011f-40b1-a126-cf03a0210563
status: test
description: Detects changes to the ESXi syslog configuration via "esxcli"
references:
    - https://support.solarwinds.com/SuccessCenter/s/article/Configure-ESXi-Syslog-to-LEM?language=en_US
    - https://developer.broadcom.com/xapis/esxcli-command-reference/7.0.0/namespace/esxcli_system.html
author: Cedric Maurugeon
date: 2023-09-04
tags:
    - attack.execution
    - attack.defense-impairment
    - attack.t1685
    - attack.t1690
    - attack.t1059.012
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/esxcli'
        CommandLine|contains|all:
            - 'system'
            - 'syslog'
            - 'config'
        CommandLine|contains: ' set'
    condition: selection
falsepositives:
    - Legitimate administrative activities
level: medium
Convert to SIEM query
medium
ESXi System Information Discovery Via ESXCLI
Detects execution of the "esxcli" command with the "system" flag in order to retrieve information about the different component of the system. Such as accounts, modules, NTP, etc.
status test author Cedric Maurugeon id e80273e1-9faf-40bc-bd85-dbaff104c4e9
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/esxcli"),
            "system" in event.deep_get("CommandLine", default=""),
            any(
                [
                    " get" in event.deep_get("CommandLine", default=""),
                    " list" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: ESXi System Information Discovery Via ESXCLI
id: e80273e1-9faf-40bc-bd85-dbaff104c4e9
status: test
description: Detects execution of the "esxcli" command with the "system" flag in order to retrieve information about the different component of the system. Such as accounts, modules, NTP, etc.
references:
    - https://www.crowdstrike.com/blog/hypervisor-jackpotting-ecrime-actors-increase-targeting-of-esxi-servers/
    - https://developer.broadcom.com/xapis/esxcli-command-reference/7.0.0/namespace/esxcli_system.html
author: Cedric Maurugeon
date: 2023-09-04
tags:
    - attack.discovery
    - attack.execution
    - attack.t1033
    - attack.t1007
    - attack.t1059.012
logsource:
    category: process_creation
    product: linux
detection:
    selection_img:
        Image|endswith: '/esxcli'
        CommandLine|contains: 'system'
    selection_cli:
        CommandLine|contains:
            - ' get'
            - ' list'
    condition: all of selection_*
falsepositives:
    - Legitimate administration activities
level: medium
Convert to SIEM query
medium
ESXi VM Kill Via ESXCLI
Detects execution of the "esxcli" command with the "vm" and "kill" flag in order to kill/shutdown a specific VM.
status test author Nasreddine Bencherchali (Nextron Systems), Cedric Maurugeon id 2992ac4d-31e9-4325-99f2-b18a73221bb2
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/esxcli"),
            "vm process" in event.deep_get("CommandLine", default=""),
            "kill" in event.deep_get("CommandLine", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: ESXi VM Kill Via ESXCLI
id: 2992ac4d-31e9-4325-99f2-b18a73221bb2
status: test
description: Detects execution of the "esxcli" command with the "vm" and "kill" flag in order to kill/shutdown a specific VM.
references:
    - https://www.crowdstrike.com/blog/hypervisor-jackpotting-ecrime-actors-increase-targeting-of-esxi-servers/
    - https://developer.broadcom.com/xapis/esxcli-command-reference/7.0.0/namespace/esxcli_vm.html
    - https://www.secuinfra.com/en/techtalk/hide-your-hypervisor-analysis-of-esxiargs-ransomware/
    - https://www.trendmicro.com/en_us/research/22/e/new-linux-based-ransomware-cheerscrypt-targets-exsi-devices.html
author: Nasreddine Bencherchali (Nextron Systems), Cedric Maurugeon
date: 2023-09-04
tags:
    - attack.execution
    - attack.impact
    - attack.t1059.012
    - attack.t1529
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/esxcli'
        CommandLine|contains|all:
            - 'vm process'
            - 'kill'
    condition: selection
falsepositives:
    - Legitimate administration activities
level: medium
Convert to SIEM query
medium
ESXi VM List Discovery Via ESXCLI
Detects execution of the "esxcli" command with the "vm" flag in order to retrieve information about the installed VMs.
status test author Cedric Maurugeon id 5f1573a7-363b-4114-9208-ad7a61de46eb
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/esxcli"),
            "vm process" in event.deep_get("CommandLine", default=""),
            event.deep_get("CommandLine", default="").endswith(" list"),
        ]
    ):
        return True
    return False
view Sigma YAML
title: ESXi VM List Discovery Via ESXCLI
id: 5f1573a7-363b-4114-9208-ad7a61de46eb
status: test
description: Detects execution of the "esxcli" command with the "vm" flag in order to retrieve information about the installed VMs.
references:
    - https://www.crowdstrike.com/blog/hypervisor-jackpotting-ecrime-actors-increase-targeting-of-esxi-servers/
    - https://developer.broadcom.com/xapis/esxcli-command-reference/7.0.0/namespace/esxcli_vm.html
    - https://www.secuinfra.com/en/techtalk/hide-your-hypervisor-analysis-of-esxiargs-ransomware/
    - https://www.trendmicro.com/en_us/research/22/e/new-linux-based-ransomware-cheerscrypt-targets-exsi-devices.html
author: Cedric Maurugeon
date: 2023-09-04
tags:
    - attack.discovery
    - attack.execution
    - attack.t1033
    - attack.t1007
    - attack.t1059.012
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/esxcli'
        CommandLine|contains: 'vm process'
        CommandLine|endswith: ' list'
    condition: selection
falsepositives:
    - Legitimate administration activities
level: medium
Convert to SIEM query
medium
ESXi VSAN Information Discovery Via ESXCLI
Detects execution of the "esxcli" command with the "vsan" flag in order to retrieve information about virtual storage. Seen used by malware such as DarkSide.
status test author Nasreddine Bencherchali (Nextron Systems), Cedric Maurugeon id d54c2f06-aca9-4e2b-81c9-5317858f4b79
panther query
def rule(event):
    if all(
        [
            event.deep_get("Image", default="").endswith("/esxcli"),
            "vsan" in event.deep_get("CommandLine", default=""),
            any(
                [
                    " get" in event.deep_get("CommandLine", default=""),
                    " list" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: ESXi VSAN Information Discovery Via ESXCLI
id: d54c2f06-aca9-4e2b-81c9-5317858f4b79
status: test
description: Detects execution of the "esxcli" command with the "vsan" flag in order to retrieve information about virtual storage. Seen used by malware such as DarkSide.
references:
    - https://www.trendmicro.com/en_us/research/21/e/darkside-linux-vms-targeted.html
    - https://www.trendmicro.com/en_us/research/22/a/analysis-and-Impact-of-lockbit-ransomwares-first-linux-and-vmware-esxi-variant.html
    - https://developer.broadcom.com/xapis/esxcli-command-reference/7.0.0/namespace/esxcli_vsan.html
author: Nasreddine Bencherchali (Nextron Systems), Cedric Maurugeon
date: 2023-09-04
tags:
    - attack.discovery
    - attack.execution
    - attack.t1033
    - attack.t1007
    - attack.t1059.012
logsource:
    category: process_creation
    product: linux
detection:
    selection_img:
        Image|endswith: '/esxcli'
        CommandLine|contains: 'vsan'
    selection_cli:
        CommandLine|contains:
            - ' get'
            - ' list'
    condition: all of selection_*
falsepositives:
    - Legitimate administration activities
# Note: level can be reduced to low in some envs
level: medium
Convert to SIEM query
medium
ETW Logging/Processing Option Disabled On IIS Server
Detects changes to of the IIS server configuration in order to disable/remove the ETW logging/processing option.
status test author frack113, Nasreddine Bencherchali id a5b40a90-baf5-4bf7-a6f7-373494881d22
panther query
def rule(event):
    if all(
        [
            event.deep_get("EventID", default="") == 29,
            event.deep_get("Configuration", default="").endswith("@logTargetW3C"),
            "ETW" in event.deep_get("OldValue", default=""),
            not "ETW" in event.deep_get("NewValue", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: ETW Logging/Processing Option Disabled On IIS Server
id: a5b40a90-baf5-4bf7-a6f7-373494881d22
status: test
description: Detects changes to of the IIS server configuration in order to disable/remove the ETW logging/processing option.
references:
    - https://learn.microsoft.com/en-us/iis/manage/provisioning-and-managing-iis/configure-logging-in-iis
    - https://www.microsoft.com/en-us/security/blog/2022/12/12/iis-modules-the-evolution-of-web-shells-and-how-to-detect-them/
    - https://learn.microsoft.com/en-us/iis/configuration/system.applicationhost/sites/sitedefaults/logfile/
author: frack113, Nasreddine Bencherchali
date: 2024-10-06
tags:
    - attack.persistence
    - attack.defense-impairment
    - attack.t1685.001
    - attack.t1505.004
logsource:
    product: windows
    service: iis-configuration
detection:
    selection:
        EventID: 29
        Configuration|endswith: '@logTargetW3C'
        OldValue|contains: 'ETW'
    filter_main_etw_added:
        NewValue|contains: 'ETW'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Legitimate administrator activity
level: medium
Convert to SIEM query
medium
EVTX Created In Uncommon Location
Detects the creation of new files with the ".evtx" extension in non-common or non-standard location. This could indicate tampering with default EVTX locations in order to evade security controls or simply exfiltration of event log to search for sensitive information within. Note that backup software and legitimate administrator might perform similar actions during troubleshooting.
status test author D3F7A5105 id 65236ec7-ace0-4f0c-82fd-737b04fd4dcb
panther query
def rule(event):
    if all(
        [
            event.deep_get("TargetFilename", default="").endswith(".evtx"),
            not any(
                [
                    event.deep_get("TargetFilename", default="").startswith(
                        "C:\\Windows\\System32\\winevt\\Logs\\"
                    ),
                    all(
                        [
                            event.deep_get("TargetFilename", default="").startswith(
                                "C:\\ProgramData\\Microsoft\\Windows\\Containers\\BaseImages\\"
                            ),
                            event.deep_get("TargetFilename", default="").endswith(
                                "\\Windows\\System32\\winevt\\Logs\\"
                            ),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: EVTX Created In Uncommon Location
id: 65236ec7-ace0-4f0c-82fd-737b04fd4dcb
status: test
description: |
    Detects the creation of new files with the ".evtx" extension in non-common or non-standard location.
    This could indicate tampering with default EVTX locations in order to evade security controls or simply exfiltration of event log to search for sensitive information within.
    Note that backup software and legitimate administrator might perform similar actions during troubleshooting.
references:
    - https://learn.microsoft.com/en-us/windows/win32/eventlog/eventlog-key
author: D3F7A5105
date: 2023-01-02
modified: 2024-03-26
tags:
    - attack.defense-impairment
    - attack.t1685.001
logsource:
    category: file_event
    product: windows
    definition: 'Requirements: The ".evtx" extension should be monitored via a Sysmon configuration. Example: <TargetFilename condition="end with">.evtx<TargetFilename>'
detection:
    selection:
        TargetFilename|endswith: '.evtx'
    filter_main_path:
        TargetFilename|startswith: 'C:\Windows\System32\winevt\Logs\'
    filter_main_baseimage:
        TargetFilename|startswith: 'C:\ProgramData\Microsoft\Windows\Containers\BaseImages\'
        TargetFilename|endswith: '\Windows\System32\winevt\Logs\'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Administrator or backup activity
    - An unknown bug seems to trigger the Windows "svchost" process to drop EVTX files in the "C:\Windows\Temp" directory in the form "<log_name">_<uuid>.evtx". See https://superuser.com/questions/1371229/low-disk-space-after-filling-up-c-windows-temp-with-evtx-and-txt-files
level: medium
regression_tests_path: regression_data/rules/windows/file/file_event/file_event_win_create_evtx_non_common_locations/info.yml
Convert to SIEM query
medium
Elevated System Shell Spawned
Detects when a shell program such as the Windows command prompt or PowerShell is launched with system privileges. Use this rule to hunt for potential suspicious processes.
status test author Nasreddine Bencherchali (Nextron Systems), frack113 id 61065c72-5d7d-44ef-bf41-6a36684b545f
panther query
def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                            event.deep_get("Image", default="").endswith("\\powershell_ise.exe"),
                            event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                            event.deep_get("Image", default="").endswith("\\cmd.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in ["PowerShell.EXE", "powershell_ise.EXE", "pwsh.dll", "Cmd.Exe"],
                ]
            ),
            any(
                [
                    "AUTHORI" in event.deep_get("User", default=""),
                    "AUTORI" in event.deep_get("User", default=""),
                ]
            ),
            event.deep_get("LogonId", default="") == "0x3e7",
        ]
    ):
        return True
    return False
view Sigma YAML
title: Elevated System Shell Spawned
id: 61065c72-5d7d-44ef-bf41-6a36684b545f
related:
    - id: 178e615d-e666-498b-9630-9ed363038101
      type: similar
status: test
description: |
    Detects when a shell program such as the Windows command prompt or PowerShell is launched with system privileges. Use this rule to hunt for potential suspicious processes.
references:
    - https://github.com/Wh04m1001/SysmonEoP
author: Nasreddine Bencherchali (Nextron Systems), frack113
date: 2023-11-23
modified: 2025-03-06
tags:
    - attack.privilege-escalation
    - attack.execution
    - attack.t1059
    - detection.threat-hunting
logsource:
    product: windows
    category: process_creation
detection:
    selection_shell:
        - Image|endswith:
              - '\powershell.exe'
              - '\powershell_ise.exe'
              - '\pwsh.exe'
              - '\cmd.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'powershell_ise.EXE'
              - 'pwsh.dll'
              - 'Cmd.Exe'
    selection_user:
        User|contains: # covers many language settings
            - 'AUTHORI'
            - 'AUTORI'
        LogonId: '0x3e7'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Elevated System Shell Spawned From Uncommon Parent Location
Detects when a shell program such as the Windows command prompt or PowerShell is launched with system privileges from a uncommon parent location.
status test author frack113, Tim Shelton (update fp) id 178e615d-e666-498b-9630-9ed363038101
panther query
def rule(event):
    if all(
        [
            any(
                [
                    any(
                        [
                            event.deep_get("Image", default="").endswith("\\powershell.exe"),
                            event.deep_get("Image", default="").endswith("\\powershell_ise.exe"),
                            event.deep_get("Image", default="").endswith("\\pwsh.exe"),
                            event.deep_get("Image", default="").endswith("\\cmd.exe"),
                        ]
                    ),
                    event.deep_get("OriginalFileName", default="")
                    in ["PowerShell.EXE", "powershell_ise.EXE", "pwsh.dll", "Cmd.Exe"],
                ]
            ),
            any(
                [
                    "AUTHORI" in event.deep_get("User", default=""),
                    "AUTORI" in event.deep_get("User", default=""),
                ]
            ),
            event.deep_get("LogonId", default="") == "0x3e7",
            not any(
                [
                    any(
                        [
                            ":\\Program Files (x86)\\" in event.deep_get("ParentImage", default=""),
                            ":\\Program Files\\" in event.deep_get("ParentImage", default=""),
                            ":\\ProgramData\\" in event.deep_get("ParentImage", default=""),
                            ":\\Windows\\System32\\" in event.deep_get("ParentImage", default=""),
                            ":\\Windows\\SysWOW64\\" in event.deep_get("ParentImage", default=""),
                            ":\\Windows\\Temp\\" in event.deep_get("ParentImage", default=""),
                            ":\\Windows\\WinSxS\\" in event.deep_get("ParentImage", default=""),
                        ]
                    ),
                    event.deep_get("ParentImage", default="") == "",
                    event.deep_get("ParentImage", default="") in ["", "-"],
                ]
            ),
            not any(
                [
                    all(
                        [
                            event.deep_get("ParentImage", default="").endswith(
                                ":\\ManageEngine\\ADManager Plus\\pgsql\\bin\\postgres.exe"
                            ),
                            event.deep_get("Image", default="").endswith("\\cmd.exe"),
                        ]
                    ),
                    all(
                        [
                            ':\\WINDOWS\\system32\\cmd.exe /c "'
                            in event.deep_get("CommandLine", default=""),
                            ":\\WINDOWS\\Temp\\asgard2-agent\\"
                            in event.deep_get("CurrentDirectory", default=""),
                        ]
                    ),
                    all(
                        [
                            ":\\IBM\\SpectrumProtect\\webserver\\scripts\\"
                            in event.deep_get("ParentImage", default=""),
                            ":\\IBM\\SpectrumProtect\\webserver\\scripts\\"
                            in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Elevated System Shell Spawned From Uncommon Parent Location
id: 178e615d-e666-498b-9630-9ed363038101
related:
    - id: 61065c72-5d7d-44ef-bf41-6a36684b545f
      type: similar
status: test
description: Detects when a shell program such as the Windows command prompt or PowerShell is launched with system privileges from a uncommon parent location.
references:
    - https://github.com/Wh04m1001/SysmonEoP
author: frack113, Tim Shelton (update fp)
date: 2022-12-05
modified: 2025-03-06
tags:
    - attack.privilege-escalation
    - attack.execution
    - attack.t1059
logsource:
    product: windows
    category: process_creation
detection:
    selection_shell:
        - Image|endswith:
              - '\powershell.exe'
              - '\powershell_ise.exe'
              - '\pwsh.exe'
              - '\cmd.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'powershell_ise.EXE'
              - 'pwsh.dll'
              - 'Cmd.Exe'
    selection_user:
        User|contains: # covers many language settings
            - 'AUTHORI'
            - 'AUTORI'
        LogonId: '0x3e7'
    filter_main_generic:
        # Example 1:
        #   C:\Program Files\erl-23.2\erts-11.1.4\bin\erl.exe" -service_event ErlSrv_RabbitMQ -nohup -sname rabbit@localhost -s rabbit boot -boot start_sasl +W w +MBas ageffcbf +MHas ageffcbf +MBlmbcs 512 +MHlmbcs 512 +MMmcs 30 +P 1048576 +t 5000000 +stbt db +zdbbl 128000 +sbwt none +sbwtdcpu none +sbwtdio none -kernel inet_dist_listen_min 25672 -kernel inet_dist_listen_max 25672 -lager crash_log false -lager handlers []
        # Example 2:
        #   ParentImage: C:\Program Files (x86)\Varonis\DatAdvantage\GridCollector\VrnsRealTimeAlertsSvc.exe" /appid 000000ad-cb03-500b-9459-c46d000000ad
        #   CommandLine: C:\Windows\system32\cmd.exe /c C:\Program Files "(x86)\Varonis\DatAdvantage\GridCollector\handle_scopes.cmd C:\Collector" Working Share\VaronisWorkDirectoryCollector
        ParentImage|contains:
            - ':\Program Files (x86)\'
            - ':\Program Files\'
            - ':\ProgramData\'
            - ':\Windows\System32\'
            - ':\Windows\SysWOW64\'
            - ':\Windows\Temp\' # Installers
            - ':\Windows\WinSxS\'
    filter_optional_manageengine:
        # Example:
        #   ParentImage: C:/ManageEngine/ADManager Plus/pgsql/bin/postgres.exe" --forkarch 5380
        #   CommandLine: C:\Windows\system32\cmd.exe /c "IF EXIST archive.bat (archive.bat pg_wal\000000010000008E000000EA 000000010000008E000000EA)
        ParentImage|endswith: ':\ManageEngine\ADManager Plus\pgsql\bin\postgres.exe'
        Image|endswith: '\cmd.exe'
    filter_optional_asgard:
        CommandLine|contains: ':\WINDOWS\system32\cmd.exe /c "'
        CurrentDirectory|contains: ':\WINDOWS\Temp\asgard2-agent\'
    filter_optional_ibm_spectrumprotect:
        ParentImage|contains: ':\IBM\SpectrumProtect\webserver\scripts\'
        CommandLine|contains: ':\IBM\SpectrumProtect\webserver\scripts\'
    filter_main_parent_null:
        ParentImage: null
    filter_main_parent_empty:
        ParentImage:
            - ''
            - '-'
    condition: all of selection_* and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Some legitimate applications may spawn shells from uncommon parent locations. Apply additional filters and perform an initial baseline before deploying.
level: medium
Convert to SIEM query
medium
Enable BPF Kprobes Tracing
Detects common command used to enable bpf kprobes tracing
status test author Nasreddine Bencherchali (Nextron Systems) id 7692f583-bd30-4008-8615-75dab3f08a99
panther query
def rule(event):
    if all(
        [
            "echo 1 >" in event.deep_get("CommandLine", default=""),
            "/sys/kernel/debug/tracing/events/kprobes/"
            in event.deep_get("CommandLine", default=""),
            any(
                [
                    "/myprobe/enable" in event.deep_get("CommandLine", default=""),
                    "/myretprobe/enable" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Enable BPF Kprobes Tracing
id: 7692f583-bd30-4008-8615-75dab3f08a99
status: test
description: Detects common command used to enable bpf kprobes tracing
references:
    - https://embracethered.com/blog/posts/2021/offensive-bpf-bpftrace/
    - https://bpftrace.org/
    - https://www.kernel.org/doc/html/v5.0/trace/kprobetrace.html
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-25
tags:
    - attack.execution
    - attack.stealth
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        CommandLine|contains|all:
            - 'echo 1 >'
            - '/sys/kernel/debug/tracing/events/kprobes/'
        CommandLine|contains:
            - '/myprobe/enable'
            - '/myretprobe/enable'
    condition: selection
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Enable Local Manifest Installation With Winget
Detects changes to the AppInstaller (winget) policy. Specifically the activation of the local manifest installation, which allows a user to install new packages via custom manifests.
status test author Nasreddine Bencherchali (Nextron Systems) id fa277e82-9b78-42dd-b05c-05555c7b6015
panther query
def rule(event):
    if all(
        [
            event.deep_get("TargetObject", default="").endswith(
                "\\AppInstaller\\EnableLocalManifestFiles"
            ),
            event.deep_get("Details", default="") == "DWORD (0x00000001)",
        ]
    ):
        return True
    return False
view Sigma YAML
title: Enable Local Manifest Installation With Winget
id: fa277e82-9b78-42dd-b05c-05555c7b6015
status: test
description: Detects changes to the AppInstaller (winget) policy. Specifically the activation of the local manifest installation, which allows a user to install new packages via custom manifests.
references:
    - https://github.com/nasbench/Misc-Research/tree/b9596e8109dcdb16ec353f316678927e507a5b8d/LOLBINs/Winget
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-04-17
modified: 2023-08-17
tags:
    - attack.persistence
    - attack.stealth
logsource:
    product: windows
    category: registry_set
detection:
    selection:
        TargetObject|endswith: '\AppInstaller\EnableLocalManifestFiles'
        Details: 'DWORD (0x00000001)'
    condition: selection
falsepositives:
    - Administrators or developers might enable this for testing purposes or to install custom private packages
level: medium
Convert to SIEM query
medium
Enable Microsoft Dynamic Data Exchange
Enable Dynamic Data Exchange protocol (DDE) in all supported editions of Microsoft Word or Excel.
status test author frack113 id 63647769-326d-4dde-a419-b925cc0caf42
panther query
def rule(event):
    if any(
        [
            all(
                [
                    event.deep_get("TargetObject", default="").endswith(
                        "\\Word\\Security\\AllowDDE"
                    ),
                    event.deep_get("Details", default="")
                    in ["DWORD (0x00000001)", "DWORD (0x00000002)"],
                ]
            ),
            all(
                [
                    any(
                        [
                            event.deep_get("TargetObject", default="").endswith(
                                "\\Excel\\Security\\DisableDDEServerLaunch"
                            ),
                            event.deep_get("TargetObject", default="").endswith(
                                "\\Excel\\Security\\DisableDDEServerLookup"
                            ),
                        ]
                    ),
                    event.deep_get("Details", default="") == "DWORD (0x00000000)",
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Enable Microsoft Dynamic Data Exchange
id: 63647769-326d-4dde-a419-b925cc0caf42
status: test
description: Enable Dynamic Data Exchange protocol (DDE) in all supported editions of Microsoft Word or Excel.
references:
    - https://msrc.microsoft.com/update-guide/vulnerability/ADV170021
author: frack113
date: 2022-02-26
modified: 2023-08-17
tags:
    - attack.execution
    - attack.t1559.002
logsource:
    category: registry_set
    product: windows
detection:
    selection_word:
        TargetObject|endswith: '\Word\Security\AllowDDE'
        Details:
            - 'DWORD (0x00000001)'
            - 'DWORD (0x00000002)'
    selection_excel:
        TargetObject|endswith:
            - '\Excel\Security\DisableDDEServerLaunch'
            - '\Excel\Security\DisableDDEServerLookup'
        Details: 'DWORD (0x00000000)'
    condition: 1 of selection_*
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Enable Remote Connection Between Anonymous Computer - AllowAnonymousCallback
Detects enabling of the "AllowAnonymousCallback" registry value, which allows a remote connection between computers that do not have a trust relationship.
status test author X__Junior (Nextron Systems) id 4d431012-2ab5-4db7-a84e-b29809da2172
panther query
def rule(event):
    if all(
        [
            "\\Microsoft\\WBEM\\CIMOM\\AllowAnonymousCallback"
            in event.deep_get("TargetObject", default=""),
            event.deep_get("Details", default="") == "DWORD (0x00000001)",
        ]
    ):
        return True
    return False
view Sigma YAML
title: Enable Remote Connection Between Anonymous Computer - AllowAnonymousCallback
id: 4d431012-2ab5-4db7-a84e-b29809da2172
status: test
description: Detects enabling of the "AllowAnonymousCallback" registry value, which allows a remote connection between computers that do not have a trust relationship.
references:
    - https://learn.microsoft.com/en-us/windows/win32/wmisdk/connecting-to-wmi-remotely-starting-with-vista
author: X__Junior (Nextron Systems)
date: 2023-11-03
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    product: windows
    category: registry_set
detection:
    selection:
        TargetObject|contains: '\Microsoft\WBEM\CIMOM\AllowAnonymousCallback'
        Details: 'DWORD (0x00000001)'
    condition: selection
falsepositives:
    - Administrative activity
level: medium
Convert to SIEM query
medium
Enable Windows Remote Management
Adversaries may use Valid Accounts to interact with remote systems using Windows Remote Management (WinRM). The adversary may then perform actions as the logged-on user.
status test author frack113 id 991a9744-f2f0-44f2-bd33-9092eba17dc3
panther query
def rule(event):
    if "Enable-PSRemoting " in event.deep_get("ScriptBlockText", default=""):
        return True
    return False
view Sigma YAML
title: Enable Windows Remote Management
id: 991a9744-f2f0-44f2-bd33-9092eba17dc3
status: test
description: Adversaries may use Valid Accounts to interact with remote systems using Windows Remote Management (WinRM). The adversary may then perform actions as the logged-on user.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1021.006/T1021.006.md#atomic-test-1---enable-windows-remote-management
    - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-7.2
author: frack113
date: 2022-01-07
tags:
    - attack.lateral-movement
    - attack.t1021.006
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_cmdlet:
        ScriptBlockText|contains: 'Enable-PSRemoting '
    condition: selection_cmdlet
falsepositives:
    - Legitimate script
level: medium
Convert to SIEM query
medium
Enabling COR Profiler Environment Variables
Detects .NET Framework CLR and .NET Core CLR "cor_enable_profiling" and "cor_profiler" variables being set and configured.
status test author Jose Rodriguez (@Cyb3rPandaH), OTR (Open Threat Research), Jimmy Bayne (@bohops) id ad89044a-8f49-4673-9a55-cbd88a1b374f
panther query
def rule(event):
    if any(
        [
            any(
                [
                    event.deep_get("TargetObject", default="").endswith("\\COR_ENABLE_PROFILING"),
                    event.deep_get("TargetObject", default="").endswith("\\COR_PROFILER"),
                    event.deep_get("TargetObject", default="").endswith(
                        "\\CORECLR_ENABLE_PROFILING"
                    ),
                ]
            ),
            "\\CORECLR_PROFILER_PATH" in event.deep_get("TargetObject", default=""),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Enabling COR Profiler Environment Variables
id: ad89044a-8f49-4673-9a55-cbd88a1b374f
status: test
description: Detects .NET Framework CLR and .NET Core CLR "cor_enable_profiling" and "cor_profiler" variables being set and configured.
references:
    - https://twitter.com/jamieantisocial/status/1304520651248668673
    - https://www.slideshare.net/JamieWilliams130/started-from-the-bottom-exploiting-data-sources-to-uncover-attck-behaviors
    - https://www.sans.org/cyber-security-summit/archives
    - https://learn.microsoft.com/en-us/dotnet/core/runtime-config/debugging-profiling
author: Jose Rodriguez (@Cyb3rPandaH), OTR (Open Threat Research), Jimmy Bayne (@bohops)
date: 2020-09-10
modified: 2023-11-24
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.execution
    - attack.stealth
    - attack.t1574.012
logsource:
    category: registry_set
    product: windows
detection:
    selection_1:
        TargetObject|endswith:
            - '\COR_ENABLE_PROFILING'
            - '\COR_PROFILER'
            - '\CORECLR_ENABLE_PROFILING'
    selection_2:
        TargetObject|contains: '\CORECLR_PROFILER_PATH'
    condition: 1 of selection_*
level: medium
Convert to SIEM query
medium
End User Consent Blocked
Detects when end user consent is blocked due to risk-based consent.
status test author Bailey Bercik '@baileybercik', Mark Morowczynski '@markmorow' id 7091372f-623c-4293-bc37-20c32b3492be
panther query
def rule(event):
    if (
        event.deep_get("failure_status_reason", default="")
        == "Microsoft.online.Security.userConsentBlockedForRiskyAppsExceptions"
    ):
        return True
    return False
view Sigma YAML
title: End User Consent Blocked
id: 7091372f-623c-4293-bc37-20c32b3492be
status: test
description: Detects when end user consent is blocked due to risk-based consent.
references:
    - https://learn.microsoft.com/en-us/entra/architecture/security-operations-applications#end-user-stopped-due-to-risk-based-consent
author: Bailey Bercik '@baileybercik', Mark Morowczynski '@markmorow'
date: 2022-07-10
tags:
    - attack.credential-access
    - attack.t1528
logsource:
    product: azure
    service: auditlogs
detection:
    selection:
        failure_status_reason: 'Microsoft.online.Security.userConsentBlockedForRiskyAppsExceptions'
    condition: selection
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Enumerate All Information With Whoami.EXE
Detects the execution of "whoami.exe" with the "/all" flag
status test author Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems) id c248c896-e412-4279-8c15-1c558067b6fa
panther query
def rule(event):
    if all(
        [
            any(
                [
                    event.deep_get("Image", default="").endswith("\\whoami.exe"),
                    event.deep_get("OriginalFileName", default="") == "whoami.exe",
                ]
            ),
            any(
                [
                    " -all" in event.deep_get("CommandLine", default=""),
                    " /all" in event.deep_get("CommandLine", default=""),
                    " –all" in event.deep_get("CommandLine", default=""),
                    " —all" in event.deep_get("CommandLine", default=""),
                    " ―all" in event.deep_get("CommandLine", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Enumerate All Information With Whoami.EXE
id: c248c896-e412-4279-8c15-1c558067b6fa
status: test
description: Detects the execution of "whoami.exe" with the "/all" flag
references:
    - https://brica.de/alerts/alert/public/1247926/agent-tesla-keylogger-delivered-inside-a-power-iso-daa-archive/
    - https://app.any.run/tasks/7eaba74e-c1ea-400f-9c17-5e30eee89906/
    - https://www.youtube.com/watch?v=DsJ9ByX84o4&t=6s
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2023-12-04
modified: 2024-03-05
tags:
    - attack.discovery
    - attack.t1033
    - car.2016-03-001
logsource:
    category: process_creation
    product: windows
detection:
    selection_main_img:
        - Image|endswith: '\whoami.exe'
        - OriginalFileName: 'whoami.exe'
    selection_main_cli:
        CommandLine|contains|windash: ' -all'
    condition: all of selection_main_*
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Enumerate Credentials from Windows Credential Manager With PowerShell
Adversaries may search for common password storage locations to obtain user credentials. Passwords are stored in several places on a system, depending on the operating system or application holding the credentials.
status test author frack113 id 603c6630-5225-49c1-8047-26c964553e0e
panther query
def rule(event):
    if all(
        [
            "vaultcmd" in event.deep_get("ScriptBlockText", default=""),
            "/listcreds:" in event.deep_get("ScriptBlockText", default=""),
            any(
                [
                    "Windows Credentials" in event.deep_get("ScriptBlockText", default=""),
                    "Web Credentials" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Enumerate Credentials from Windows Credential Manager With PowerShell
id: 603c6630-5225-49c1-8047-26c964553e0e
status: test
description: |
    Adversaries may search for common password storage locations to obtain user credentials.
    Passwords are stored in several places on a system, depending on the operating system or application holding the credentials.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1555/T1555.md
author: frack113
date: 2021-12-20
modified: 2022-12-25
tags:
    - attack.credential-access
    - attack.t1555
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_cmd:
        ScriptBlockText|contains|all:
            - vaultcmd
            - '/listcreds:'
    selection_option:
        ScriptBlockText|contains:
            - 'Windows Credentials'
            - 'Web Credentials'
    condition: all of selection_*
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
medium
Enumeration for 3rd Party Creds From CLI
Detects processes that query known 3rd party registry keys that holds credentials via commandline
status test author Nasreddine Bencherchali (Nextron Systems) id 87a476dc-0079-4583-a985-dee7a20a03de
panther query
def rule(event):
    if all(
        [
            any(
                [
                    "\\Software\\Aerofox\\Foxmail\\V3.1"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\Aerofox\\FoxmailPreview"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\DownloadManager\\Passwords"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\FTPWare\\COREFTP\\Sites"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\IncrediMail\\Identities"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\Martin Prikryl\\WinSCP 2\\Sessions"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\Mobatek\\MobaXterm\\" in event.deep_get("CommandLine", default=""),
                    "\\Software\\OpenSSH\\Agent\\Keys" in event.deep_get("CommandLine", default=""),
                    "\\Software\\OpenVPN-GUI\\configs" in event.deep_get("CommandLine", default=""),
                    "\\Software\\ORL\\WinVNC3\\Password"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\Qualcomm\\Eudora\\CommandLine"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\RealVNC\\WinVNC4" in event.deep_get("CommandLine", default=""),
                    "\\Software\\RimArts\\B2\\Settings"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\SimonTatham\\PuTTY\\Sessions"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\SimonTatham\\PuTTY\\SshHostKeys\\"
                    in event.deep_get("CommandLine", default=""),
                    "\\Software\\Sota\\FFFTP" in event.deep_get("CommandLine", default=""),
                    "\\Software\\TightVNC\\Server" in event.deep_get("CommandLine", default=""),
                    "\\Software\\WOW6432Node\\Radmin\\v3.0\\Server\\Parameters\\Radmin"
                    in event.deep_get("CommandLine", default=""),
                ]
            ),
            not all(
                [
                    event.deep_get("Image", default="").endswith("reg.exe"),
                    any(
                        [
                            "export" in event.deep_get("CommandLine", default=""),
                            "save" in event.deep_get("CommandLine", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
view Sigma YAML
title: Enumeration for 3rd Party Creds From CLI
id: 87a476dc-0079-4583-a985-dee7a20a03de
related:
    - id: e0b0c2ab-3d52-46d9-8cb7-049dc775fbd1
      type: derived
    - id: cc1abf27-78a3-4ac5-a51c-f3070b1d8e40
      type: similar
status: test
description: Detects processes that query known 3rd party registry keys that holds credentials via commandline
references:
    - https://isc.sans.edu/diary/More+Data+Exfiltration/25698
    - https://github.com/synacktiv/Radmin3-Password-Cracker/blob/acfc87393e4b7c06353973a14a6c7126a51f36ac/regkey.txt
    - https://github.com/HyperSine/how-does-MobaXterm-encrypt-password
    - https://book.hacktricks.xyz/windows-hardening/windows-local-privilege-escalation#inside-the-registry
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-06-20
modified: 2025-05-22
tags:
    - attack.credential-access
    - attack.t1552.002
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains: # Add more paths as they are discovered
            - '\Software\Aerofox\Foxmail\V3.1'
            - '\Software\Aerofox\FoxmailPreview'
            - '\Software\DownloadManager\Passwords'
            - '\Software\FTPWare\COREFTP\Sites'
            - '\Software\IncrediMail\Identities'
            - '\Software\Martin Prikryl\WinSCP 2\Sessions'
            - '\Software\Mobatek\MobaXterm\'
            - '\Software\OpenSSH\Agent\Keys'
            - '\Software\OpenVPN-GUI\configs'
            - '\Software\ORL\WinVNC3\Password'
            - '\Software\Qualcomm\Eudora\CommandLine'
            - '\Software\RealVNC\WinVNC4'
            - '\Software\RimArts\B2\Settings'
            - '\Software\SimonTatham\PuTTY\Sessions'
            - '\Software\SimonTatham\PuTTY\SshHostKeys\'
            - '\Software\Sota\FFFTP'
            - '\Software\TightVNC\Server'
            - '\Software\WOW6432Node\Radmin\v3.0\Server\Parameters\Radmin'
    filter_main_other_rule:  # matched by cc1abf27-78a3-4ac5-a51c-f3070b1d8e40
        Image|endswith: 'reg.exe'
        CommandLine|contains:
            - 'export'
            - 'save'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unknown
level: medium
Convert to SIEM query
Showing 301-350 of 1,492