Home/Detection rules/VMware Carbon Black
Tool
EDR / XDR

VMware Carbon Black

3,646 rules · Sigma detections in VMware Carbon Black syntax
The same Sigma detection corpus, machine-rendered into VMware Carbon Black query syntax and ready to paste. Switch platforms above for identical coverage in another language, or choose Sigma (generic) for the portable YAML.
Download all 3,646 rules (.zip, 1.2 MB) Every VMware Carbon Black query in this view, packaged to deploy.
Filter by techniquepick techniques from the ATT&CK matrix
Reconnaissance12
Resource Development10
Initial Access10
Execution30
Persistence42
Privilege Escalation20
Stealth79
Defense Impairment32
Credential Access35
Discovery33
Lateral Movement16
Collection20
Command and Control24
Exfiltration10
Impact18
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.
Judge. Each rule shows a quality tier (Strong / Moderate / Basic) and an estimated alert-volume tier (Low / Medium / High FP), both scored deterministically from the rule's shape - status, detection depth, match breadth, log source, documented false positives and references. A rule existing is not the same as a rule being good, or being quiet; hover either tier for the breakdown. The FP estimate reads rule shape, not a measured rate, so use it to pick what to tune first before you deploy.

Detection rules

50 shown of 3,646
high Strong Medium FP
Potentially Suspicious File Download From ZIP TLD
Detects the download of a file with a potentially suspicious extension from a .zip top level domain.
status test author Florian Roth (Nextron Systems) ATT&CK tactic-only id 0bb4bbeb-fe52-4044-b40c-430a04577ebe
carbon_black query
Contents:.zip\/* (TargetFilename:.bat\:Zone* OR TargetFilename:.dat\:Zone* OR TargetFilename:.dll\:Zone* OR TargetFilename:.doc\:Zone* OR TargetFilename:.docm\:Zone* OR TargetFilename:.exe\:Zone* OR TargetFilename:.hta\:Zone* OR TargetFilename:.pptm\:Zone* OR TargetFilename:.ps1\:Zone* OR TargetFilename:.rar\:Zone* OR TargetFilename:.rtf\:Zone* OR TargetFilename:.sct\:Zone* OR TargetFilename:.vbe\:Zone* OR TargetFilename:.vbs\:Zone* OR TargetFilename:.ws\:Zone* OR TargetFilename:.wsf\:Zone* OR TargetFilename:.xll\:Zone* OR TargetFilename:.xls\:Zone* OR TargetFilename:.xlsm\:Zone* OR TargetFilename:.zip\:Zone*)
view Sigma YAML
title: Potentially Suspicious File Download From ZIP TLD
id: 0bb4bbeb-fe52-4044-b40c-430a04577ebe
status: test
description: Detects the download of a file with a potentially suspicious extension from a .zip top level domain.
references:
    - https://twitter.com/cyb3rops/status/1659175181695287297
    - https://fabian-voith.de/2020/06/25/sysmon-v11-1-reads-alternate-data-streams/
author: Florian Roth (Nextron Systems)
date: 2023-05-18
tags:
    - attack.stealth
logsource:
    product: windows
    category: create_stream_hash
detection:
    selection:
        Contents|contains: '.zip/'
        TargetFilename|contains:
            - '.bat:Zone'
            - '.dat:Zone'
            - '.dll:Zone'
            - '.doc:Zone'
            - '.docm:Zone'
            - '.exe:Zone'
            - '.hta:Zone'
            - '.pptm:Zone'
            - '.ps1:Zone'
            - '.rar:Zone'
            - '.rtf:Zone'
            - '.sct:Zone'
            - '.vbe:Zone'
            - '.vbs:Zone'
            - '.ws:Zone'
            - '.wsf:Zone'
            - '.xll:Zone'
            - '.xls:Zone'
            - '.xlsm:Zone'
            - '.zip:Zone'
    condition: selection
falsepositives:
    - Legitimate file downloads from a websites and web services that uses the ".zip" top level domain.
level: high
Convert to SIEM query
high Moderate Medium FP
Potentially Suspicious Malware Callback Communication
Detects programs that connect to known malware callback ports based on statistical analysis from two different sandbox system databases
status test author Florian Roth (Nextron Systems) ATT&CK technique id 4b89abaa-99fe-4232-afdd-8f9aa4d20382
carbon_black query
(Initiated:true (DestinationPort:100 OR DestinationPort:198 OR DestinationPort:200 OR DestinationPort:243 OR DestinationPort:473 OR DestinationPort:666 OR DestinationPort:700 OR DestinationPort:743 OR DestinationPort:777 OR DestinationPort:1443 OR DestinationPort:1515 OR DestinationPort:1777 OR DestinationPort:1817 OR DestinationPort:1904 OR DestinationPort:1960 OR DestinationPort:2443 OR DestinationPort:2448 OR DestinationPort:3360 OR DestinationPort:3675 OR DestinationPort:3939 OR DestinationPort:4040 OR DestinationPort:4433 OR DestinationPort:4438 OR DestinationPort:4443 OR DestinationPort:4444 OR DestinationPort:4455 OR DestinationPort:5445 OR DestinationPort:5552 OR DestinationPort:5649 OR DestinationPort:6625 OR DestinationPort:7210 OR DestinationPort:7777 OR DestinationPort:8143 OR DestinationPort:8843 OR DestinationPort:9631 OR DestinationPort:9943 OR DestinationPort:10101 OR DestinationPort:12102 OR DestinationPort:12103 OR DestinationPort:12322 OR DestinationPort:13145 OR DestinationPort:13394 OR DestinationPort:13504 OR DestinationPort:13505 OR DestinationPort:13506 OR DestinationPort:13507 OR DestinationPort:14102 OR DestinationPort:14103 OR DestinationPort:14154 OR DestinationPort:49180 OR DestinationPort:65520 OR DestinationPort:65535)) (-(DestinationIp:127.* OR DestinationIp:10.* OR DestinationIp:172.16.* OR DestinationIp:172.17.* OR DestinationIp:172.18.* OR DestinationIp:172.19.* OR DestinationIp:172.20.* OR DestinationIp:172.21.* OR DestinationIp:172.22.* OR DestinationIp:172.23.* OR DestinationIp:172.24.* OR DestinationIp:172.25.* OR DestinationIp:172.26.* OR DestinationIp:172.27.* OR DestinationIp:172.28.* OR DestinationIp:172.29.* OR DestinationIp:172.30.* OR DestinationIp:172.31.* OR DestinationIp:192.168.* OR DestinationIp:169.254.* OR DestinationIp:\:\:1 OR DestinationIp:fe8* OR DestinationIp:fe9* OR DestinationIp:fea* OR DestinationIp:feb* OR DestinationIp:fc* OR DestinationIp:fd*)) (-(Image:C\:\\Program\ Files\\* OR Image:C\:\\Program\ Files\ \(x86\)\\*))
view Sigma YAML
title: Potentially Suspicious Malware Callback Communication
id: 4b89abaa-99fe-4232-afdd-8f9aa4d20382
related:
    - id: 6d8c3d20-a5e1-494f-8412-4571d716cf5c
      type: similar
status: test
description: |
    Detects programs that connect to known malware callback ports based on statistical analysis from two different sandbox system databases
references:
    - https://docs.google.com/spreadsheets/d/17pSTDNpa0sf6pHeRhusvWG6rThciE8CsXTSlDUAZDyo
author: Florian Roth (Nextron Systems)
date: 2017-03-19
modified: 2024-03-12
tags:
    - attack.persistence
    - attack.command-and-control
    - attack.t1571
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        Initiated: 'true'
        DestinationPort:
            - 100
            - 198
            - 200
            - 243
            - 473
            - 666
            - 700
            - 743
            - 777
            - 1443
            - 1515
            - 1777
            - 1817
            - 1904
            - 1960
            - 2443
            - 2448
            - 3360
            - 3675
            - 3939
            - 4040
            - 4433
            - 4438
            - 4443
            - 4444
            - 4455
            - 5445
            - 5552
            - 5649
            - 6625
            - 7210
            - 7777
            - 8143
            - 8843
            - 9631
            - 9943
            - 10101
            - 12102
            - 12103
            - 12322
            - 13145
            - 13394
            - 13504
            - 13505
            - 13506
            - 13507
            - 14102
            - 14103
            - 14154
            - 49180
            - 65520
            - 65535
    filter_main_local_ranges:
        DestinationIp|cidr:
            - '127.0.0.0/8'
            - '10.0.0.0/8'
            - '172.16.0.0/12'
            - '192.168.0.0/16'
            - '169.254.0.0/16'
            - '::1/128'  # IPv6 loopback
            - 'fe80::/10'  # IPv6 link-local addresses
            - 'fc00::/7'  # IPv6 private addresses
    filter_optional_sys_directories:
        Image|startswith:
            - 'C:\Program Files\'
            - 'C:\Program Files (x86)\'
    condition: selection and not 1 of filter_main_* and not 1 of filter_optional_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Strong Medium FP
Potentially Suspicious Malware Callback Communication - Linux
Detects programs that connect to known malware callback ports based on threat intelligence reports.
status test author hasselj ATT&CK technique id dbfc7c98-04ab-4ab7-aa94-c74d22aa7376
carbon_black query
(Initiated:true (DestinationPort:888 OR DestinationPort:999 OR DestinationPort:2200 OR DestinationPort:2222 OR DestinationPort:4000 OR DestinationPort:4444 OR DestinationPort:6789 OR DestinationPort:8531 OR DestinationPort:50501 OR DestinationPort:51820)) (-(DestinationIp:127.* OR DestinationIp:10.* OR DestinationIp:172.16.* OR DestinationIp:172.17.* OR DestinationIp:172.18.* OR DestinationIp:172.19.* OR DestinationIp:172.20.* OR DestinationIp:172.21.* OR DestinationIp:172.22.* OR DestinationIp:172.23.* OR DestinationIp:172.24.* OR DestinationIp:172.25.* OR DestinationIp:172.26.* OR DestinationIp:172.27.* OR DestinationIp:172.28.* OR DestinationIp:172.29.* OR DestinationIp:172.30.* OR DestinationIp:172.31.* OR DestinationIp:192.168.* OR DestinationIp:169.254.* OR DestinationIp:\:\:1 OR DestinationIp:fe8* OR DestinationIp:fe9* OR DestinationIp:fea* OR DestinationIp:feb* OR DestinationIp:fc* OR DestinationIp:fd*))
view Sigma YAML
title: Potentially Suspicious Malware Callback Communication - Linux
id: dbfc7c98-04ab-4ab7-aa94-c74d22aa7376
related:
    - id: 4b89abaa-99fe-4232-afdd-8f9aa4d20382
      type: derived
status: test
description: |
    Detects programs that connect to known malware callback ports based on threat intelligence reports.
references:
    - https://www.mandiant.com/resources/blog/triton-actor-ttp-profile-custom-attack-tools-detections
    - https://www.mandiant.com/resources/blog/ukraine-and-sandworm-team
    - https://www.elastic.co/guide/en/security/current/potential-non-standard-port-ssh-connection.html
    - https://thehackernews.com/2024/01/systembc-malwares-c2-server-analysis.html
    - https://www.cybereason.com/blog/sliver-c2-leveraged-by-many-threat-actors
author: hasselj
date: 2024-05-10
tags:
    - attack.persistence
    - attack.command-and-control
    - attack.t1571
logsource:
    category: network_connection
    product: linux
detection:
    selection:
        Initiated: 'true'
        DestinationPort:
            - 888
            - 999
            - 2200
            - 2222
            - 4000
            - 4444
            - 6789
            - 8531
            - 50501
            - 51820
    filter_main_local_ranges:
        DestinationIp|cidr:
            - '127.0.0.0/8'
            - '10.0.0.0/8'
            - '172.16.0.0/12'
            - '192.168.0.0/16'
            - '169.254.0.0/16'
            - '::1/128'         # IPv6 loopback
            - 'fe80::/10'       # IPv6 link-local addresses
            - 'fc00::/7'        # IPv6 private addresses
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
Potentially Suspicious ODBC Driver Registered
Detects the registration of a new ODBC driver where the driver is located in a potentially suspicious location
status test author Nasreddine Bencherchali (Nextron Systems) ATT&CK technique id e4d22291-f3d5-4b78-9a0c-a1fbaf32a6a4
carbon_black query
TargetObject:\\SOFTWARE\\ODBC\\ODBCINST.INI\\* (TargetObject:\\Driver OR TargetObject:\\Setup) (Details:\:\\PerfLogs\\* OR Details:\:\\ProgramData\\* OR Details:\:\\Temp\\* OR Details:\:\\Users\\Public\\* OR Details:\:\\Windows\\Registration\\CRMLog* OR Details:\:\\Windows\\System32\\com\\dmp\\* OR Details:\:\\Windows\\System32\\FxsTmp\\* OR Details:\:\\Windows\\System32\\Microsoft\\Crypto\\RSA\\MachineKeys\\* OR Details:\:\\Windows\\System32\\spool\\drivers\\color\\* OR Details:\:\\Windows\\System32\\spool\\PRINTERS\\* OR Details:\:\\Windows\\System32\\spool\\SERVERS\\* OR Details:\:\\Windows\\System32\\Tasks_Migrated\\* OR Details:\:\\Windows\\System32\\Tasks\\Microsoft\\Windows\\SyncCenter\\* OR Details:\:\\Windows\\SysWOW64\\com\\dmp\\* OR Details:\:\\Windows\\SysWOW64\\FxsTmp\\* OR Details:\:\\Windows\\SysWOW64\\Tasks\\Microsoft\\Windows\\PLA\\System\\* OR Details:\:\\Windows\\SysWOW64\\Tasks\\Microsoft\\Windows\\SyncCenter\\* OR Details:\:\\Windows\\Tasks\\* OR Details:\:\\Windows\\Temp\\* OR Details:\:\\Windows\\Tracing\\* OR Details:\\AppData\\Local\\Temp\\* OR Details:\\AppData\\Roaming\\*)
view Sigma YAML
title: Potentially Suspicious ODBC Driver Registered
id: e4d22291-f3d5-4b78-9a0c-a1fbaf32a6a4
status: test
description: Detects the registration of a new ODBC driver where the driver is located in a potentially suspicious location
references:
    - https://www.hexacorn.com/blog/2020/08/23/odbcconf-lolbin-trifecta/
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-05-23
modified: 2023-08-17
tags:
    - attack.credential-access
    - attack.persistence
    - attack.t1003
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: '\SOFTWARE\ODBC\ODBCINST.INI\'
        TargetObject|endswith:
            - '\Driver'
            - '\Setup'
        Details|contains:
            - ':\PerfLogs\'
            - ':\ProgramData\'
            - ':\Temp\'
            - ':\Users\Public\'
            - ':\Windows\Registration\CRMLog'
            - ':\Windows\System32\com\dmp\'
            - ':\Windows\System32\FxsTmp\'
            - ':\Windows\System32\Microsoft\Crypto\RSA\MachineKeys\'
            - ':\Windows\System32\spool\drivers\color\'
            - ':\Windows\System32\spool\PRINTERS\'
            - ':\Windows\System32\spool\SERVERS\'
            - ':\Windows\System32\Tasks_Migrated\'
            - ':\Windows\System32\Tasks\Microsoft\Windows\SyncCenter\'
            - ':\Windows\SysWOW64\com\dmp\'
            - ':\Windows\SysWOW64\FxsTmp\'
            - ':\Windows\SysWOW64\Tasks\Microsoft\Windows\PLA\System\'
            - ':\Windows\SysWOW64\Tasks\Microsoft\Windows\SyncCenter\'
            - ':\Windows\Tasks\'
            - ':\Windows\Temp\'
            - ':\Windows\Tracing\'
            - '\AppData\Local\Temp\'
            - '\AppData\Roaming\'
    condition: selection
falsepositives:
    - Unlikely
level: high
Convert to SIEM query
high Strong Medium FP
Potentially Suspicious Office Document Executed From Trusted Location
Detects the execution of an Office application that points to a document that is located in a trusted location. Attackers often used this to avoid macro security and execute their malicious code.
status test author Nasreddine Bencherchali (Nextron Systems) ATT&CK technique id f99abdf0-6283-4e71-bd2b-b5c048a94743
carbon_black query
((ParentImage:\\explorer.exe OR ParentImage:\\dopus.exe) ((Image:\\EXCEL.EXE OR Image:\\POWERPNT.EXE OR Image:\\WINWORD.exe) OR (OriginalFileName:Excel.exe OR OriginalFileName:POWERPNT.EXE OR OriginalFileName:WinWord.exe)) (CommandLine:\\AppData\\Roaming\\Microsoft\\Templates* OR CommandLine:\\AppData\\Roaming\\Microsoft\\Word\\Startup\\* OR CommandLine:\\Microsoft\ Office\\root\\Templates\\* OR CommandLine:\\Microsoft\ Office\\Templates\\*)) (-(CommandLine:.dotx OR CommandLine:.xltx OR CommandLine:.potx))
view Sigma YAML
title: Potentially Suspicious Office Document Executed From Trusted Location
id: f99abdf0-6283-4e71-bd2b-b5c048a94743
status: test
description: Detects the execution of an Office application that points to a document that is located in a trusted location. Attackers often used this to avoid macro security and execute their malicious code.
references:
    - Internal Research
    - https://twitter.com/Max_Mal_/status/1633863678909874176
    - https://techcommunity.microsoft.com/t5/microsoft-365-blog/new-security-hardening-policies-for-trusted-documents/ba-p/3023465
    - https://twitter.com/_JohnHammond/status/1588155401752788994
author: Nasreddine Bencherchali (Nextron Systems)
date: 2023-06-21
modified: 2023-10-18
tags:
    - attack.stealth
    - attack.t1202
logsource:
    category: process_creation
    product: windows
detection:
    selection_parent:
        # Note: we add a parent shell to reduce FP. Add additional 3rd party shells that you might use
        ParentImage|endswith:
            - '\explorer.exe'
            - '\dopus.exe'
    selection_img:
        - Image|endswith:
              - '\EXCEL.EXE'
              - '\POWERPNT.EXE'
              - '\WINWORD.exe'
        - OriginalFileName:
              - 'Excel.exe'
              - 'POWERPNT.EXE'
              - 'WinWord.exe'
    selection_trusted_location:
        CommandLine|contains:
            # Note: these are the default locations. Admins/Users could add additional ones that you need to cover
            - '\AppData\Roaming\Microsoft\Templates'
            - '\AppData\Roaming\Microsoft\Word\Startup\'
            - '\Microsoft Office\root\Templates\'
            - '\Microsoft Office\Templates\'
    filter_main_dotx:
        # Note: We add this filter to avoid curious people clicking on template files
        CommandLine|endswith:
            - '.dotx'
            - '.xltx'
            - '.potx'
    condition: all of selection_* and not 1 of filter_main_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Strong High FP
Potentially Suspicious Regsvr32 HTTP IP Pattern
Detects regsvr32 execution to download and install DLLs located remotely where the address is an IP address.
status test author Florian Roth (Nextron Systems) ATT&CK sub-technique id 2dd2c217-bf68-437a-b57c-fe9fd01d5de8
carbon_black query
(Image:\\regsvr32.exe OR OriginalFileName:REGSVR32.EXE) (CommandLine:\ \/i\:http\:\/\/1* OR CommandLine:\ \/i\:http\:\/\/2* OR CommandLine:\ \/i\:http\:\/\/3* OR CommandLine:\ \/i\:http\:\/\/4* OR CommandLine:\ \/i\:http\:\/\/5* OR CommandLine:\ \/i\:http\:\/\/6* OR CommandLine:\ \/i\:http\:\/\/7* OR CommandLine:\ \/i\:http\:\/\/8* OR CommandLine:\ \/i\:http\:\/\/9* OR CommandLine:\ \/i\:https\:\/\/1* OR CommandLine:\ \/i\:https\:\/\/2* OR CommandLine:\ \/i\:https\:\/\/3* OR CommandLine:\ \/i\:https\:\/\/4* OR CommandLine:\ \/i\:https\:\/\/5* OR CommandLine:\ \/i\:https\:\/\/6* OR CommandLine:\ \/i\:https\:\/\/7* OR CommandLine:\ \/i\:https\:\/\/8* OR CommandLine:\ \/i\:https\:\/\/9* OR CommandLine:\ \-i\:http\:\/\/1* OR CommandLine:\ \-i\:http\:\/\/2* OR CommandLine:\ \-i\:http\:\/\/3* OR CommandLine:\ \-i\:http\:\/\/4* OR CommandLine:\ \-i\:http\:\/\/5* OR CommandLine:\ \-i\:http\:\/\/6* OR CommandLine:\ \-i\:http\:\/\/7* OR CommandLine:\ \-i\:http\:\/\/8* OR CommandLine:\ \-i\:http\:\/\/9* OR CommandLine:\ \-i\:https\:\/\/1* OR CommandLine:\ \-i\:https\:\/\/2* OR CommandLine:\ \-i\:https\:\/\/3* OR CommandLine:\ \-i\:https\:\/\/4* OR CommandLine:\ \-i\:https\:\/\/5* OR CommandLine:\ \-i\:https\:\/\/6* OR CommandLine:\ \-i\:https\:\/\/7* OR CommandLine:\ \-i\:https\:\/\/8* OR CommandLine:\ \-i\:https\:\/\/9*)
view Sigma YAML
title: Potentially Suspicious Regsvr32 HTTP IP Pattern
id: 2dd2c217-bf68-437a-b57c-fe9fd01d5de8
status: test
description: Detects regsvr32 execution to download and install DLLs located remotely where the address is an IP address.
references:
    - https://twitter.com/mrd0x/status/1461041276514623491
    - https://twitter.com/tccontre18/status/1480950986650832903
    - https://lolbas-project.github.io/lolbas/Binaries/Regsvr32/
author: Florian Roth (Nextron Systems)
date: 2022-01-11
modified: 2023-05-24
tags:
    - attack.stealth
    - attack.t1218.010
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\regsvr32.exe'
        - OriginalFileName: 'REGSVR32.EXE'
    selection_ip:
        CommandLine|contains:
            - ' /i:http://1'
            - ' /i:http://2'
            - ' /i:http://3'
            - ' /i:http://4'
            - ' /i:http://5'
            - ' /i:http://6'
            - ' /i:http://7'
            - ' /i:http://8'
            - ' /i:http://9'
            - ' /i:https://1'
            - ' /i:https://2'
            - ' /i:https://3'
            - ' /i:https://4'
            - ' /i:https://5'
            - ' /i:https://6'
            - ' /i:https://7'
            - ' /i:https://8'
            - ' /i:https://9'
            - ' -i:http://1'
            - ' -i:http://2'
            - ' -i:http://3'
            - ' -i:http://4'
            - ' -i:http://5'
            - ' -i:http://6'
            - ' -i:http://7'
            - ' -i:http://8'
            - ' -i:http://9'
            - ' -i:https://1'
            - ' -i:https://2'
            - ' -i:https://3'
            - ' -i:https://4'
            - ' -i:https://5'
            - ' -i:https://6'
            - ' -i:https://7'
            - ' -i:https://8'
            - ' -i:https://9'
    condition: all of selection_*
falsepositives:
    - FQDNs that start with a number such as "7-Zip"
level: high
Convert to SIEM query
high Moderate High FP
PowerShell ADRecon Execution
Detects execution of ADRecon.ps1 for AD reconnaissance which has been reported to be actively used by FIN7
status test author Bhabesh Raj ATT&CK sub-technique id bf72941a-cba0-41ea-b18c-9aca3925690d
carbon_black query
ScriptBlockText:Function\ Get\-ADRExcelComOb* OR ScriptBlockText:Get\-ADRGPO* OR ScriptBlockText:Get\-ADRDomainController* OR ScriptBlockText:ADRecon\-Report.xlsx*
view Sigma YAML
title: PowerShell ADRecon Execution
id: bf72941a-cba0-41ea-b18c-9aca3925690d
status: test
description: Detects execution of ADRecon.ps1 for AD reconnaissance which has been reported to be actively used by FIN7
references:
    - https://github.com/sense-of-security/ADRecon/blob/11881a24e9c8b207f31b56846809ce1fb189bcc9/ADRecon.ps1
    - https://bi-zone.medium.com/from-pentest-to-apt-attack-cybercriminal-group-fin7-disguises-its-malware-as-an-ethical-hackers-c23c9a75e319
author: Bhabesh Raj
date: 2021-07-16
modified: 2022-09-06
tags:
    - attack.discovery
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains:
            - 'Function Get-ADRExcelComOb'
            - 'Get-ADRGPO'
            - 'Get-ADRDomainController'
            - 'ADRecon-Report.xlsx' # Default
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
PowerShell Base64 Encoded FromBase64String Cmdlet
Detects usage of a base64 encoded "FromBase64String" cmdlet in a process command line
status test author Florian Roth (Nextron Systems) ATT&CK sub-technique id fdb62a13-9a81-4e5c-a38f-ea93a16f6d7c
carbon_black query
CommandLine:OjpGcm9tQmFzZTY0U3RyaW5n* OR CommandLine:o6RnJvbUJhc2U2NFN0cmluZ* OR CommandLine:6OkZyb21CYXNlNjRTdHJpbm* OR (CommandLine:OgA6AEYAcgBvAG0AQgBhAHMAZQA2ADQAUwB0AHIAaQBuAGcA* OR CommandLine:oAOgBGAHIAbwBtAEIAYQBzAGUANgA0AFMAdAByAGkAbgBnA* OR CommandLine:6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZw*)
view Sigma YAML
title: PowerShell Base64 Encoded FromBase64String Cmdlet
id: fdb62a13-9a81-4e5c-a38f-ea93a16f6d7c
status: test
description: Detects usage of a base64 encoded "FromBase64String" cmdlet in a process command line
references:
    - Internal Research
author: Florian Roth (Nextron Systems)
date: 2019-08-24
modified: 2023-04-06
tags:
    - attack.stealth
    - attack.t1140
    - attack.execution
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        - CommandLine|base64offset|contains: '::FromBase64String'
        # UTF-16 LE
        - CommandLine|contains:
              - 'OgA6AEYAcgBvAG0AQgBhAHMAZQA2ADQAUwB0AHIAaQBuAGcA'
              - 'oAOgBGAHIAbwBtAEIAYQBzAGUANgA0AFMAdAByAGkAbgBnA'
              - '6ADoARgByAG8AbQBCAGEAcwBlADYANABTAHQAcgBpAG4AZw'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
PowerShell Base64 Encoded IEX Cmdlet
Detects usage of a base64 encoded "IEX" cmdlet in a process command line
status test author Florian Roth (Nextron Systems) ATT&CK sub-technique id 88f680b8-070e-402c-ae11-d2914f2257f1
carbon_black query
(CommandLine:SUVYIChb* OR CommandLine:lFWCAoW* OR CommandLine:JRVggKF* OR CommandLine:aWV4IChb* OR CommandLine:lleCAoW* OR CommandLine:pZXggKF* OR CommandLine:aWV4IChOZX* OR CommandLine:lleCAoTmV3* OR CommandLine:pZXggKE5ld* OR CommandLine:SUVYIChOZX* OR CommandLine:lFWCAoTmV3* OR CommandLine:JRVggKE5ld* OR CommandLine:SUVYKF* OR CommandLine:lFWChb* OR CommandLine:JRVgoW* OR CommandLine:aWV4KF* OR CommandLine:lleChb* OR CommandLine:pZXgoW* OR CommandLine:aWV4KE5ld* OR CommandLine:lleChOZX* OR CommandLine:pZXgoTmV3* OR CommandLine:SUVYKE5ld* OR CommandLine:lFWChOZX* OR CommandLine:JRVgoTmV3* OR CommandLine:SUVYKCgn* OR CommandLine:lFWCgoJ* OR CommandLine:JRVgoKC* OR CommandLine:aWV4KCgn* OR CommandLine:lleCgoJ* OR CommandLine:pZXgoKC*) OR (CommandLine:SQBFAFgAIAAoAFsA* OR CommandLine:kARQBYACAAKABbA* OR CommandLine:JAEUAWAAgACgAWw* OR CommandLine:aQBlAHgAIAAoAFsA* OR CommandLine:kAZQB4ACAAKABbA* OR CommandLine:pAGUAeAAgACgAWw* OR CommandLine:aQBlAHgAIAAoAE4AZQB3A* OR CommandLine:kAZQB4ACAAKABOAGUAdw* OR CommandLine:pAGUAeAAgACgATgBlAHcA* OR CommandLine:SQBFAFgAIAAoAE4AZQB3A* OR CommandLine:kARQBYACAAKABOAGUAdw* OR CommandLine:JAEUAWAAgACgATgBlAHcA*)
view Sigma YAML
title: PowerShell Base64 Encoded IEX Cmdlet
id: 88f680b8-070e-402c-ae11-d2914f2257f1
status: test
description: Detects usage of a base64 encoded "IEX" cmdlet in a process command line
references:
    - Internal Research
author: Florian Roth (Nextron Systems)
date: 2019-08-23
modified: 2023-04-06
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        - CommandLine|base64offset|contains:
              - 'IEX (['
              - 'iex (['
              - 'iex (New'
              - 'IEX (New'
              - 'IEX(['
              - 'iex(['
              - 'iex(New'
              - 'IEX(New'
              - "IEX(('"
              - "iex(('"
        # UTF16 LE
        - CommandLine|contains:
              - 'SQBFAFgAIAAoAFsA'
              - 'kARQBYACAAKABbA'
              - 'JAEUAWAAgACgAWw'
              - 'aQBlAHgAIAAoAFsA'
              - 'kAZQB4ACAAKABbA'
              - 'pAGUAeAAgACgAWw'
              - 'aQBlAHgAIAAoAE4AZQB3A'
              - 'kAZQB4ACAAKABOAGUAdw'
              - 'pAGUAeAAgACgATgBlAHcA'
              - 'SQBFAFgAIAAoAE4AZQB3A'
              - 'kARQBYACAAKABOAGUAdw'
              - 'JAEUAWAAgACgATgBlAHcA'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate Medium FP
PowerShell Base64 Encoded Invoke Keyword
Detects UTF-8 and UTF-16 Base64 encoded powershell 'Invoke-' calls
status test author pH-T (Nextron Systems), Harjot Singh, @cyb3rjy0t ATT&CK sub-technique id 6385697e-9f1b-40bd-8817-f4a91f40508e
carbon_black query
((Image:\\powershell.exe OR Image:\\pwsh.exe) OR (OriginalFileName:PowerShell.EXE OR OriginalFileName:pwsh.dll)) CommandLine:\ \-e* (CommandLine:SQBuAHYAbwBrAGUALQ* OR CommandLine:kAbgB2AG8AawBlAC0A* OR CommandLine:JAG4AdgBvAGsAZQAtA* OR CommandLine:SW52b2tlL* OR CommandLine:ludm9rZS* OR CommandLine:JbnZva2Ut*)
view Sigma YAML
title: PowerShell Base64 Encoded Invoke Keyword
id: 6385697e-9f1b-40bd-8817-f4a91f40508e
related:
    - id: fd6e2919-3936-40c9-99db-0aa922c356f7
      type: obsolete
status: test
description: Detects UTF-8 and UTF-16 Base64 encoded powershell 'Invoke-' calls
references:
    - https://thedfirreport.com/2022/05/09/seo-poisoning-a-gootloader-story/
author: pH-T (Nextron Systems), Harjot Singh, @cyb3rjy0t
date: 2022-05-20
modified: 2023-04-06
tags:
    - attack.execution
    - attack.stealth
    - attack.t1059.001
    - attack.t1027
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    selection_cli_enc:
        CommandLine|contains: ' -e'
    selection_cli_invoke:
        CommandLine|contains:
            # Invoke-
            # UTF-16LE
            - 'SQBuAHYAbwBrAGUALQ'
            - 'kAbgB2AG8AawBlAC0A'
            - 'JAG4AdgBvAGsAZQAtA'
            # UTF-8
            - 'SW52b2tlL'
            - 'ludm9rZS'
            - 'JbnZva2Ut'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
PowerShell Base64 Encoded Reflective Assembly Load
Detects base64 encoded .NET reflective loading of Assembly
status test author Christian Burkard (Nextron Systems), pH-T (Nextron Systems) ATT&CK sub-technique id 62b7ccc9-23b4-471e-aa15-6da3663c4d59
carbon_black query
CommandLine:WwBSAGUAZgBsAGUAYwB0AGkAbwBuAC4AQQBzAHMAZQBtAGIAbAB5AF0AOgA6AEwAbwBhAGQAKA* OR CommandLine:sAUgBlAGYAbABlAGMAdABpAG8AbgAuAEEAcwBzAGUAbQBiAGwAeQBdADoAOgBMAG8AYQBkACgA* OR CommandLine:bAFIAZQBmAGwAZQBjAHQAaQBvAG4ALgBBAHMAcwBlAG0AYgBsAHkAXQA6ADoATABvAGEAZAAoA* OR CommandLine:AFsAcgBlAGYAbABlAGMAdABpAG8AbgAuAGEAcwBzAGUAbQBiAGwAeQBdADoAOgAoACIATABvAGEAZAAiAC* OR CommandLine:BbAHIAZQBmAGwAZQBjAHQAaQBvAG4ALgBhAHMAcwBlAG0AYgBsAHkAXQA6ADoAKAAiAEwAbwBhAGQAIgAp* OR CommandLine:AWwByAGUAZgBsAGUAYwB0AGkAbwBuAC4AYQBzAHMAZQBtAGIAbAB5AF0AOgA6ACgAIgBMAG8AYQBkACIAK* OR CommandLine:WwBSAGUAZgBsAGUAYwB0AGkAbwBuAC4AQQBzAHMAZQBtAGIAbAB5AF0AOgA6ACgAIgBMAG8AYQBkACIAKQ* OR CommandLine:sAUgBlAGYAbABlAGMAdABpAG8AbgAuAEEAcwBzAGUAbQBiAGwAeQBdADoAOgAoACIATABvAGEAZAAiACkA* OR CommandLine:bAFIAZQBmAGwAZQBjAHQAaQBvAG4ALgBBAHMAcwBlAG0AYgBsAHkAXQA6ADoAKAAiAEwAbwBhAGQAIgApA* OR CommandLine:WwByAGUAZgBsAGUAYwB0AGkAbwBuAC4AYQBzAHMAZQBtAGIAbAB5AF0AOgA6AEwAbwBhAGQAKA* OR CommandLine:sAcgBlAGYAbABlAGMAdABpAG8AbgAuAGEAcwBzAGUAbQBiAGwAeQBdADoAOgBMAG8AYQBkACgA* OR CommandLine:bAHIAZQBmAGwAZQBjAHQAaQBvAG4ALgBhAHMAcwBlAG0AYgBsAHkAXQA6ADoATABvAGEAZAAoA*
view Sigma YAML
title: PowerShell Base64 Encoded Reflective Assembly Load
id: 62b7ccc9-23b4-471e-aa15-6da3663c4d59
related:
    - id: 9c0295ce-d60d-40bd-bd74-84673b7592b1
      type: similar
status: test
description: Detects base64 encoded .NET reflective loading of Assembly
references:
    - https://github.com/Neo23x0/Raccine/blob/20a569fa21625086433dcce8bb2765d0ea08dcb6/yara/mal_revil.yar
    - https://thedfirreport.com/2022/05/09/seo-poisoning-a-gootloader-story/
author: Christian Burkard (Nextron Systems), pH-T (Nextron Systems)
date: 2022-03-01
modified: 2023-01-30
tags:
    - attack.execution
    - attack.stealth
    - attack.t1059.001
    - attack.t1027
    - attack.t1620
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains:
            # [Reflection.Assembly]::Load(
            - 'WwBSAGUAZgBsAGUAYwB0AGkAbwBuAC4AQQBzAHMAZQBtAGIAbAB5AF0AOgA6AEwAbwBhAGQAKA'
            - 'sAUgBlAGYAbABlAGMAdABpAG8AbgAuAEEAcwBzAGUAbQBiAGwAeQBdADoAOgBMAG8AYQBkACgA'
            - 'bAFIAZQBmAGwAZQBjAHQAaQBvAG4ALgBBAHMAcwBlAG0AYgBsAHkAXQA6ADoATABvAGEAZAAoA'
            # [reflection.assembly]::("Load")
            - 'AFsAcgBlAGYAbABlAGMAdABpAG8AbgAuAGEAcwBzAGUAbQBiAGwAeQBdADoAOgAoACIATABvAGEAZAAiAC'
            - 'BbAHIAZQBmAGwAZQBjAHQAaQBvAG4ALgBhAHMAcwBlAG0AYgBsAHkAXQA6ADoAKAAiAEwAbwBhAGQAIgAp'
            - 'AWwByAGUAZgBsAGUAYwB0AGkAbwBuAC4AYQBzAHMAZQBtAGIAbAB5AF0AOgA6ACgAIgBMAG8AYQBkACIAK'
            # [Reflection.Assembly]::("Load")
            - 'WwBSAGUAZgBsAGUAYwB0AGkAbwBuAC4AQQBzAHMAZQBtAGIAbAB5AF0AOgA6ACgAIgBMAG8AYQBkACIAKQ'
            - 'sAUgBlAGYAbABlAGMAdABpAG8AbgAuAEEAcwBzAGUAbQBiAGwAeQBdADoAOgAoACIATABvAGEAZAAiACkA'
            - 'bAFIAZQBmAGwAZQBjAHQAaQBvAG4ALgBBAHMAcwBlAG0AYgBsAHkAXQA6ADoAKAAiAEwAbwBhAGQAIgApA'
            # [reflection.assembly]::Load(
            - 'WwByAGUAZgBsAGUAYwB0AGkAbwBuAC4AYQBzAHMAZQBtAGIAbAB5AF0AOgA6AEwAbwBhAGQAKA'
            - 'sAcgBlAGYAbABlAGMAdABpAG8AbgAuAGEAcwBzAGUAbQBiAGwAeQBdADoAOgBMAG8AYQBkACgA'
            - 'bAHIAZQBmAGwAZQBjAHQAaQBvAG4ALgBhAHMAcwBlAG0AYgBsAHkAXQA6ADoATABvAGEAZAAoA'
    condition: selection
falsepositives:
    - Unlikely
level: high
Convert to SIEM query
high Strong Medium FP
PowerShell Base64 Encoded WMI Classes
Detects calls to base64 encoded WMI class such as "Win32_ShadowCopy", "Win32_ScheduledJob", etc.
status test author Christian Burkard (Nextron Systems), Nasreddine Bencherchali (Nextron Systems) ATT&CK sub-technique id 1816994b-42e1-4fb1-afd2-134d88184f71
carbon_black query
((Image:\\powershell.exe OR Image:\\pwsh.exe) OR (OriginalFileName:PowerShell.EXE OR OriginalFileName:pwsh.dll)) ((CommandLine:VwBpAG4AMwAyAF8AUwBoAGEAZABvAHcAYwBvAHAAeQ* OR CommandLine:cAaQBuADMAMgBfAFMAaABhAGQAbwB3AGMAbwBwAHkA* OR CommandLine:XAGkAbgAzADIAXwBTAGgAYQBkAG8AdwBjAG8AcAB5A* OR CommandLine:V2luMzJfU2hhZG93Y29we* OR CommandLine:dpbjMyX1NoYWRvd2NvcH* OR CommandLine:XaW4zMl9TaGFkb3djb3B5*) OR (CommandLine:VwBpAG4AMwAyAF8AUwBjAGgAZQBkAHUAbABlAGQASgBvAGIA* OR CommandLine:cAaQBuADMAMgBfAFMAYwBoAGUAZAB1AGwAZQBkAEoAbwBiA* OR CommandLine:XAGkAbgAzADIAXwBTAGMAaABlAGQAdQBsAGUAZABKAG8AYg* OR CommandLine:V2luMzJfU2NoZWR1bGVkSm9i* OR CommandLine:dpbjMyX1NjaGVkdWxlZEpvY* OR CommandLine:XaW4zMl9TY2hlZHVsZWRKb2*) OR (CommandLine:VwBpAG4AMwAyAF8AUAByAG8AYwBlAHMAcw* OR CommandLine:cAaQBuADMAMgBfAFAAcgBvAGMAZQBzAHMA* OR CommandLine:XAGkAbgAzADIAXwBQAHIAbwBjAGUAcwBzA* OR CommandLine:V2luMzJfUHJvY2Vzc* OR CommandLine:dpbjMyX1Byb2Nlc3* OR CommandLine:XaW4zMl9Qcm9jZXNz*) OR (CommandLine:VwBpAG4AMwAyAF8AVQBzAGUAcgBBAGMAYwBvAHUAbgB0A* OR CommandLine:cAaQBuADMAMgBfAFUAcwBlAHIAQQBjAGMAbwB1AG4AdA* OR CommandLine:XAGkAbgAzADIAXwBVAHMAZQByAEEAYwBjAG8AdQBuAHQA* OR CommandLine:V2luMzJfVXNlckFjY291bn* OR CommandLine:dpbjMyX1VzZXJBY2NvdW50* OR CommandLine:XaW4zMl9Vc2VyQWNjb3Vud*) OR (CommandLine:VwBpAG4AMwAyAF8ATABvAGcAZwBlAGQATwBuAFUAcwBlAHIA* OR CommandLine:cAaQBuADMAMgBfAEwAbwBnAGcAZQBkAE8AbgBVAHMAZQByA* OR CommandLine:XAGkAbgAzADIAXwBMAG8AZwBnAGUAZABPAG4AVQBzAGUAcg* OR CommandLine:V2luMzJfTG9nZ2VkT25Vc2Vy* OR CommandLine:dpbjMyX0xvZ2dlZE9uVXNlc* OR CommandLine:XaW4zMl9Mb2dnZWRPblVzZX*))
view Sigma YAML
title: PowerShell Base64 Encoded WMI Classes
id: 1816994b-42e1-4fb1-afd2-134d88184f71
related:
    - id: 47688f1b-9f51-4656-b013-3cc49a166a36
      type: obsolete
status: test
description: Detects calls to base64 encoded WMI class such as "Win32_ShadowCopy", "Win32_ScheduledJob", etc.
references:
    - https://github.com/Neo23x0/Raccine/blob/20a569fa21625086433dcce8bb2765d0ea08dcb6/yara/mal_revil.yar
author: Christian Burkard (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2023-01-30
tags:
    - attack.execution
    - attack.stealth
    - attack.t1059.001
    - attack.t1027
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
    selection_cli_shadowcopy:
        # Win32_ShadowCopy
        CommandLine|contains:
            - 'VwBpAG4AMwAyAF8AUwBoAGEAZABvAHcAYwBvAHAAeQ'
            - 'cAaQBuADMAMgBfAFMAaABhAGQAbwB3AGMAbwBwAHkA'
            - 'XAGkAbgAzADIAXwBTAGgAYQBkAG8AdwBjAG8AcAB5A'
            - 'V2luMzJfU2hhZG93Y29we'
            - 'dpbjMyX1NoYWRvd2NvcH'
            - 'XaW4zMl9TaGFkb3djb3B5'
    selection_cli_scheduledJob:
        # Win32_ScheduledJob
        CommandLine|contains:
            - 'VwBpAG4AMwAyAF8AUwBjAGgAZQBkAHUAbABlAGQASgBvAGIA'
            - 'cAaQBuADMAMgBfAFMAYwBoAGUAZAB1AGwAZQBkAEoAbwBiA'
            - 'XAGkAbgAzADIAXwBTAGMAaABlAGQAdQBsAGUAZABKAG8AYg'
            - 'V2luMzJfU2NoZWR1bGVkSm9i'
            - 'dpbjMyX1NjaGVkdWxlZEpvY'
            - 'XaW4zMl9TY2hlZHVsZWRKb2'
    selection_cli_process:
        # Win32_Process
        CommandLine|contains:
            - 'VwBpAG4AMwAyAF8AUAByAG8AYwBlAHMAcw'
            - 'cAaQBuADMAMgBfAFAAcgBvAGMAZQBzAHMA'
            - 'XAGkAbgAzADIAXwBQAHIAbwBjAGUAcwBzA'
            - 'V2luMzJfUHJvY2Vzc'
            - 'dpbjMyX1Byb2Nlc3'
            - 'XaW4zMl9Qcm9jZXNz'
    selection_cli_useraccount:
        # Win32_UserAccount
        CommandLine|contains:
            - 'VwBpAG4AMwAyAF8AVQBzAGUAcgBBAGMAYwBvAHUAbgB0A'
            - 'cAaQBuADMAMgBfAFUAcwBlAHIAQQBjAGMAbwB1AG4AdA'
            - 'XAGkAbgAzADIAXwBVAHMAZQByAEEAYwBjAG8AdQBuAHQA'
            - 'V2luMzJfVXNlckFjY291bn'
            - 'dpbjMyX1VzZXJBY2NvdW50'
            - 'XaW4zMl9Vc2VyQWNjb3Vud'
    selection_cli_loggedonuser:
        # Win32_LoggedOnUser
        CommandLine|contains:
            - 'VwBpAG4AMwAyAF8ATABvAGcAZwBlAGQATwBuAFUAcwBlAHIA'
            - 'cAaQBuADMAMgBfAEwAbwBnAGcAZQBkAE8AbgBVAHMAZQByA'
            - 'XAGkAbgAzADIAXwBMAG8AZwBnAGUAZABPAG4AVQBzAGUAcg'
            - 'V2luMzJfTG9nZ2VkT25Vc2Vy'
            - 'dpbjMyX0xvZ2dlZE9uVXNlc'
            - 'XaW4zMl9Mb2dnZWRPblVzZX'
    condition: selection_img and 1 of selection_cli_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
PowerShell Called from an Executable Version Mismatch
Detects PowerShell called from an executable by the version mismatch method
status test author Sean Metcalf (source), Florian Roth (Nextron Systems) ATT&CK sub-technique id c70e019b-1479-4b65-b0cc-cd0c6093a599
carbon_black query
(Data:EngineVersion=2.* OR Data:EngineVersion=4.* OR Data:EngineVersion=5.*) Data:HostVersion=3.*
view Sigma YAML
title: PowerShell Called from an Executable Version Mismatch
id: c70e019b-1479-4b65-b0cc-cd0c6093a599
status: test
description: Detects PowerShell called from an executable by the version mismatch method
references:
    - https://adsecurity.org/?p=2921
author: Sean Metcalf (source), Florian Roth (Nextron Systems)
date: 2017-03-05
modified: 2023-10-27
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_classic_start
detection:
    selection_engine:
        Data|contains:
            - 'EngineVersion=2.'
            - 'EngineVersion=4.'
            - 'EngineVersion=5.'
    selection_host:
        Data|contains: 'HostVersion=3.'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
PowerShell Credential Prompt
Detects PowerShell calling a credential prompt
status test author John Lambert (idea), Florian Roth (Nextron Systems) ATT&CK sub-technique id ca8b77a9-d499-4095-b793-5d5f330d450e
carbon_black query
ScriptBlockText:PromptForCredential*
view Sigma YAML
title: PowerShell Credential Prompt
id: ca8b77a9-d499-4095-b793-5d5f330d450e
status: test
description: Detects PowerShell calling a credential prompt
references:
    - https://twitter.com/JohnLaTwC/status/850381440629981184
    - https://t.co/ezOTGy1a1G
author: John Lambert (idea), Florian Roth (Nextron Systems)
date: 2017-04-09
modified: 2022-12-25
tags:
    - attack.credential-access
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains: 'PromptForCredential'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate Medium FP
PowerShell Defender Threat Severity Default Action Set to 'Allow' or 'NoAction'
Detects the use of PowerShell to execute the 'Set-MpPreference' cmdlet to configure Windows Defender's threat severity default action to 'Allow' (value '6') or 'NoAction' (value '9'). This is a highly suspicious configuration change that effectively disables Defender's ability to automatically mitigate threats of a certain severity level. An attacker might use this technique via the command line to bypass defenses before executing payloads.
status experimental author Matt Anderson (Huntress) ATT&CK technique id 1e8a9b4d-3c2a-4f9b-8d1e-7c6a5b4f3d2e
carbon_black query
CommandLine:Set\-MpPreference* (CommandLine:\-LowThreatDefaultAction* OR CommandLine:\-ModerateThreatDefaultAction* OR CommandLine:\-HighThreatDefaultAction* OR CommandLine:\-SevereThreatDefaultAction* OR CommandLine:\-ltdefac\ * OR CommandLine:\-mtdefac\ * OR CommandLine:\-htdefac\ * OR CommandLine:\-stdefac\ *) (CommandLine:Allow* OR CommandLine:6* OR CommandLine:NoAction* OR CommandLine:9*)
view Sigma YAML
title: PowerShell Defender Threat Severity Default Action Set to 'Allow' or 'NoAction'
id: 1e8a9b4d-3c2a-4f9b-8d1e-7c6a5b4f3d2e
related:
    - id: 5a9e1b2c-8f7d-4a1e-9b3c-0f6d7e5a4b1f
      type: similar
status: experimental
description: |
    Detects the use of PowerShell to execute the 'Set-MpPreference' cmdlet to configure Windows Defender's threat severity default action to 'Allow' (value '6') or 'NoAction' (value '9').
    This is a highly suspicious configuration change that effectively disables Defender's ability to automatically mitigate threats of a certain severity level.
    An attacker might use this technique via the command line to bypass defenses before executing payloads.
references:
    - https://learn.microsoft.com/en-us/powershell/module/defender/set-mppreference
    - https://learn.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/security-malware-windows-defender-threatseveritydefaultaction
    - https://research.splunk.com/endpoint/7215831c-8252-4ae3-8d43-db588e82f952
    - https://gist.github.com/Dump-GUY/8daef859f382b895ac6fd0cf094555d2
    - https://thedfirreport.com/2021/10/18/icedid-to-xinglocker-ransomware-in-24-hours/
author: 'Matt Anderson (Huntress)'
date: 2025-07-11
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection_cmdlet:
        CommandLine|contains: 'Set-MpPreference'
    selection_action:
        CommandLine|contains:
            - '-LowThreatDefaultAction'
            - '-ModerateThreatDefaultAction'
            - '-HighThreatDefaultAction'
            - '-SevereThreatDefaultAction'
            - '-ltdefac '
            - '-mtdefac '
            - '-htdefac '
            - '-stdefac '
    selection_value:
        CommandLine|contains:
            - 'Allow'
            - '6'
            - 'NoAction'
            - '9'
    condition: all of selection_*
falsepositives:
    - Highly unlikely
level: high
Convert to SIEM query
high Strong High FP
PowerShell Download and Execution Cradles
Detects PowerShell download and execution cradles.
status test author Florian Roth (Nextron Systems) ATT&CK technique id 85b0b087-eddf-4a2b-b033-d771fa2b9775
carbon_black query
(CommandLine:.DownloadString\(* OR CommandLine:.DownloadFile\(* OR CommandLine:Invoke\-WebRequest\ * OR CommandLine:iwr\ * OR CommandLine:Invoke\-RestMethod\ * OR CommandLine:irm\ *) (CommandLine:;iex\ $* OR CommandLine:|\ IEX* OR CommandLine:|IEX\ * OR CommandLine:I`E`X* OR CommandLine:I`EX* OR CommandLine:IE`X* OR CommandLine:iex\ * OR CommandLine:IEX\ \(* OR CommandLine:IEX\(* OR CommandLine:Invoke\-Expression*)
view Sigma YAML
title: PowerShell Download and Execution Cradles
id: 85b0b087-eddf-4a2b-b033-d771fa2b9775
status: test
description: Detects PowerShell download and execution cradles.
references:
    - https://github.com/VirtualAlllocEx/Payload-Download-Cradles/blob/88e8eca34464a547c90d9140d70e9866dcbc6a12/Download-Cradles.cmd
    - https://labs.withsecure.com/publications/fin7-target-veeam-servers
author: Florian Roth (Nextron Systems)
date: 2022-03-24
modified: 2025-07-18
tags:
    - attack.execution
    - attack.t1059
logsource:
    product: windows
    category: process_creation
detection:
    selection_download:
        CommandLine|contains:
            - '.DownloadString('
            - '.DownloadFile('
            - 'Invoke-WebRequest '
            - 'iwr '
            - 'Invoke-RestMethod '
            - 'irm '  # powershell -ep bypass -w h -c irm test.domain/ffe | iex
    selection_iex:
        CommandLine|contains:
            - ';iex $'
            - '| IEX'
            - '|IEX '
            - 'I`E`X'
            - 'I`EX'
            - 'IE`X'
            - 'iex '
            - 'IEX ('
            - 'IEX('
            - 'Invoke-Expression'
    condition: all of selection_*
falsepositives:
    - Some PowerShell installers were seen using similar combinations. Apply filters accordingly
level: high
Convert to SIEM query
high Strong Medium FP
PowerShell Execution With Potential Decryption Capabilities
Detects PowerShell commands that decrypt an ".LNK" "file to drop the next stage of the malware.
status test author X__Junior (Nextron Systems), Nasreddine Bencherchali (Nextron Systems) ATT&CK tactic-only id 434c08ba-8406-4d15-8b24-782cb071a691
carbon_black query
((Image:\\powershell.exe OR Image:\\pwsh.exe) (OriginalFileName:PowerShell.EXE OR OriginalFileName:pwsh.dll)) (CommandLine:Get\-ChildItem\ * OR CommandLine:dir\ * OR CommandLine:gci\ * OR CommandLine:ls\ *) (CommandLine:Get\-Content\ * OR CommandLine:gc\ * OR CommandLine:cat\ * OR CommandLine:type\ * OR CommandLine:ReadAllBytes*) ((CommandLine:\ \^|\ * CommandLine:\*.lnk* CommandLine:\-Recurse* CommandLine:\-Skip\ *) OR (CommandLine:\ \-ExpandProperty\ * CommandLine:\*.lnk* CommandLine:WriteAllBytes* CommandLine:\ .length\ *))
view Sigma YAML
title: PowerShell Execution With Potential Decryption Capabilities
id: 434c08ba-8406-4d15-8b24-782cb071a691
status: test
description: Detects PowerShell commands that decrypt an ".LNK" "file to drop the next stage of the malware.
references:
    - https://research.checkpoint.com/2023/chinese-threat-actors-targeting-europe-in-smugx-campaign/
author: X__Junior (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2023-06-30
modified: 2023-12-05
tags:
    - attack.execution
logsource:
    product: windows
    category: process_creation
detection:
    selection_img:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
        OriginalFileName:
            - 'PowerShell.EXE'
            - 'pwsh.dll'
    selection_cli_dir:
        CommandLine|contains:
            - "Get-ChildItem "
            - "dir "
            - "gci "
            - "ls "
    selection_cli_gc:
        CommandLine|contains:
            - "Get-Content "
            - "gc "
            - 'cat '
            - 'type '
            - 'ReadAllBytes'
    selection_cli_specific:
        - CommandLine|contains|all:
              - ' ^| '
              - '\*.lnk'
              - '-Recurse'
              - '-Skip '
        - CommandLine|contains|all:
              - ' -ExpandProperty '
              - '\*.lnk'
              - 'WriteAllBytes'
              - ' .length '
    condition: all of selection_*
falsepositives:
    - Unlikely
level: high
Convert to SIEM query
high Moderate High FP
PowerShell Get-Process LSASS
Detects a "Get-Process" cmdlet and it's aliases on lsass process, which is in almost all cases a sign of malicious activity
status test author Florian Roth (Nextron Systems) ATT&CK sub-technique id b2815d0d-7481-4bf0-9b6c-a4c48a94b349
carbon_black query
CommandLine:Get\-Process\ lsas* OR CommandLine:ps\ lsas* OR CommandLine:gps\ lsas*
view Sigma YAML
title: PowerShell Get-Process LSASS
id: b2815d0d-7481-4bf0-9b6c-a4c48a94b349
status: test
description: Detects a "Get-Process" cmdlet and it's aliases on lsass process, which is in almost all cases a sign of malicious activity
references:
    - https://web.archive.org/web/20220205033028/https://twitter.com/PythonResponder/status/1385064506049630211
author: Florian Roth (Nextron Systems)
date: 2021-04-23
modified: 2023-01-05
tags:
    - attack.credential-access
    - attack.t1552.004
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        CommandLine|contains:
            # You can add more permutation as you see fit
            - 'Get-Process lsas'
            - 'ps lsas'
            - 'gps lsas'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
PowerShell Get-Process LSASS in ScriptBlock
Detects a Get-Process command on lsass process, which is in almost all cases a sign of malicious activity
status test author Florian Roth (Nextron Systems) ATT&CK sub-technique id 84c174ab-d3ef-481f-9c86-a50d0b8e3edb
carbon_black query
ScriptBlockText:Get\-Process\ lsass*
view Sigma YAML
title: PowerShell Get-Process LSASS in ScriptBlock
id: 84c174ab-d3ef-481f-9c86-a50d0b8e3edb
status: test
description: Detects a Get-Process command on lsass process, which is in almost all cases a sign of malicious activity
references:
    - https://web.archive.org/web/20220205033028/https://twitter.com/PythonResponder/status/1385064506049630211
author: Florian Roth (Nextron Systems)
date: 2021-04-23
modified: 2022-12-25
tags:
    - attack.credential-access
    - attack.t1003.001
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains: 'Get-Process lsass'
    condition: selection
falsepositives:
    - Legitimate certificate exports invoked by administrators or users (depends on processes in the environment - filter if unusable)
level: high
Convert to SIEM query
high Strong Medium FP
PowerShell Logging Disabled Via Registry Key Tampering
Detects changes to the registry for the currently logged-in user. In order to disable PowerShell module logging, script block logging or transcription and script execution logging
status test author frack113 ATT&CK sub-technique id fecfd1a1-cc78-4313-a1ea-2ee2e8ec27a7
carbon_black query
(TargetObject:\\Microsoft\\Windows\\PowerShell\\* OR TargetObject:\\Microsoft\\PowerShellCore\\*) (TargetObject:\\ModuleLogging\\EnableModuleLogging OR TargetObject:\\ScriptBlockLogging\\EnableScriptBlockLogging OR TargetObject:\\ScriptBlockLogging\\EnableScriptBlockInvocationLogging OR TargetObject:\\Transcription\\EnableTranscripting OR TargetObject:\\Transcription\\EnableInvocationHeader OR TargetObject:\\EnableScripts) Details:DWORD\ \(0x00000000\)
view Sigma YAML
title: PowerShell Logging Disabled Via Registry Key Tampering
id: fecfd1a1-cc78-4313-a1ea-2ee2e8ec27a7
status: test
description: Detects changes to the registry for the currently logged-in user. In order to disable PowerShell module logging, script block logging or transcription and script execution logging
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1112/T1112.md#atomic-test-32---windows-powershell-logging-disabled
author: frack113
date: 2022-04-02
modified: 2023-08-17
tags:
    - attack.stealth
    - attack.defense-impairment
    - attack.t1564.001
    - attack.t1112
    - attack.persistence
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains:
            - '\Microsoft\Windows\PowerShell\' # PowerShell 5
            - '\Microsoft\PowerShellCore\' # PowerShell 7
        TargetObject|endswith:
            - '\ModuleLogging\EnableModuleLogging'
            - '\ScriptBlockLogging\EnableScriptBlockLogging'
            - '\ScriptBlockLogging\EnableScriptBlockInvocationLogging'
            - '\Transcription\EnableTranscripting'
            - '\Transcription\EnableInvocationHeader'
            - '\EnableScripts'
        Details: 'DWORD (0x00000000)'
    condition: selection
falsepositives:
    - Unknown
level: high
regression_tests_path: regression_data/rules/windows/registry/registry_set/registry_set_powershell_logging_disabled/info.yml
simulation:
    - type: atomic-red-team
      name: Disable PowerShell Logging via Registry
      technique: T1112
      atomic_guid: 95b25212-91a7-42ff-9613-124aca6845a8
Convert to SIEM query
high Moderate High FP
PowerShell PSAttack
Detects the use of PSAttack PowerShell hack tool
status test author Sean Metcalf (source), Florian Roth (Nextron Systems) ATT&CK sub-technique id b7ec41a4-042c-4f31-a5db-d0fcde9fa5c5
carbon_black query
ScriptBlockText:PS\ ATTACK\!\!\!*
view Sigma YAML
title: PowerShell PSAttack
id: b7ec41a4-042c-4f31-a5db-d0fcde9fa5c5
status: test
description: Detects the use of PSAttack PowerShell hack tool
references:
    - https://adsecurity.org/?p=2921
author: Sean Metcalf (source), Florian Roth (Nextron Systems)
date: 2017-03-05
modified: 2022-12-25
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains: 'PS ATTACK!!!'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Strong High FP
PowerShell SAM Copy
Detects suspicious PowerShell scripts accessing SAM hives
status test author Florian Roth (Nextron Systems) ATT&CK sub-technique id 1af57a4b-460a-4738-9034-db68b880c665
carbon_black query
(CommandLine:\\HarddiskVolumeShadowCopy* CommandLine:System32\\config\\sam*) (CommandLine:Copy\-Item* OR CommandLine:cp\ $_.* OR CommandLine:cpi\ $_.* OR CommandLine:copy\ $_.* OR CommandLine:.File\]\:\:Copy\(*)
view Sigma YAML
title: PowerShell SAM Copy
id: 1af57a4b-460a-4738-9034-db68b880c665
status: test
description: Detects suspicious PowerShell scripts accessing SAM hives
references:
    - https://twitter.com/splinter_code/status/1420546784250769408
author: Florian Roth (Nextron Systems)
date: 2021-07-29
modified: 2023-01-06
tags:
    - attack.credential-access
    - attack.t1003.002
logsource:
    category: process_creation
    product: windows
detection:
    selection_1:
        CommandLine|contains|all:
            - '\HarddiskVolumeShadowCopy'
            - 'System32\config\sam'
    selection_2:
        CommandLine|contains:
            - 'Copy-Item'
            - 'cp $_.'
            - 'cpi $_.'
            - 'copy $_.'
            - '.File]::Copy('
    condition: all of selection*
falsepositives:
    - Some rare backup scenarios
    - PowerShell scripts fixing HiveNightmare / SeriousSAM ACLs
level: high
Convert to SIEM query
high Moderate High FP
PowerShell Script Change Permission Via Set-Acl
Detects PowerShell execution to set the ACL of a file or a folder
status test author Nasreddine Bencherchali (Nextron Systems) ATT&CK tactic-only id bdeb2cff-af74-4094-8426-724dc937f20a
carbon_black query
((OriginalFileName:PowerShell.EXE OR OriginalFileName:pwsh.dll) OR (Image:\\powershell.exe OR Image:\\pwsh.exe)) (CommandLine:Set\-Acl\ * CommandLine:\-AclObject\ * CommandLine:\-Path\ *)
view Sigma YAML
title: PowerShell Script Change Permission Via Set-Acl
id: bdeb2cff-af74-4094-8426-724dc937f20a
related:
    - id: cae80281-ef23-44c5-873b-fd48d2666f49 # PsScript Low
      type: derived
    - id: 0944e002-e3f6-4eb5-bf69-3a3067b53d73 # ProcCreation Susp
      type: derived
    - id: 3bf1d859-3a7e-44cb-8809-a99e066d3478 # PsScript High
      type: derived
status: test
description: Detects PowerShell execution to set the ACL of a file or a folder
references:
    - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-acl?view=powershell-5.1
    - https://github.com/redcanaryco/atomic-red-team/blob/74438b0237d141ee9c99747976447dc884cb1a39/atomics/T1505.005/T1505.005.md
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-10-18
tags:
    - attack.stealth
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
    selection_cmdlet:
        CommandLine|contains|all:
            - 'Set-Acl '
            - '-AclObject '
            - '-Path '
    condition: all of selection_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate Medium FP
PowerShell Scripts Installed as Services
Detects powershell script installed as a Service
status test author oscd.community, Natalia Shornikova ATT&CK sub-technique id a2e5019d-a658-4c6a-92bf-7197b54e2cae
carbon_black query
Provider_Name:Service\ Control\ Manager EventID:7045 (ImagePath:powershell* OR ImagePath:pwsh*)
view Sigma YAML
title: PowerShell Scripts Installed as Services
id: a2e5019d-a658-4c6a-92bf-7197b54e2cae
status: test
description: Detects powershell script installed as a Service
references:
    - https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse
author: oscd.community, Natalia Shornikova
date: 2020-10-06
modified: 2022-12-25
tags:
    - attack.execution
    - attack.t1569.002
logsource:
    product: windows
    service: system
detection:
    selection:
        Provider_Name: 'Service Control Manager'
        EventID: 7045
        ImagePath|contains:
            - 'powershell'
            - 'pwsh'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate Medium FP
PowerShell Scripts Installed as Services - Security
Detects powershell script installed as a Service
status test author oscd.community, Natalia Shornikova ATT&CK sub-technique id 2a926e6a-4b81-4011-8a96-e36cc8c04302
carbon_black query
EventID:4697 (ServiceFileName:powershell* OR ServiceFileName:pwsh*)
view Sigma YAML
title: PowerShell Scripts Installed as Services - Security
id: 2a926e6a-4b81-4011-8a96-e36cc8c04302
related:
    - id: a2e5019d-a658-4c6a-92bf-7197b54e2cae
      type: derived
status: test
description: Detects powershell script installed as a Service
references:
    - https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse
author: oscd.community, Natalia Shornikova
date: 2020-10-06
modified: 2022-11-29
tags:
    - attack.execution
    - attack.t1569.002
logsource:
    product: windows
    service: security
    definition: The 'System Security Extension' audit subcategory need to be enabled to log the EID 4697
detection:
    selection:
        EventID: 4697
        ServiceFileName|contains:
            - 'powershell'
            - 'pwsh'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate Medium FP
PowerShell Set-Acl On Windows Folder
Detects PowerShell scripts to set the ACL to a file in the Windows folder
status test author Nasreddine Bencherchali (Nextron Systems) ATT&CK tactic-only id 0944e002-e3f6-4eb5-bf69-3a3067b53d73
carbon_black query
((OriginalFileName:PowerShell.EXE OR OriginalFileName:pwsh.dll) OR (Image:\\powershell.exe OR Image:\\pwsh.exe)) (CommandLine:Set\-Acl\ * CommandLine:\-AclObject\ *) (CommandLine:\-Path\ \"C\:\\Windows* OR CommandLine:\-Path\ 'C\:\\Windows* OR CommandLine:\-Path\ %windir%* OR CommandLine:\-Path\ $env\:windir*) (CommandLine:FullControl* OR CommandLine:Allow*)
view Sigma YAML
title: PowerShell Set-Acl On Windows Folder
id: 0944e002-e3f6-4eb5-bf69-3a3067b53d73 # ProcCreation Susp
related:
    - id: cae80281-ef23-44c5-873b-fd48d2666f49 # PsScript Low
      type: derived
    - id: bdeb2cff-af74-4094-8426-724dc937f20a # ProcCreation Low
      type: derived
    - id: 3bf1d859-3a7e-44cb-8809-a99e066d3478 # PsScript High
      type: derived
status: test
description: Detects PowerShell scripts to set the ACL to a file in the Windows folder
references:
    - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-acl?view=powershell-5.1
    - https://github.com/redcanaryco/atomic-red-team/blob/74438b0237d141ee9c99747976447dc884cb1a39/atomics/T1505.005/T1505.005.md
author: Nasreddine Bencherchali (Nextron Systems)
date: 2022-10-18
tags:
    - attack.stealth
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName:
              - 'PowerShell.EXE'
              - 'pwsh.dll'
        - Image|endswith:
              - '\powershell.exe'
              - '\pwsh.exe'
    selection_cmdlet:
        CommandLine|contains|all:
            - 'Set-Acl '
            - '-AclObject '
    selection_paths:
        # Note: Add more suspicious paths
        CommandLine|contains:
            - '-Path "C:\Windows'
            - "-Path 'C:\\Windows"
            - '-Path %windir%'
            - '-Path $env:windir'
    selection_permissions:
        # Note: Add more suspicious permissions
        CommandLine|contains:
            - 'FullControl'
            - 'Allow'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate Medium FP
PowerShell Set-Acl On Windows Folder - PsScript
Detects PowerShell scripts to set the ACL to a file in the Windows folder
status test author frack113, Nasreddine Bencherchali (Nextron Systems) ATT&CK technique id 3bf1d859-3a7e-44cb-8809-a99e066d3478
carbon_black query
(ScriptBlockText:Set\-Acl\ * ScriptBlockText:\-AclObject\ *) (ScriptBlockText:\-Path\ \"C\:\\Windows* OR ScriptBlockText:\-Path\ \"C\:\/Windows* OR ScriptBlockText:\-Path\ 'C\:\\Windows* OR ScriptBlockText:\-Path\ 'C\:\/Windows* OR ScriptBlockText:\-Path\ C\:\\Windows* OR ScriptBlockText:\-Path\ C\:\/Windows* OR ScriptBlockText:\-Path\ $env\:windir* OR ScriptBlockText:\-Path\ \"$env\:windir* OR ScriptBlockText:\-Path\ '$env\:windir*) (ScriptBlockText:FullControl* OR ScriptBlockText:Allow*)
view Sigma YAML
title: PowerShell Set-Acl On Windows Folder - PsScript
id: 3bf1d859-3a7e-44cb-8809-a99e066d3478
related:
    - id: cae80281-ef23-44c5-873b-fd48d2666f49 # PsScript Low
      type: derived
    - id: 0944e002-e3f6-4eb5-bf69-3a3067b53d73 # ProcCreation Susp
      type: derived
    - id: bdeb2cff-af74-4094-8426-724dc937f20a # ProcCreation Low
      type: derived
status: test
description: Detects PowerShell scripts to set the ACL to a file in the Windows folder
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/74438b0237d141ee9c99747976447dc884cb1a39/atomics/T1505.005/T1505.005.md
    - https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.security/set-acl?view=powershell-5.1
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2023-07-18
tags:
    - attack.defense-impairment
    - attack.t1222
logsource:
    product: windows
    category: ps_script
    definition: bade5735-5ab0-4aa7-a642-a11be0e40872
detection:
    selection_cmdlet:
        ScriptBlockText|contains|all:
            - 'Set-Acl '
            - '-AclObject '
    selection_paths:
        # Note: Add more suspicious paths
        ScriptBlockText|contains:
            - '-Path "C:\Windows'
            - '-Path "C:/Windows'
            - "-Path 'C:\\Windows"
            - "-Path 'C:/Windows"
            - '-Path C:\\Windows'
            - '-Path C:/Windows'
            - '-Path $env:windir'
            - '-Path "$env:windir'
            - "-Path '$env:windir"
    selection_permissions:
        # Note: Add more suspicious permissions
        ScriptBlockText|contains:
            - 'FullControl'
            - 'Allow'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
PowerShell ShellCode
Detects Base64 encoded Shellcode
status test author David Ledbetter (shellcode), Florian Roth (Nextron Systems) ATT&CK sub-technique id 16b37b70-6fcf-4814-a092-c36bd3aafcbd
carbon_black query
ScriptBlockText:OiCAAAAYInlM* OR ScriptBlockText:OiJAAAAYInlM*
view Sigma YAML
title: PowerShell ShellCode
id: 16b37b70-6fcf-4814-a092-c36bd3aafcbd
status: test
description: Detects Base64 encoded Shellcode
references:
    - https://twitter.com/cyb3rops/status/1063072865992523776
author: David Ledbetter (shellcode), Florian Roth (Nextron Systems)
date: 2018-11-17
modified: 2024-01-25
tags:
    - attack.privilege-escalation
    - attack.stealth
    - attack.t1055
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains:
            - 'OiCAAAAYInlM'
            - 'OiJAAAAYInlM'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Strong High FP
PowerShell Web Access Feature Enabled Via DISM
Detects the use of DISM to enable the PowerShell Web Access feature, which could be used for remote access and potential abuse
status test author Michael Haag ATT&CK sub-technique id 7e8f2d3b-9c1a-4f67-b9e8-8d9006e0e51f
carbon_black query
(Image:\\dism.exe OR OriginalFileName:DISM.EXE) (CommandLine:WindowsPowerShellWebAccess* CommandLine:\/online* CommandLine:\/enable\-feature*)
view Sigma YAML
title: PowerShell Web Access Feature Enabled Via DISM
id: 7e8f2d3b-9c1a-4f67-b9e8-8d9006e0e51f
status: test
description: Detects the use of DISM to enable the PowerShell Web Access feature, which could be used for remote access and potential abuse
references:
    - https://docs.microsoft.com/en-us/powershell/module/dism/enable-windowsoptionalfeature
    - https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-241a
    - https://gist.github.com/MHaggis/7e67b659af9148fa593cf2402edebb41
author: Michael Haag
date: 2024-09-03
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1548.002
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\dism.exe'
        - OriginalFileName: 'DISM.EXE'
    selection_cli:
        CommandLine|contains|all:
            - 'WindowsPowerShellWebAccess'
            - '/online'
            - '/enable-feature'
    condition: all of selection_*
falsepositives:
    - Legitimate PowerShell Web Access installations by administrators
level: high
Convert to SIEM query
high Strong Medium FP
PowerShell Web Access Installation - PsScript
Detects the installation and configuration of PowerShell Web Access, which could be used for remote access and potential abuse
status test author Michael Haag ATT&CK sub-technique id 5f9c7f1a-7c21-4c39-b2f3-8d8006e0e51f
carbon_black query
ScriptBlockText:Install\-WindowsFeature\ WindowsPowerShellWebAccess* OR ScriptBlockText:Install\-PswaWebApplication* OR (ScriptBlockText:Add\-PswaAuthorizationRule* ScriptBlockText:\-UserName\ * ScriptBlockText:\-ComputerName\ *)
view Sigma YAML
title: PowerShell Web Access Installation - PsScript
id: 5f9c7f1a-7c21-4c39-b2f3-8d8006e0e51f
status: test
description: Detects the installation and configuration of PowerShell Web Access, which could be used for remote access and potential abuse
references:
    - https://docs.microsoft.com/en-us/powershell/module/powershellwebaccess/install-pswawebapplication
    - https://www.cisa.gov/news-events/cybersecurity-advisories/aa24-241a
    - https://gist.github.com/MHaggis/7e67b659af9148fa593cf2402edebb41
author: Michael Haag
date: 2024-09-03
tags:
    - attack.persistence
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_install:
        ScriptBlockText|contains: 'Install-WindowsFeature WindowsPowerShellWebAccess'
    selection_config:
        ScriptBlockText|contains: 'Install-PswaWebApplication'
    selection_auth:
        ScriptBlockText|contains|all:
            - 'Add-PswaAuthorizationRule'
            - '-UserName *'
            - '-ComputerName *'
    condition: 1 of selection_*
falsepositives:
    - Legitimate PowerShell Web Access installations by administrators
level: high
Convert to SIEM query
high Moderate High FP
PowerShell as a Service in Registry
Detects that a powershell code is written to the registry as a service.
status test author oscd.community, Natalia Shornikova ATT&CK sub-technique id 4a5f5a5e-ac01-474b-9b4e-d61298c9df1d
carbon_black query
TargetObject:\\Services\\* TargetObject:\\ImagePath (Details:powershell* OR Details:pwsh*)
view Sigma YAML
title: PowerShell as a Service in Registry
id: 4a5f5a5e-ac01-474b-9b4e-d61298c9df1d
status: test
description: Detects that a powershell code is written to the registry as a service.
references:
    - https://speakerdeck.com/heirhabarov/hunting-for-powershell-abuse
author: oscd.community, Natalia Shornikova
date: 2020-10-06
modified: 2023-08-17
tags:
    - attack.execution
    - attack.t1569.002
logsource:
    category: registry_set
    product: windows
detection:
    selection:
        TargetObject|contains: '\Services\'
        TargetObject|endswith: '\ImagePath'
        Details|contains:
            - 'powershell'
            - 'pwsh'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
PowerView PowerShell Cmdlets - ScriptBlock
Detects Cmdlet names from PowerView of the PowerSploit exploitation framework.
status test author Bhabesh Raj ATT&CK sub-technique id dcd74b95-3f36-4ed9-9598-0490951643aa
carbon_black query
ScriptBlockText:Export\-PowerViewCSV* OR ScriptBlockText:Find\-DomainLocalGroupMember* OR ScriptBlockText:Find\-DomainObjectPropertyOutlier* OR ScriptBlockText:Find\-DomainProcess* OR ScriptBlockText:Find\-DomainShare* OR ScriptBlockText:Find\-DomainUserEvent* OR ScriptBlockText:Find\-DomainUserLocation* OR ScriptBlockText:Find\-ForeignGroup* OR ScriptBlockText:Find\-ForeignUser* OR ScriptBlockText:Find\-GPOComputerAdmin* OR ScriptBlockText:Find\-GPOLocation* OR ScriptBlockText:Find\-InterestingDomain* OR ScriptBlockText:Find\-InterestingFile* OR ScriptBlockText:Find\-LocalAdminAccess* OR ScriptBlockText:Find\-ManagedSecurityGroups* OR ScriptBlockText:Get\-CachedRDPConnection* OR ScriptBlockText:Get\-DFSshare* OR ScriptBlockText:Get\-DomainDFSShare* OR ScriptBlockText:Get\-DomainDNSRecord* OR ScriptBlockText:Get\-DomainDNSZone* OR ScriptBlockText:Get\-DomainFileServer* OR ScriptBlockText:Get\-DomainGPOComputerLocalGroupMapping* OR ScriptBlockText:Get\-DomainGPOLocalGroup* OR ScriptBlockText:Get\-DomainGPOUserLocalGroupMapping* OR ScriptBlockText:Get\-LastLoggedOn* OR ScriptBlockText:Get\-LoggedOnLocal* OR ScriptBlockText:Get\-NetFileServer* OR ScriptBlockText:Get\-NetForest* OR ScriptBlockText:Get\-NetGPOGroup* OR ScriptBlockText:Get\-NetProcess* OR ScriptBlockText:Get\-NetRDPSession* OR ScriptBlockText:Get\-RegistryMountedDrive* OR ScriptBlockText:Get\-RegLoggedOn* OR ScriptBlockText:Get\-WMIRegCachedRDPConnection* OR ScriptBlockText:Get\-WMIRegLastLoggedOn* OR ScriptBlockText:Get\-WMIRegMountedDrive* OR ScriptBlockText:Get\-WMIRegProxy* OR ScriptBlockText:Invoke\-ACLScanner* OR ScriptBlockText:Invoke\-CheckLocalAdminAccess* OR ScriptBlockText:Invoke\-EnumerateLocalAdmin* OR ScriptBlockText:Invoke\-EventHunter* OR ScriptBlockText:Invoke\-FileFinder* OR ScriptBlockText:Invoke\-Kerberoast* OR ScriptBlockText:Invoke\-MapDomainTrust* OR ScriptBlockText:Invoke\-ProcessHunter* OR ScriptBlockText:Invoke\-RevertToSelf* OR ScriptBlockText:Invoke\-ShareFinder* OR ScriptBlockText:Invoke\-UserHunter* OR ScriptBlockText:Invoke\-UserImpersonation* OR ScriptBlockText:Remove\-RemoteConnection* OR ScriptBlockText:Request\-SPNTicket* OR ScriptBlockText:Resolve\-IPAddress*
view Sigma YAML
title: PowerView PowerShell Cmdlets - ScriptBlock
id: dcd74b95-3f36-4ed9-9598-0490951643aa
related:
    - id: b2317cfa-4a47-4ead-b3ff-297438c0bc2d
      type: similar
status: test
description: Detects Cmdlet names from PowerView of the PowerSploit exploitation framework.
references:
    - https://powersploit.readthedocs.io/en/stable/Recon/README
    - https://github.com/PowerShellMafia/PowerSploit/tree/master/Recon
    - https://thedfirreport.com/2020/10/08/ryuks-return
    - https://adsecurity.org/?p=2277
author: Bhabesh Raj
date: 2021-05-18
modified: 2023-11-22
tags:
    - attack.execution
    - attack.t1059.001
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains:
            - 'Export-PowerViewCSV'
            - 'Find-DomainLocalGroupMember'
            - 'Find-DomainObjectPropertyOutlier'
            - 'Find-DomainProcess'
            - 'Find-DomainShare'
            - 'Find-DomainUserEvent'
            - 'Find-DomainUserLocation'
            - 'Find-ForeignGroup'
            - 'Find-ForeignUser'
            - 'Find-GPOComputerAdmin'
            - 'Find-GPOLocation'
            - 'Find-InterestingDomain' # Covers: Find-InterestingDomainAcl, Find-InterestingDomainShareFile
            - 'Find-InterestingFile'
            - 'Find-LocalAdminAccess'
            - 'Find-ManagedSecurityGroups'
            - 'Get-CachedRDPConnection'
            - 'Get-DFSshare'
            - 'Get-DomainDFSShare'
            - 'Get-DomainDNSRecord'
            - 'Get-DomainDNSZone'
            - 'Get-DomainFileServer'
            - 'Get-DomainGPOComputerLocalGroupMapping'
            - 'Get-DomainGPOLocalGroup'
            - 'Get-DomainGPOUserLocalGroupMapping'
            - 'Get-LastLoggedOn'
            - 'Get-LoggedOnLocal'
            - 'Get-NetFileServer'
            - 'Get-NetForest' # Covers: Get-NetForestCatalog, Get-NetForestDomain, Get-NetForestTrust
            - 'Get-NetGPOGroup'
            - 'Get-NetProcess'
            - 'Get-NetRDPSession'
            - 'Get-RegistryMountedDrive'
            - 'Get-RegLoggedOn'
            - 'Get-WMIRegCachedRDPConnection'
            - 'Get-WMIRegLastLoggedOn'
            - 'Get-WMIRegMountedDrive'
            - 'Get-WMIRegProxy'
            - 'Invoke-ACLScanner'
            - 'Invoke-CheckLocalAdminAccess'
            - 'Invoke-EnumerateLocalAdmin'
            - 'Invoke-EventHunter'
            - 'Invoke-FileFinder'
            - 'Invoke-Kerberoast'
            - 'Invoke-MapDomainTrust'
            - 'Invoke-ProcessHunter'
            - 'Invoke-RevertToSelf'
            - 'Invoke-ShareFinder'
            - 'Invoke-UserHunter'
            - 'Invoke-UserImpersonation'
            - 'Remove-RemoteConnection'
            - 'Request-SPNTicket'
            - 'Resolve-IPAddress'
            # - 'Get-ADObject'  # prone to FPs
            # - 'Get-Domain'  # too many FPs  # Covers Cmdlets like: DomainComputer, DomainController, DomainDFSShare, DomainDNSRecord, DomainGPO, etc.
            # - 'Add-DomainGroupMember'
            # - 'Add-DomainObjectAcl'
            # - 'Add-ObjectAcl'
            # - 'Add-RemoteConnection'
            # - 'Convert-ADName'
            # - 'Convert-NameToSid'
            # - 'ConvertFrom-UACValue'
            # - 'ConvertTo-SID'
            # - 'Get-DNSRecord'
            # - 'Get-DNSZone'
            # - 'Get-DomainComputer'
            # - 'Get-DomainController'
            # - 'Get-DomainGroup'
            # - 'Get-DomainGroupMember'
            # - 'Get-DomainManagedSecurityGroup'
            # - 'Get-DomainObject'
            # - 'Get-DomainObjectAcl'
            # - 'Get-DomainOU'
            # - 'Get-DomainPolicy'
            # - 'Get-DomainSID'
            # - 'Get-DomainSite'
            # - 'Get-DomainSPNTicket'
            # - 'Get-DomainSubnet'
            # - 'Get-DomainUser'
            # - 'Get-DomainUserEvent'
            # - 'Get-Forest' # Covers: Get-ForestDomain, Get-ForestGlobalCatalog, Get-ForestTrust
            # - 'Get-IPAddress'
            # - 'Get-NetComputer' # Covers: Get-NetComputerSiteName
            # - 'Get-NetDomain' # Covers: Get-NetDomainController, Get-NetDomainTrust
            # - 'Get-NetGroup' # Covers: Get-NetGroupMember
            # - 'Get-NetLocalGroup' # Covers: NetLocalGroupMember
            # - 'Get-NetLoggedon'
            # - 'Get-NetOU'
            # - 'Get-NetSession'
            # - 'Get-NetShare'
            # - 'Get-NetSite'
            # - 'Get-NetSubnet'
            # - 'Get-NetUser'
            # - 'Get-ObjectAcl'
            # - 'Get-PathAcl'
            # - 'Get-Proxy'
            # - 'Get-SiteName'
            # - 'Get-UserEvent'
            # - 'Get-WMIProcess'
            # - 'New-DomainGroup'
            # - 'New-DomainUser'
            # - 'Set-ADObject'
            # - 'Set-DomainObject'
            # - 'Set-DomainUserPassword'
            # - 'Test-AdminAccess'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
Powershell Add Name Resolution Policy Table Rule
Detects powershell scripts that adds a Name Resolution Policy Table (NRPT) rule for the specified namespace. This will bypass the default DNS server and uses a specified server for answering the query.
status test author Borna Talebi ATT&CK technique id 4368354e-1797-463c-bc39-a309effbe8d7
carbon_black query
ScriptBlockText:Add\-DnsClientNrptRule* ScriptBlockText:\-Namesp* ScriptBlockText:\-NameSe*
view Sigma YAML
title: Powershell Add Name Resolution Policy Table Rule
id: 4368354e-1797-463c-bc39-a309effbe8d7
status: test
description: |
  Detects powershell scripts that adds a Name Resolution Policy Table (NRPT) rule for the specified namespace.
  This will bypass the default DNS server and uses a specified server for answering the query.
references:
    - https://twitter.com/NathanMcNulty/status/1569497348841287681
    - https://learn.microsoft.com/en-us/powershell/module/dnsclient/add-dnsclientnrptrule?view=windowsserver2022-ps
author: Borna Talebi
date: 2021-09-14
modified: 2022-10-09
tags:
    - attack.impact
    - attack.t1565
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|contains|all:
            - 'Add-DnsClientNrptRule'
            - '-Namesp'
            - '-NameSe'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
Powershell Base64 Encoded MpPreference Cmdlet
Detects base64 encoded "MpPreference" PowerShell cmdlet code that tries to modifies or tamper with Windows Defender AV
status test author Florian Roth (Nextron Systems) ATT&CK technique id c6fb44c6-71f5-49e6-9462-1425d328aee3
carbon_black query
(CommandLine:QWRkLU1wUHJlZmVyZW5jZS* OR CommandLine:FkZC1NcFByZWZlcmVuY2Ug* OR CommandLine:BZGQtTXBQcmVmZXJlbmNlI* OR CommandLine:U2V0LU1wUHJlZmVyZW5jZS* OR CommandLine:NldC1NcFByZWZlcmVuY2Ug* OR CommandLine:TZXQtTXBQcmVmZXJlbmNlI* OR CommandLine:YWRkLW1wcHJlZmVyZW5jZS* OR CommandLine:FkZC1tcHByZWZlcmVuY2Ug* OR CommandLine:hZGQtbXBwcmVmZXJlbmNlI* OR CommandLine:c2V0LW1wcHJlZmVyZW5jZS* OR CommandLine:NldC1tcHByZWZlcmVuY2Ug* OR CommandLine:zZXQtbXBwcmVmZXJlbmNlI*) OR (CommandLine:QQBkAGQALQBNAHAAUAByAGUAZgBlAHIAZQBuAGMAZQAgA* OR CommandLine:EAZABkAC0ATQBwAFAAcgBlAGYAZQByAGUAbgBjAGUAIA* OR CommandLine:BAGQAZAAtAE0AcABQAHIAZQBmAGUAcgBlAG4AYwBlACAA* OR CommandLine:UwBlAHQALQBNAHAAUAByAGUAZgBlAHIAZQBuAGMAZQAgA* OR CommandLine:MAZQB0AC0ATQBwAFAAcgBlAGYAZQByAGUAbgBjAGUAIA* OR CommandLine:TAGUAdAAtAE0AcABQAHIAZQBmAGUAcgBlAG4AYwBlACAA* OR CommandLine:YQBkAGQALQBtAHAAcAByAGUAZgBlAHIAZQBuAGMAZQAgA* OR CommandLine:EAZABkAC0AbQBwAHAAcgBlAGYAZQByAGUAbgBjAGUAIA* OR CommandLine:hAGQAZAAtAG0AcABwAHIAZQBmAGUAcgBlAG4AYwBlACAA* OR CommandLine:cwBlAHQALQBtAHAAcAByAGUAZgBlAHIAZQBuAGMAZQAgA* OR CommandLine:MAZQB0AC0AbQBwAHAAcgBlAGYAZQByAGUAbgBjAGUAIA* OR CommandLine:zAGUAdAAtAG0AcABwAHIAZQBmAGUAcgBlAG4AYwBlACAA*)
view Sigma YAML
title: Powershell Base64 Encoded MpPreference Cmdlet
id: c6fb44c6-71f5-49e6-9462-1425d328aee3
status: test
description: Detects base64 encoded "MpPreference" PowerShell cmdlet code that tries to modifies or tamper with Windows Defender AV
references:
    - https://learn.microsoft.com/en-us/defender-endpoint/configure-process-opened-file-exclusions-microsoft-defender-antivirus
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1562.001/T1562.001.md
    - https://twitter.com/AdamTheAnalyst/status/1483497517119590403
author: Florian Roth (Nextron Systems)
date: 2022-03-04
modified: 2023-01-30
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        - CommandLine|base64offset|contains:
              - 'Add-MpPreference '
              - 'Set-MpPreference '
              - 'add-mppreference '
              - 'set-mppreference '
        - CommandLine|contains:
              # UTF16-LE
              - 'QQBkAGQALQBNAHAAUAByAGUAZgBlAHIAZQBuAGMAZQAgA'
              - 'EAZABkAC0ATQBwAFAAcgBlAGYAZQByAGUAbgBjAGUAIA'
              - 'BAGQAZAAtAE0AcABQAHIAZQBmAGUAcgBlAG4AYwBlACAA'
              - 'UwBlAHQALQBNAHAAUAByAGUAZgBlAHIAZQBuAGMAZQAgA'
              - 'MAZQB0AC0ATQBwAFAAcgBlAGYAZQByAGUAbgBjAGUAIA'
              - 'TAGUAdAAtAE0AcABQAHIAZQBmAGUAcgBlAG4AYwBlACAA'
              - 'YQBkAGQALQBtAHAAcAByAGUAZgBlAHIAZQBuAGMAZQAgA'
              - 'EAZABkAC0AbQBwAHAAcgBlAGYAZQByAGUAbgBjAGUAIA'
              - 'hAGQAZAAtAG0AcABwAHIAZQBmAGUAcgBlAG4AYwBlACAA'
              - 'cwBlAHQALQBtAHAAcAByAGUAZgBlAHIAZQBuAGMAZQAgA'
              - 'MAZQB0AC0AbQBwAHAAcgBlAGYAZQByAGUAbgBjAGUAIA'
              - 'zAGUAdAAtAG0AcABwAHIAZQBmAGUAcgBlAG4AYwBlACAA'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
Powershell DNSExfiltration
DNSExfiltrator allows for transferring (exfiltrate) a file over a DNS request covert channel
status test author frack113 ATT&CK technique id d59d7842-9a21-4bc6-ba98-64bfe0091355
carbon_black query
ScriptBlockText:Invoke\-DNSExfiltrator* OR (ScriptBlockText:\ \-i\ * ScriptBlockText:\ \-d\ * ScriptBlockText:\ \-p\ * ScriptBlockText:\ \-doh\ * ScriptBlockText:\ \-t\ *)
view Sigma YAML
title: Powershell DNSExfiltration
id: d59d7842-9a21-4bc6-ba98-64bfe0091355
status: test
description: DNSExfiltrator allows for transferring (exfiltrate) a file over a DNS request covert channel
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1048/T1048.md#atomic-test-3---dnsexfiltration-doh
    - https://github.com/Arno0x/DNSExfiltrator
author: frack113
date: 2022-01-07
tags:
    - attack.exfiltration
    - attack.t1048
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection_cmdlet:
        - ScriptBlockText|contains: 'Invoke-DNSExfiltrator'
        - ScriptBlockText|contains|all:
              - ' -i '
              - ' -d '
              - ' -p '
              - ' -doh '
              - ' -t '
    condition: selection_cmdlet
falsepositives:
    - Legitimate script
level: high
Convert to SIEM query
high Strong Medium FP
Powershell Defender Disable Scan Feature
Detects requests to disable Microsoft Defender features using PowerShell commands
status test author Florian Roth (Nextron Systems) ATT&CK technique id 1ec65a5f-9473-4f12-97da-622044d6df21
carbon_black query
((CommandLine:Add\-MpPreference\ * OR CommandLine:Set\-MpPreference\ *) (CommandLine:DisableArchiveScanning\ * OR CommandLine:DisableRealtimeMonitoring\ * OR CommandLine:DisableIOAVProtection\ * OR CommandLine:DisableBehaviorMonitoring\ * OR CommandLine:DisableBlockAtFirstSeen\ * OR CommandLine:DisableCatchupFullScan\ * OR CommandLine:DisableCatchupQuickScan\ *) (CommandLine:$true* OR CommandLine:\ 1\ *)) OR ((CommandLine:ZGlzYWJsZWFyY2hpdmVzY2FubmluZy* OR CommandLine:Rpc2FibGVhcmNoaXZlc2Nhbm5pbmcg* OR CommandLine:kaXNhYmxlYXJjaGl2ZXNjYW5uaW5nI* OR CommandLine:RGlzYWJsZUFyY2hpdmVTY2FubmluZy* OR CommandLine:Rpc2FibGVBcmNoaXZlU2Nhbm5pbmcg* OR CommandLine:EaXNhYmxlQXJjaGl2ZVNjYW5uaW5nI* OR CommandLine:ZGlzYWJsZWJlaGF2aW9ybW9uaXRvcmluZy* OR CommandLine:Rpc2FibGViZWhhdmlvcm1vbml0b3Jpbmcg* OR CommandLine:kaXNhYmxlYmVoYXZpb3Jtb25pdG9yaW5nI* OR CommandLine:RGlzYWJsZUJlaGF2aW9yTW9uaXRvcmluZy* OR CommandLine:Rpc2FibGVCZWhhdmlvck1vbml0b3Jpbmcg* OR CommandLine:EaXNhYmxlQmVoYXZpb3JNb25pdG9yaW5nI* OR CommandLine:ZGlzYWJsZWJsb2NrYXRmaXJzdHNlZW4g* OR CommandLine:Rpc2FibGVibG9ja2F0Zmlyc3RzZWVuI* OR CommandLine:kaXNhYmxlYmxvY2thdGZpcnN0c2Vlbi* OR CommandLine:RGlzYWJsZUJsb2NrQXRGaXJzdFNlZW4g* OR CommandLine:Rpc2FibGVCbG9ja0F0Rmlyc3RTZWVuI* OR CommandLine:EaXNhYmxlQmxvY2tBdEZpcnN0U2Vlbi* OR CommandLine:ZGlzYWJsZWNhdGNodXBmdWxsc2Nhbi* OR CommandLine:Rpc2FibGVjYXRjaHVwZnVsbHNjYW4g* OR CommandLine:kaXNhYmxlY2F0Y2h1cGZ1bGxzY2FuI* OR CommandLine:RGlzYWJsZUNhdGNodXBGdWxsU2Nhbi* OR CommandLine:Rpc2FibGVDYXRjaHVwRnVsbFNjYW4g* OR CommandLine:EaXNhYmxlQ2F0Y2h1cEZ1bGxTY2FuI* OR CommandLine:ZGlzYWJsZWNhdGNodXBxdWlja3NjYW4g* OR CommandLine:Rpc2FibGVjYXRjaHVwcXVpY2tzY2FuI* OR CommandLine:kaXNhYmxlY2F0Y2h1cHF1aWNrc2Nhbi* OR CommandLine:RGlzYWJsZUNhdGNodXBRdWlja1NjYW4g* OR CommandLine:Rpc2FibGVDYXRjaHVwUXVpY2tTY2FuI* OR CommandLine:EaXNhYmxlQ2F0Y2h1cFF1aWNrU2Nhbi* OR CommandLine:ZGlzYWJsZWlvYXZwcm90ZWN0aW9uI* OR CommandLine:Rpc2FibGVpb2F2cHJvdGVjdGlvbi* OR CommandLine:kaXNhYmxlaW9hdnByb3RlY3Rpb24g* OR CommandLine:RGlzYWJsZUlPQVZQcm90ZWN0aW9uI* OR CommandLine:Rpc2FibGVJT0FWUHJvdGVjdGlvbi* OR CommandLine:EaXNhYmxlSU9BVlByb3RlY3Rpb24g* OR CommandLine:ZGlzYWJsZXJlYWx0aW1lbW9uaXRvcmluZy* OR CommandLine:Rpc2FibGVyZWFsdGltZW1vbml0b3Jpbmcg* OR CommandLine:kaXNhYmxlcmVhbHRpbWVtb25pdG9yaW5nI* OR CommandLine:RGlzYWJsZVJlYWx0aW1lTW9uaXRvcmluZy* OR CommandLine:Rpc2FibGVSZWFsdGltZU1vbml0b3Jpbmcg* OR CommandLine:EaXNhYmxlUmVhbHRpbWVNb25pdG9yaW5nI*) OR (CommandLine:RABpAHMAYQBiAGwAZQBSAGUAYQBsAHQAaQBtAGUATQBvAG4AaQB0AG8AcgBpAG4AZwAgA* OR CommandLine:QAaQBzAGEAYgBsAGUAUgBlAGEAbAB0AGkAbQBlAE0AbwBuAGkAdABvAHIAaQBuAGcAIA* OR CommandLine:EAGkAcwBhAGIAbABlAFIAZQBhAGwAdABpAG0AZQBNAG8AbgBpAHQAbwByAGkAbgBnACAA* OR CommandLine:RABpAHMAYQBiAGwAZQBJAE8AQQBWAFAAcgBvAHQAZQBjAHQAaQBvAG4AIA* OR CommandLine:QAaQBzAGEAYgBsAGUASQBPAEEAVgBQAHIAbwB0AGUAYwB0AGkAbwBuACAA* OR CommandLine:EAGkAcwBhAGIAbABlAEkATwBBAFYAUAByAG8AdABlAGMAdABpAG8AbgAgA* OR CommandLine:RABpAHMAYQBiAGwAZQBCAGUAaABhAHYAaQBvAHIATQBvAG4AaQB0AG8AcgBpAG4AZwAgA* OR CommandLine:QAaQBzAGEAYgBsAGUAQgBlAGgAYQB2AGkAbwByAE0AbwBuAGkAdABvAHIAaQBuAGcAIA* OR CommandLine:EAGkAcwBhAGIAbABlAEIAZQBoAGEAdgBpAG8AcgBNAG8AbgBpAHQAbwByAGkAbgBnACAA* OR CommandLine:RABpAHMAYQBiAGwAZQBCAGwAbwBjAGsAQQB0AEYAaQByAHMAdABTAGUAZQBuACAA* OR CommandLine:QAaQBzAGEAYgBsAGUAQgBsAG8AYwBrAEEAdABGAGkAcgBzAHQAUwBlAGUAbgAgA* OR CommandLine:EAGkAcwBhAGIAbABlAEIAbABvAGMAawBBAHQARgBpAHIAcwB0AFMAZQBlAG4AIA* OR CommandLine:ZABpAHMAYQBiAGwAZQByAGUAYQBsAHQAaQBtAGUAbQBvAG4AaQB0AG8AcgBpAG4AZwAgA* OR CommandLine:QAaQBzAGEAYgBsAGUAcgBlAGEAbAB0AGkAbQBlAG0AbwBuAGkAdABvAHIAaQBuAGcAIA* OR CommandLine:kAGkAcwBhAGIAbABlAHIAZQBhAGwAdABpAG0AZQBtAG8AbgBpAHQAbwByAGkAbgBnACAA* OR CommandLine:ZABpAHMAYQBiAGwAZQBpAG8AYQB2AHAAcgBvAHQAZQBjAHQAaQBvAG4AIA* OR CommandLine:QAaQBzAGEAYgBsAGUAaQBvAGEAdgBwAHIAbwB0AGUAYwB0AGkAbwBuACAA* OR CommandLine:kAGkAcwBhAGIAbABlAGkAbwBhAHYAcAByAG8AdABlAGMAdABpAG8AbgAgA* OR CommandLine:ZABpAHMAYQBiAGwAZQBiAGUAaABhAHYAaQBvAHIAbQBvAG4AaQB0AG8AcgBpAG4AZwAgA* OR CommandLine:QAaQBzAGEAYgBsAGUAYgBlAGgAYQB2AGkAbwByAG0AbwBuAGkAdABvAHIAaQBuAGcAIA* OR CommandLine:kAGkAcwBhAGIAbABlAGIAZQBoAGEAdgBpAG8AcgBtAG8AbgBpAHQAbwByAGkAbgBnACAA* OR CommandLine:ZABpAHMAYQBiAGwAZQBiAGwAbwBjAGsAYQB0AGYAaQByAHMAdABzAGUAZQBuACAA* OR CommandLine:QAaQBzAGEAYgBsAGUAYgBsAG8AYwBrAGEAdABmAGkAcgBzAHQAcwBlAGUAbgAgA* OR CommandLine:kAGkAcwBhAGIAbABlAGIAbABvAGMAawBhAHQAZgBpAHIAcwB0AHMAZQBlAG4AIA* OR CommandLine:RABpAHMAYQBiAGwAZQBDAGEAdABjAGgAdQBwAEYAdQBsAGwAUwBjAGEAbgA* OR CommandLine:RABpAHMAYQBiAGwAZQBDAGEAdABjAGgAdQBwAFEAdQBpAGMAawBTAGMAYQBuAA* OR CommandLine:RABpAHMAYQBiAGwAZQBBAHIAYwBoAGkAdgBlAFMAYwBhAG4AbgBpAG4AZwA*))
view Sigma YAML
title: Powershell Defender Disable Scan Feature
id: 1ec65a5f-9473-4f12-97da-622044d6df21
status: test
description: Detects requests to disable Microsoft Defender features using PowerShell commands
references:
    - https://learn.microsoft.com/en-us/powershell/module/defender/set-mppreference?view=windowsserver2022-ps
    - https://www.virustotal.com/gui/file/d609799091731d83d75ec5d1f030571af20c45efeeb94840b67ea09a3283ab65/behavior/C2AE
    - https://www.virustotal.com/gui/search/content%253A%2522Set-MpPreference%2520-Disable%2522/files
author: Florian Roth (Nextron Systems)
date: 2022-03-03
modified: 2024-01-02
tags:
    - attack.defense-impairment
    - attack.t1685
logsource:
    category: process_creation
    product: windows
detection:
    selection_cli_cmdlet:
        CommandLine|contains:
            - 'Add-MpPreference '
            - 'Set-MpPreference '
    selection_cli_option:
        CommandLine|contains:
            - 'DisableArchiveScanning '
            - 'DisableRealtimeMonitoring '
            - 'DisableIOAVProtection '
            - 'DisableBehaviorMonitoring '
            - 'DisableBlockAtFirstSeen '
            - 'DisableCatchupFullScan '
            - 'DisableCatchupQuickScan '
    selection_cli_value:
        CommandLine|contains:
            - '$true'
            - ' 1 '
    selection_encoded_modifier:
        CommandLine|base64offset|contains:
            # Note: Since this is calculating offsets casing is important
            - 'disablearchivescanning '
            - 'DisableArchiveScanning '
            - 'disablebehaviormonitoring '
            - 'DisableBehaviorMonitoring '
            - 'disableblockatfirstseen '
            - 'DisableBlockAtFirstSeen '
            - 'disablecatchupfullscan '
            - 'DisableCatchupFullScan '
            - 'disablecatchupquickscan '
            - 'DisableCatchupQuickScan '
            - 'disableioavprotection '
            - 'DisableIOAVProtection '
            - 'disablerealtimemonitoring '
            - 'DisableRealtimeMonitoring '
    selection_encoded_direct:
        CommandLine|contains:
            - 'RABpAHMAYQBiAGwAZQBSAGUAYQBsAHQAaQBtAGUATQBvAG4AaQB0AG8AcgBpAG4AZwAgA'
            - 'QAaQBzAGEAYgBsAGUAUgBlAGEAbAB0AGkAbQBlAE0AbwBuAGkAdABvAHIAaQBuAGcAIA'
            - 'EAGkAcwBhAGIAbABlAFIAZQBhAGwAdABpAG0AZQBNAG8AbgBpAHQAbwByAGkAbgBnACAA'
            - 'RABpAHMAYQBiAGwAZQBJAE8AQQBWAFAAcgBvAHQAZQBjAHQAaQBvAG4AIA'
            - 'QAaQBzAGEAYgBsAGUASQBPAEEAVgBQAHIAbwB0AGUAYwB0AGkAbwBuACAA'
            - 'EAGkAcwBhAGIAbABlAEkATwBBAFYAUAByAG8AdABlAGMAdABpAG8AbgAgA'
            - 'RABpAHMAYQBiAGwAZQBCAGUAaABhAHYAaQBvAHIATQBvAG4AaQB0AG8AcgBpAG4AZwAgA'
            - 'QAaQBzAGEAYgBsAGUAQgBlAGgAYQB2AGkAbwByAE0AbwBuAGkAdABvAHIAaQBuAGcAIA'
            - 'EAGkAcwBhAGIAbABlAEIAZQBoAGEAdgBpAG8AcgBNAG8AbgBpAHQAbwByAGkAbgBnACAA'
            - 'RABpAHMAYQBiAGwAZQBCAGwAbwBjAGsAQQB0AEYAaQByAHMAdABTAGUAZQBuACAA'
            - 'QAaQBzAGEAYgBsAGUAQgBsAG8AYwBrAEEAdABGAGkAcgBzAHQAUwBlAGUAbgAgA'
            - 'EAGkAcwBhAGIAbABlAEIAbABvAGMAawBBAHQARgBpAHIAcwB0AFMAZQBlAG4AIA'
            - 'ZABpAHMAYQBiAGwAZQByAGUAYQBsAHQAaQBtAGUAbQBvAG4AaQB0AG8AcgBpAG4AZwAgA'
            - 'QAaQBzAGEAYgBsAGUAcgBlAGEAbAB0AGkAbQBlAG0AbwBuAGkAdABvAHIAaQBuAGcAIA'
            - 'kAGkAcwBhAGIAbABlAHIAZQBhAGwAdABpAG0AZQBtAG8AbgBpAHQAbwByAGkAbgBnACAA'
            - 'ZABpAHMAYQBiAGwAZQBpAG8AYQB2AHAAcgBvAHQAZQBjAHQAaQBvAG4AIA'
            - 'QAaQBzAGEAYgBsAGUAaQBvAGEAdgBwAHIAbwB0AGUAYwB0AGkAbwBuACAA'
            - 'kAGkAcwBhAGIAbABlAGkAbwBhAHYAcAByAG8AdABlAGMAdABpAG8AbgAgA'
            - 'ZABpAHMAYQBiAGwAZQBiAGUAaABhAHYAaQBvAHIAbQBvAG4AaQB0AG8AcgBpAG4AZwAgA'
            - 'QAaQBzAGEAYgBsAGUAYgBlAGgAYQB2AGkAbwByAG0AbwBuAGkAdABvAHIAaQBuAGcAIA'
            - 'kAGkAcwBhAGIAbABlAGIAZQBoAGEAdgBpAG8AcgBtAG8AbgBpAHQAbwByAGkAbgBnACAA'
            - 'ZABpAHMAYQBiAGwAZQBiAGwAbwBjAGsAYQB0AGYAaQByAHMAdABzAGUAZQBuACAA'
            - 'QAaQBzAGEAYgBsAGUAYgBsAG8AYwBrAGEAdABmAGkAcgBzAHQAcwBlAGUAbgAgA'
            - 'kAGkAcwBhAGIAbABlAGIAbABvAGMAawBhAHQAZgBpAHIAcwB0AHMAZQBlAG4AIA'
            - 'RABpAHMAYQBiAGwAZQBDAGEAdABjAGgAdQBwAEYAdQBsAGwAUwBjAGEAbgA'
            - 'RABpAHMAYQBiAGwAZQBDAGEAdABjAGgAdQBwAFEAdQBpAGMAawBTAGMAYQBuAA'
            - 'RABpAHMAYQBiAGwAZQBBAHIAYwBoAGkAdgBlAFMAYwBhAG4AbgBpAG4AZwA'
    condition: all of selection_cli_* or 1 of selection_encoded_*
falsepositives:
    - Possible administrative activity
    - Other Cmdlets that may use the same parameters
level: high
Convert to SIEM query
high Moderate High FP
Powershell Install a DLL in System Directory
Uses PowerShell to install/copy a file into a system directory such as "System32" or "SysWOW64"
status test author frack113, Nasreddine Bencherchali (Nextron Systems) ATT&CK sub-technique id 63bf8794-9917-45bc-88dd-e1b5abc0ecfd
carbon_black query
ScriptBlockText:(Copy-Item|cpi) .{2,128} -Destination .{1,32}\\\\Windows\\\\(System32|SysWOW64)
view Sigma YAML
title: Powershell Install a DLL in System Directory
id: 63bf8794-9917-45bc-88dd-e1b5abc0ecfd
status: test
description: Uses PowerShell to install/copy a file into a system directory such as "System32" or "SysWOW64"
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1556.002/T1556.002.md#atomic-test-1---install-and-register-password-filter-dll
author: frack113, Nasreddine Bencherchali (Nextron Systems)
date: 2021-12-27
modified: 2024-01-22
tags:
    - attack.persistence
    - attack.credential-access
    - attack.defense-impairment
    - attack.t1556.002
logsource:
    product: windows
    category: ps_script
    definition: 'Requirements: Script Block Logging must be enabled'
detection:
    selection:
        ScriptBlockText|re: '(Copy-Item|cpi) .{2,128} -Destination .{1,32}\\Windows\\(System32|SysWOW64)'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate High FP
Powershell Token Obfuscation - Process Creation
Detects TOKEN OBFUSCATION technique from Invoke-Obfuscation
status test author frack113 ATT&CK sub-technique id deb9b646-a508-44ee-b7c9-d8965921c6b6
carbon_black query
(CommandLine:\\w+`(?:\\w+|-|.)`[\\w+|\\s] OR CommandLine:"(?:\\{\\d\\})+"\\s*-f OR CommandLine:(?i)\\$\\{`?e`?n`?v`?:`?p`?a`?t`?h`?\\}) (-CommandLine:$\{env\:path\}*)
view Sigma YAML
title: Powershell Token Obfuscation - Process Creation
id: deb9b646-a508-44ee-b7c9-d8965921c6b6
related:
    - id: f3a98ce4-6164-4dd4-867c-4d83de7eca51
      type: similar
status: test
description: Detects TOKEN OBFUSCATION technique from Invoke-Obfuscation
references:
    - https://github.com/danielbohannon/Invoke-Obfuscation
author: frack113
date: 2022-12-27
modified: 2026-03-16
tags:
    - attack.stealth
    - attack.t1027.009
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        # Examples:
        #   IN`V`o`Ke-eXp`ResSIOn (Ne`W-ob`ject Net.WebClient).DownloadString
        #   &('In'+'voke-Expressi'+'o'+'n') (.('New-Ob'+'jec'+'t') Net.WebClient).DownloadString
        #   &("{2}{3}{0}{4}{1}"-f 'e','Expression','I','nvok','-') (&("{0}{1}{2}"-f'N','ew-O','bject') Net.WebClient).DownloadString
        - CommandLine|re: '\w+`(?:\w+|-|.)`[\w+|\s]'
        # - CommandLine|re: '\((\'(\w|-|\.)+\'\+)+\'(\w|-|\.)+\'\)' TODO: fixme
        - CommandLine|re: '"(?:\{\d\})+"\s*-f'
        #   ${e`Nv:pATh}
        - CommandLine|re: '(?i)\$\{`?e`?n`?v`?:`?p`?a`?t`?h`?\}'
    filter_main_envpath:
        CommandLine|contains: '${env:path}'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Strong Low FP
Powerview Add-DomainObjectAcl DCSync AD Extend Right
Backdooring domain object to grant the rights associated with DCSync to a regular user or machine account using Powerview\Add-DomainObjectAcl DCSync Extended Right cmdlet, will allow to re-obtain the pwd hashes of any user/computer
status test author Samir Bousseaden, Roberto Rodriguez @Cyb3rWard0g, oscd.community, Tim Shelton, Maxence Fossat ATT&CK technique id 2c99737c-585d-4431-b61a-c911d86ff32f
carbon_black query
(EventID:5136 AttributeLDAPDisplayName:ntSecurityDescriptor (AttributeValue:1131f6ad\-9c07\-11d1\-f79f\-00c04fc2dcd2* OR AttributeValue:1131f6aa\-9c07\-11d1\-f79f\-00c04fc2dcd2* OR AttributeValue:89e95b76\-444d\-4c62\-991a\-0facbeda640c*)) (-(ObjectClass:dnsNode OR ObjectClass:dnsZoneScope OR ObjectClass:dnsZone))
view Sigma YAML
title: Powerview Add-DomainObjectAcl DCSync AD Extend Right
id: 2c99737c-585d-4431-b61a-c911d86ff32f
status: test
description: Backdooring domain object to grant the rights associated with DCSync to a regular user or machine account using Powerview\Add-DomainObjectAcl DCSync Extended Right cmdlet, will allow to re-obtain the pwd hashes of any user/computer
references:
    - https://twitter.com/menasec1/status/1111556090137903104
    - https://www.specterops.io/assets/resources/an_ace_up_the_sleeve.pdf
author: Samir Bousseaden, Roberto Rodriguez @Cyb3rWard0g, oscd.community, Tim Shelton, Maxence Fossat
date: 2019-04-03
modified: 2022-08-16
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1098
logsource:
    product: windows
    service: security
    definition: 'Requirements: The "Audit Directory Service Changes" logging policy must be configured in order to receive events. Audit events are generated only for objects with configured system access control lists (SACLs). Audit events are generated only for objects with configured system access control lists (SACLs) and only when accessed in a manner that matches their SACL settings. This policy covers the following events ids - 5136, 5137, 5138, 5139, 5141. Note that the default policy does not cover User objects. For that a custom AuditRule need to be setup (See https://github.com/OTRF/Set-AuditRule)'
detection:
    selection:
        EventID: 5136
        AttributeLDAPDisplayName: 'ntSecurityDescriptor'
        AttributeValue|contains:
            - '1131f6ad-9c07-11d1-f79f-00c04fc2dcd2'
            - '1131f6aa-9c07-11d1-f79f-00c04fc2dcd2'
            - '89e95b76-444d-4c62-991a-0facbeda640c'
    filter_main_dns_object_class:
        ObjectClass:
            - 'dnsNode'
            - 'dnsZoneScope'
            - 'dnsZone'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - New Domain Controller computer account, check user SIDs within the value attribute of event 5136 and verify if it's a regular user or DC computer account.
level: high
Convert to SIEM query
high Moderate Medium FP
Prefetch File Deleted
Detects the deletion of a prefetch file which may indicate an attempt to destroy forensic evidence
status test author Cedric MAURUGEON ATT&CK sub-technique id 0a1f9d29-6465-4776-b091-7f43b26e4c89
carbon_black query
(TargetFilename:\:\\Windows\\Prefetch\\* TargetFilename:.pf) (-(Image:\:\\windows\\system32\\svchost.exe (User:AUTHORI* OR User:AUTORI*)))
view Sigma YAML
title: Prefetch File Deleted
id: 0a1f9d29-6465-4776-b091-7f43b26e4c89
status: test
description: Detects the deletion of a prefetch file which may indicate an attempt to destroy forensic evidence
references:
    - Internal Research
    - https://www.group-ib.com/blog/hunting-for-ttps-with-prefetch-files/
author: Cedric MAURUGEON
date: 2021-09-29
modified: 2024-01-25
tags:
    - attack.stealth
    - attack.t1070.004
logsource:
    product: windows
    category: file_delete
detection:
    selection:
        TargetFilename|contains: ':\Windows\Prefetch\'
        TargetFilename|endswith: '.pf'
    filter_main_svchost:
        Image|endswith: ':\windows\system32\svchost.exe'
        User|contains: # covers many language settings
            - 'AUTHORI'
            - 'AUTORI'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Moderate Medium FP
Primary Refresh Token Access Attempt
Indicates access attempt to the PRT resource which can be used to move laterally into an organization or perform credential theft
status test author Mark Morowczynski '@markmorow', Gloria Lee, '@gleeiamglo' ATT&CK technique id a84fc3b1-c9ce-4125-8e74-bdcdb24021f1
carbon_black query
riskEventType:attemptedPrtAccess
view Sigma YAML
title: Primary Refresh Token Access Attempt
id: a84fc3b1-c9ce-4125-8e74-bdcdb24021f1
status: test
description: Indicates access attempt to the PRT resource which can be used to move laterally into an organization or perform credential theft
references:
    - https://learn.microsoft.com/en-us/entra/id-protection/concept-identity-protection-risks#possible-attempt-to-access-primary-refresh-token-prt
    - https://learn.microsoft.com/en-us/entra/architecture/security-operations-user-accounts#unusual-sign-ins
author: Mark Morowczynski '@markmorow', Gloria Lee, '@gleeiamglo'
date: 2023-09-07
tags:
    - attack.t1528
    - attack.credential-access
logsource:
    product: azure
    service: riskdetection
detection:
    selection:
        riskEventType: 'attemptedPrtAccess'
    condition: selection
falsepositives:
    - This detection is low-volume and is seen infrequently in most organizations. When this detection appears it's high risk, and users should be remediated.
level: high
Convert to SIEM query
high Moderate High FP
PrintBrm ZIP Creation of Extraction
Detects the execution of the LOLBIN PrintBrm.exe, which can be used to create or extract ZIP files. PrintBrm.exe should not be run on a normal workstation.
status test author frack113 ATT&CK sub-technique id cafeeba3-01da-4ab4-b6c4-a31b1d9730c7
carbon_black query
Image:\\PrintBrm.exe (CommandLine:\ \-f* CommandLine:.zip*)
view Sigma YAML
title: PrintBrm ZIP Creation of Extraction
id: cafeeba3-01da-4ab4-b6c4-a31b1d9730c7
status: test
description: Detects the execution of the LOLBIN PrintBrm.exe, which can be used to create or extract ZIP files. PrintBrm.exe should not be run on a normal workstation.
references:
    - https://lolbas-project.github.io/lolbas/Binaries/PrintBrm/
author: frack113
date: 2022-05-02
tags:
    - attack.command-and-control
    - attack.stealth
    - attack.t1105
    - attack.t1564.004
logsource:
    product: windows
    category: process_creation
detection:
    selection:
        Image|endswith: '\PrintBrm.exe'
        CommandLine|contains|all:
            - ' -f'
            - '.zip'
    condition: selection
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Strong High FP
Privilege Escalation via Named Pipe Impersonation
Detects a remote file copy attempt to a hidden network share. This may indicate lateral movement or data staging activity.
status test author Tim Rauch, Elastic (idea) ATT&CK technique id 9bd04a79-dabe-4f1f-a5ff-92430265c96b
carbon_black query
((Image:\\cmd.exe OR Image:\\powershell.exe) OR (OriginalFileName:Cmd.Exe OR OriginalFileName:PowerShell.EXE)) (CommandLine:echo* CommandLine:>* CommandLine:\\\\.\\pipe\\*)
view Sigma YAML
title: Privilege Escalation via Named Pipe Impersonation
id: 9bd04a79-dabe-4f1f-a5ff-92430265c96b
related:
    - id: f35c5d71-b489-4e22-a115-f003df287317
      type: derived
status: test
description: Detects a remote file copy attempt to a hidden network share. This may indicate lateral movement or data staging activity.
references:
    - https://www.elastic.co/guide/en/security/current/privilege-escalation-via-named-pipe-impersonation.html
author: Tim Rauch, Elastic (idea)
date: 2022-09-27
modified: 2022-12-30
tags:
    - attack.lateral-movement
    - attack.t1021
logsource:
    category: process_creation
    product: windows
detection:
    selection_name:
        - Image|endswith:
              - '\cmd.exe'
              - '\powershell.exe'
        - OriginalFileName:
              - 'Cmd.Exe'
              - 'PowerShell.EXE'
    selection_args:
        CommandLine|contains|all:
            - 'echo'
            - '>'
            - '\\\\.\\pipe\\'
    condition: all of selection*
falsepositives:
    - Other programs that cause these patterns (please report)
level: high
Convert to SIEM query
high Moderate Medium FP
Privileged User Has Been Created
Detects the addition of a new user to a privileged group such as "root" or "sudo"
status test author Pawel Mazur ATT&CK sub-technique id 0ac15ec3-d24f-4246-aa2a-3077bb1cf90e
carbon_black query
"new\ user" ("GID=0," OR "UID=0," OR "GID=10," OR "GID=27,")
view Sigma YAML
title: Privileged User Has Been Created
id: 0ac15ec3-d24f-4246-aa2a-3077bb1cf90e
status: test
description: Detects the addition of a new user to a privileged group such as "root" or "sudo"
references:
    - https://digital.nhs.uk/cyber-alerts/2018/cc-2825
    - https://linux.die.net/man/8/useradd
    - https://github.com/redcanaryco/atomic-red-team/blob/25acadc0b43a07125a8a5b599b28bbc1a91ffb06/atomics/T1136.001/T1136.001.md#atomic-test-5---create-a-new-user-in-linux-with-root-uid-and-gid
author: Pawel Mazur
date: 2022-12-21
modified: 2025-01-21
tags:
    - attack.privilege-escalation
    - attack.persistence
    - attack.t1136.001
    - attack.t1098
logsource:
    product: linux
    definition: '/var/log/secure on REHL systems or /var/log/auth.log on debian like Systems needs to be collected in order for this detection to work'
detection:
    # Example of the events that could be observed when matching these would be as follow
    #   Dec 21 16:42:19 testserver useradd[1337]: new user: name=butter1, UID=1000, GID=0, home=/root, shell=/bin/bash
    #   Dec 21 17:13:54 testserver useradd[1337]: new user: name=john, UID=0, GID=0, home=/home/john, shell=/bin/bash
    #   Dec 21 17:24:40 testserver useradd[1337]: new user: name=butter3, UID=1000, GID=10, home=/home/butter3, shell=/bin/bash
    #   Dec 21 17:30:22 testserver useradd[1337]: new user: name=butter4, UID=1000, GID=27, home=/home/butter4, shell=/bin/bash
    selection_new_user:
        - 'new user'
    selection_uids_gids:
        - 'GID=0,' # root group
        - 'UID=0,' # root UID
        - 'GID=10,' # wheel group
        - 'GID=27,' # sudo group
    condition: all of selection_*
falsepositives:
    - Administrative activity
level: high
Convert to SIEM query
high Moderate Medium FP
Process Execution Error In JVM Based Application
Detects process execution related exceptions in JVM based apps, often relates to RCE
status test author Moti Harmats ATT&CK technique id d65f37da-a26a-48f8-8159-3dde96680ad2
carbon_black query
"Cannot\ run\ program" OR "java.lang.ProcessImpl" OR "java.lang.ProcessBuilder"
view Sigma YAML
title: Process Execution Error In JVM Based Application
id: d65f37da-a26a-48f8-8159-3dde96680ad2
status: test
description: Detects process execution related exceptions in JVM based apps, often relates to RCE
references:
    - https://www.wix.engineering/post/threat-and-vulnerability-hunting-with-application-server-error-logs
author: Moti Harmats
date: 2023-02-11
tags:
    - attack.initial-access
    - attack.t1190
logsource:
    category: application
    product: jvm
    definition: 'Requirements: application error logs must be collected (with LOG_LEVEL=ERROR and above)'
detection:
    keywords:
        - 'Cannot run program'
        - 'java.lang.ProcessImpl'
        - 'java.lang.ProcessBuilder'
    condition: keywords
falsepositives:
    - Application bugs
level: high
Convert to SIEM query
high Strong Medium FP
Process Execution From A Potentially Suspicious Folder
Detects a potentially suspicious execution from an uncommon folder.
status test author Florian Roth (Nextron Systems), Tim Shelton ATT&CK technique id 3dfd06d2-eaf4-4532-9555-68aca59f57c4
carbon_black query
(Image:\:\\Perflogs\\* OR Image:\:\\Users\\All\ Users\\* OR Image:\:\\Users\\Default\\* OR Image:\:\\Users\\NetworkService\\* OR Image:\:\\Windows\\addins\\* OR Image:\:\\Windows\\debug\\* OR Image:\:\\Windows\\Fonts\\* OR Image:\:\\Windows\\Help\\* OR Image:\:\\Windows\\IME\\* OR Image:\:\\Windows\\Media\\* OR Image:\:\\Windows\\repair\\* OR Image:\:\\Windows\\security\\* OR Image:\:\\Windows\\System32\\Tasks\\* OR Image:\:\\Windows\\Tasks\\* OR Image:$Recycle.bin* OR Image:\\config\\systemprofile\\* OR Image:\\Intel\\Logs\\* OR Image:\\RSA\\MachineKeys\\*) (-(Image:C\:\\Users\\Public\\IBM\\ClientSolutions\\Start_Programs\\* OR (Image:C\:\\Windows\\SysWOW64\\config\\systemprofile\\Citrix\\UpdaterBinaries\\* Image:\\CitrixReceiverUpdater.exe)))
view Sigma YAML
title: Process Execution From A Potentially Suspicious Folder
id: 3dfd06d2-eaf4-4532-9555-68aca59f57c4
status: test
description: Detects a potentially suspicious execution from an uncommon folder.
references:
    - https://github.com/mbevilacqua/appcompatprocessor/blob/6c847937c5a836e2ce2fe2b915f213c345a3c389/AppCompatSearch.txt
    - https://www.secureworks.com/research/bronze-butler-targets-japanese-businesses
    - https://www.crowdstrike.com/resources/reports/2019-crowdstrike-global-threat-report/
    - https://github.com/ThreatHuntingProject/ThreatHunting/blob/cb22598bb70651f88e0285abc8d835757d2cb596/hunts/suspicious_process_creation_via_windows_event_logs.md
author: Florian Roth (Nextron Systems), Tim Shelton
date: 2019-01-16
modified: 2024-07-12
tags:
    - attack.stealth
    - attack.t1036
logsource:
    category: process_creation
    product: windows
detection:
    selection:
        Image|contains:
            - ':\Perflogs\'
            - ':\Users\All Users\'
            - ':\Users\Default\'
            - ':\Users\NetworkService\'
            - ':\Windows\addins\'
            - ':\Windows\debug\'
            - ':\Windows\Fonts\'
            - ':\Windows\Help\'
            - ':\Windows\IME\'
            - ':\Windows\Media\'
            - ':\Windows\repair\'
            - ':\Windows\security\'
            - ':\Windows\System32\Tasks\'
            - ':\Windows\Tasks\'
            - '$Recycle.bin'
            - '\config\systemprofile\'
            - '\Intel\Logs\'
            - '\RSA\MachineKeys\'
    filter_optional_ibm:
        Image|startswith: 'C:\Users\Public\IBM\ClientSolutions\Start_Programs\'
    filter_optional_citrix:
        Image|startswith: 'C:\Windows\SysWOW64\config\systemprofile\Citrix\UpdaterBinaries\'
        Image|endswith: '\CitrixReceiverUpdater.exe'
    condition: selection and not 1 of filter_optional_*
falsepositives:
    - Unknown
level: high
Convert to SIEM query
high Strong Medium FP
Process Explorer Driver Creation By Non-Sysinternals Binary
Detects creation of the Process Explorer drivers by processes other than Process Explorer (procexp) itself. Hack tools or malware may use the Process Explorer driver to elevate privileges, drops it to disk for a few moments, runs a service using that driver and removes it afterwards.
status test author Florian Roth (Nextron Systems) ATT&CK technique id de46c52b-0bf8-4936-a327-aace94f94ac6
carbon_black query
(TargetFilename:\\PROCEXP* TargetFilename:.sys) (-(Image:\\procexp.exe OR Image:\\procexp64.exe))
view Sigma YAML
title: Process Explorer Driver Creation By Non-Sysinternals Binary
id: de46c52b-0bf8-4936-a327-aace94f94ac6
status: test
description: |
    Detects creation of the Process Explorer drivers by processes other than Process Explorer (procexp) itself.
    Hack tools or malware may use the Process Explorer driver to elevate privileges, drops it to disk for a few moments, runs a service using that driver and removes it afterwards.
references:
    - https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer
    - https://github.com/Yaxser/Backstab
    - https://www.elastic.co/security-labs/stopping-vulnerable-driver-attacks
    - https://news.sophos.com/en-us/2023/04/19/aukill-edr-killer-malware-abuses-process-explorer-driver/
author: Florian Roth (Nextron Systems)
date: 2023-05-05
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1068
logsource:
    product: windows
    category: file_event
detection:
    selection:
        TargetFilename|contains: '\PROCEXP'
        TargetFilename|endswith: '.sys'
    filter_main_process_explorer:
        Image|endswith:
            - '\procexp.exe'
            - '\procexp64.exe'
    condition: selection and not 1 of filter_main_*
falsepositives:
    - Some false positives may occur with legitimate renamed process explorer binaries
level: high
Convert to SIEM query
high Strong Medium FP
Process Initiated Network Connection To Ngrok Domain
Detects an executable initiating a network connection to "ngrok" domains. Attackers were seen using this "ngrok" in order to store their second stage payloads and malware. While communication with such domains can be legitimate, often times is a sign of either data exfiltration by malicious actors or additional download.
status test author Florian Roth (Nextron Systems) ATT&CK technique id 18249279-932f-45e2-b37a-8925f2597670
carbon_black query
Initiated:true (DestinationHostname:.ngrok\-free.app OR DestinationHostname:.ngrok\-free.dev OR DestinationHostname:.ngrok.app OR DestinationHostname:.ngrok.dev OR DestinationHostname:.ngrok.io)
view Sigma YAML
title: Process Initiated Network Connection To Ngrok Domain
id: 18249279-932f-45e2-b37a-8925f2597670
related:
    - id: 1d08ac94-400d-4469-a82f-daee9a908849
      type: similar
status: test
description: |
    Detects an executable initiating a network connection to "ngrok" domains.
    Attackers were seen using this "ngrok" in order to store their second stage payloads and malware.
    While communication with such domains can be legitimate, often times is a sign of either data exfiltration by malicious actors or additional download.
references:
    - https://ngrok.com/
    - https://ngrok.com/blog-post/new-ngrok-domains
    - https://www.virustotal.com/gui/file/cca0c1182ac114b44dc52dd2058fcd38611c20bb6b5ad84710681d38212f835a/
    - https://www.rnbo.gov.ua/files/2023_YEAR/CYBERCENTER/november/APT29%20attacks%20Embassies%20using%20CVE-2023-38831%20-%20report%20en.pdf
author: Florian Roth (Nextron Systems)
date: 2022-07-16
modified: 2025-07-30
tags:
    - attack.exfiltration
    - attack.command-and-control
    - attack.t1567
    - attack.t1572
    - attack.t1102
logsource:
    category: network_connection
    product: windows
detection:
    selection:
        Initiated: 'true'
        DestinationHostname|endswith:
            - '.ngrok-free.app'
            - '.ngrok-free.dev'
            - '.ngrok.app'
            - '.ngrok.dev'
            - '.ngrok.io'
    condition: selection
falsepositives:
    - Legitimate use of the ngrok service.
# Note: The level of this rule is related to your internal policy.
level: high
Convert to SIEM query
high Strong Medium FP
Process Memory Dump Via Comsvcs.DLL
Detects a process memory dump via "comsvcs.dll" using rundll32, covering multiple different techniques (ordinal, minidump function, etc.)
status test author Florian Roth (Nextron Systems), Modexp, Nasreddine Bencherchali (Nextron Systems), Swachchhanda Shrawan Poudel (Nextron Systems) ATT&CK sub-technique id 646ea171-dded-4578-8a4d-65e9822892e3
carbon_black query
((Image:\\rundll32.exe OR OriginalFileName:RUNDLL32.EXE OR CommandLine:rundll32*) ((CommandLine:comsvcs* CommandLine:full*) (CommandLine:#\-* OR CommandLine:#\+* OR CommandLine:#24* OR CommandLine:24\ * OR CommandLine:MiniDump* OR CommandLine:#65560*))) OR ((CommandLine:24* CommandLine:comsvcs* CommandLine:full*) (CommandLine:\ #* OR CommandLine:,#* OR CommandLine:,\ #* OR CommandLine:\"#*))
view Sigma YAML
title: Process Memory Dump Via Comsvcs.DLL
id: 646ea171-dded-4578-8a4d-65e9822892e3
related:
    - id: 09e6d5c0-05b8-4ff8-9eeb-043046ec774c
      type: obsolete
status: test
description: Detects a process memory dump via "comsvcs.dll" using rundll32, covering multiple different techniques (ordinal, minidump function, etc.)
references:
    - https://twitter.com/shantanukhande/status/1229348874298388484
    - https://twitter.com/pythonresponder/status/1385064506049630211?s=21
    - https://twitter.com/Hexacorn/status/1224848930795552769
    - https://modexp.wordpress.com/2019/08/30/minidumpwritedump-via-com-services-dll/
    - https://twitter.com/SBousseaden/status/1167417096374050817
    - https://twitter.com/Wietze/status/1542107456507203586
    - https://github.com/Hackndo/lsassy/blob/14d8f8ae596ecf22b449bfe919829173b8a07635/lsassy/dumpmethod/comsvcs.py
    - https://www.youtube.com/watch?v=52tAmVLg1KM&t=2070s
author: Florian Roth (Nextron Systems), Modexp, Nasreddine Bencherchali (Nextron Systems), Swachchhanda Shrawan Poudel (Nextron Systems)
date: 2020-02-18
modified: 2025-02-23
tags:
    - attack.credential-access
    - attack.stealth
    - attack.t1036
    - attack.t1003.001
    - car.2013-05-009
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\rundll32.exe'
        - OriginalFileName: 'RUNDLL32.EXE'
        - CommandLine|contains: 'rundll32'
    selection_cli_1:
        CommandLine|contains|all:
            - 'comsvcs'
            - 'full'
        CommandLine|contains:
            - '#-'
            - '#+'
            - '#24'
            - '24 '
            - 'MiniDump' # Matches MiniDump and MinidumpW
            - '#65560' # ordinal is 16 bit ordinal, so if you make the number large enough (don't fit in 16 bit space), then it normally wraps around.  for e.g ordinal 24 can be also represented by 65560 (65536+24)
    selection_generic:
        CommandLine|contains|all:
            - '24'
            - 'comsvcs'
            - 'full'
        CommandLine|contains:
            - ' #'
            - ',#'
            - ', #'
            - '"#'
    condition: (selection_img and 1 of selection_cli_*) or selection_generic
falsepositives:
    - Unlikely
level: high
Convert to SIEM query
high Strong Medium FP
Process Memory Dump via RdrLeakDiag.EXE
Detects the use of the Microsoft Windows Resource Leak Diagnostic tool "rdrleakdiag.exe" to dump process memory
status test author Cedric MAURUGEON, Florian Roth (Nextron Systems), Swachchhanda Shrawan Poudel, Nasreddine Bencherchali (Nextron Systems) ATT&CK sub-technique id edadb1e5-5919-4e4c-8462-a9e643b02c4b
carbon_black query
(Image:\\rdrleakdiag.exe OR OriginalFileName:RdrLeakDiag.exe) (CommandLine:\-memdmp* OR CommandLine:\/memdmp* OR CommandLine:–memdmp* OR CommandLine:—memdmp* OR CommandLine:―memdmp* OR CommandLine:fullmemdmp*) (CommandLine:\ \-o\ * OR CommandLine:\ \/o\ * OR CommandLine:\ –o\ * OR CommandLine:\ —o\ * OR CommandLine:\ ―o\ * OR CommandLine:\ \-p\ * OR CommandLine:\ \/p\ * OR CommandLine:\ –p\ * OR CommandLine:\ —p\ * OR CommandLine:\ ―p\ *)
view Sigma YAML
title: Process Memory Dump via RdrLeakDiag.EXE
id: edadb1e5-5919-4e4c-8462-a9e643b02c4b
related:
    - id: 6355a919-2e97-4285-a673-74645566340d
      type: obsolete
status: test
description: Detects the use of the Microsoft Windows Resource Leak Diagnostic tool "rdrleakdiag.exe" to dump process memory
references:
    - https://www.pureid.io/dumping-abusing-windows-credentials-part-1/
    - https://www.crowdstrike.com/blog/overwatch-exposes-aquatic-panda-in-possession-of-log-4-shell-exploit-tools/
    - https://lolbas-project.github.io/lolbas/Binaries/Rdrleakdiag/
    - https://twitter.com/0gtweet/status/1299071304805560321?s=21
    - https://news.sophos.com/en-us/2024/06/05/operation-crimson-palace-a-technical-deep-dive
author: Cedric MAURUGEON, Florian Roth (Nextron Systems), Swachchhanda Shrawan Poudel, Nasreddine Bencherchali (Nextron Systems)
date: 2021-09-24
modified: 2024-08-15
tags:
    - attack.credential-access
    - attack.t1003.001
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - Image|endswith: '\rdrleakdiag.exe'
        - OriginalFileName: RdrLeakDiag.exe
    selection_cli_dump:
        CommandLine|contains|windash:
            - '/memdmp'
            - 'fullmemdmp'
    selection_cli_output_process:
        CommandLine|contains|windash:
            - ' /o ' # Output
            - ' /p ' # Process
    condition: all of selection_*
falsepositives:
    - Unlikely
level: high
Convert to SIEM query
Showing 1201-1250 of 3,646