Detection rules · Sigma, Cortex XQL, YARA

All rules, every day

The catalogue of Threat Brief rules since day one: filter by format, period, level or ATT&CK technique, open a rule to read its code, and download the selection as one file.

111 rules over 28 days Most recent first
DateFormatRule and topicLevelATT&CK
03/11 SIGMA Reverse SSH tunnel to localhost:22 from Cursor or NodeTrojanised "Claude Code" extension on the Cursor marketplace: SSH backdoor high T1572 T1098.004
tb-2026-11-03-tunnel-ssh-inverse-vers-localhost-22-depuis-cursor-ou-node.ymlDownload Sigma rule
title: Reverse SSH tunnel to localhost:22 spawned from Cursor or Node (weaponised Claude Code extension)
id: eb97060c-943d-42aa-b329-0cab9f65b68b
status: experimental
description: ssh process opening a reverse tunnel to local port 22, spawned by Cursor or Node, or targeting tunnel@134.209.82.225, matching the loader in anthropic.claude-code extension 2.1.312 and 2.1.313 from the Cursor marketplace.
references:
  - https://opensourcemalware.com/blog/trojanized-claude-code-extension-plants-persistent-ssh-backdoor
  - https://www.helpnetsecurity.com/2026/10/30/claude-code-extension-ssh-backdoor/
author: Threat Brief (tlpclear.fr)
date: 2026-11-03
tags:
  - attack.command-and-control
  - attack.t1572
  - attack.persistence
  - attack.t1098.004
logsource:
  category: process_creation
detection:
  selection_ssh:
    Image|endswith:
      - '/ssh'
      - '\ssh.exe'
    CommandLine|contains: ' -R '
  selection_target:
    CommandLine|contains: 'localhost:22'
  selection_parent:
    ParentImage|contains:
      - 'Cursor'
      - 'node'
  selection_ioc:
    CommandLine|contains: 'tunnel@134.209.82.225'
  condition: (selection_ssh and selection_target and selection_parent) or selection_ioc
falsepositives:
  - Developers manually opening a reverse tunnel from the editor integrated terminal
level: high
sigma: parsed and converted (splunk, lucene) process_creation (Windows, macOS, Linux) Licence DRL 1.1

ssh -R to local port 22 spawned by the editor or Node, or targeting tunnel@134.209.82.225: backdoor tunnel from the weaponised extension. False positives: Reverse tunnel opened intentionally from the integrated terminal.

03/11 YARA extension.js of the weaponised Claude Code loaderTrojanised "Claude Code" extension on the Cursor marketplace: SSH backdoor high T1195.002 T1098.004
tb-2026-11-03-extension-js-du-loader-claude-code-pi-g.yarDownload YARA rule
rule TB_20261103_ClaudeCode_Cursor_extension_loader
{
    meta:
        author = "Threat Brief (tlpclear.fr)"
        date = "2026-11-03"
        reference = "https://opensourcemalware.com/blog/trojanized-claude-code-extension-plants-persistent-ssh-backdoor"
        description = "Weaponised extension.js from anthropic.claude-code extension (Cursor marketplace): svc-telemetry key, authorized_keys, and reverse SSH tunnel"
        status = "experimental"
    strings:
        $k1 = "svc-telemetry" ascii
        $k2 = "authorized_keys" ascii
        $k3 = "134.209.82.225" ascii
        $k4 = "localhost:22" ascii
        $k5 = "child_process" ascii
    condition:
        filesize < 30MB and $k5 and 3 of ($k1, $k2, $k3, $k4)
}
yara: compiled JavaScript file (extension.js) Licence DRL 1.1

Strings from the injected loader prepended to extension.js: svc-telemetry key, authorized_keys, tunnel to 134.209.82.225. False positives: None known.

02/11 SIGMA php-cgi.exe spawning cmd, PowerShell or certutilPHP2Shell: root on PAN-OS firewalls with exposed management interface, and new unpatched PHP RCE high T1190 T1505.003 T1059.001 T1059.003
tb-2026-11-02-php-cgi-exe-lan-ant-cmd-powershell-ou-certutil.ymlDownload Sigma rule
title: cmd or PowerShell spawned by php-cgi.exe (PHP2Shell)
id: ba48f153-1434-44be-a611-de4cdde132f3
status: experimental
description: php-cgi.exe or php.exe spawning cmd.exe, powershell.exe or certutil.exe, pattern observed following PHP2Shell exploitation on IIS.
references:
  - https://www.prophetsecurity.ai/blog/php2shell
  - https://www.trellix.com/blogs/research/php2shell-key-info-on-cve-2026-109618-and-cve-2026-109619/
author: Threat Brief (tlpclear.fr)
date: 2026-11-02
tags:
  - attack.initial-access
  - attack.t1190
  - attack.persistence
  - attack.t1505.003
  - cve.2026-109618
logsource:
  product: windows
  category: process_creation
detection:
  selection:
    ParentImage|endswith:
      - '\php-cgi.exe'
      - '\php.exe'
    Image|endswith:
      - '\cmd.exe'
      - '\powershell.exe'
      - '\pwsh.exe'
      - '\certutil.exe'
  condition: selection
falsepositives:
  - Administrative PHP scripts spawning system commands (scheduled tasks, CLI tools)
level: high
sigma: parsed and converted (splunk, lucene) windows process_creation Licence DRL 1.1

PHP2Shell post-exploitation under IIS (Prophet case: php-cgi.exe spawning cmd.exe under IUSR after a WerFault crash). False positives: Administrative PHP scripts executing commands.

02/11 SIGMA ~/.config/.smt and .smtk createdTrojanised "Claude Code" extension on the Cursor marketplace: persistent SSH backdoor high T1098.004 T1564.001
tb-2026-11-02-config-smt-et-smtk-cr-s.ymlDownload Sigma rule
title: .smt / .smtk files from the trojanised Claude Code extension backdoor
id: b6da2ef5-2f58-4443-b686-469168e677d8
status: experimental
description: Creation of ~/.config/.smt or ~/.config/.smtk, SSH backdoor artefacts from the trojanised anthropic.claude-code extension on the Cursor marketplace.
references:
  - https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cursor-extension-persistent-ssh-backdoor/
  - https://opensourcemalware.com/blog/trojanized-claude-code-extension-plants-persistent-ssh-backdoor
author: Threat Brief (tlpclear.fr)
date: 2026-11-02
tags:
  - attack.persistence
  - attack.t1098.004
logsource:
  category: file_event
detection:
  selection:
    TargetFilename|endswith:
      - '/.config/.smt'
      - '/.config/.smtk'
  condition: selection
falsepositives:
  - Legitimate tool using the same hidden filename, verify
level: high
sigma: parsed and converted (splunk, lucene) file_event (Linux, macOS) Licence DRL 1.1

Backdoor disk artefacts reported by edition sources (immediate hunt recommended). False positives: Legitimate tool using the same filename.

01/11 SIGMA php-fpm/php-cgi/apache spawning sh with curl, wget or /dev/tcpPHP2Shell: PAN-OS management interface exploitation, root via Fragnesia high T1190 T1505.003 T1059.004
tb-2026-11-01-php-fpm-php-cgi-apache-lan-ant-sh-avec-curl-wget-ou-dev-tcp.ymlDownload Sigma rule
title: Suspicious shell spawned by a PHP worker (PHP2Shell)
id: 62e0bd11-c170-44f7-8cfc-0629bdd8be32
status: experimental
description: Child shell of php-fpm, php-cgi, lsphp, frankenphp, httpd or apache2 with download, reverse shell or base64 decoding, PHP2Shell post-exploitation.
references:
  - https://www.elastic.co/es/security-labs/threat-command/php2shell-php-rce-detection
  - https://www.prophetsecurity.ai/blog/php2shell
author: Threat Brief (tlpclear.fr)
date: 2026-11-01
tags:
  - attack.initial-access
  - attack.t1190
  - attack.persistence
  - attack.t1505.003
  - cve.2026-109618
logsource:
  product: linux
  category: process_creation
detection:
  selection_parent:
    ParentImage|endswith:
      - '/php-fpm'
      - '/php-cgi'
      - '/lsphp'
      - '/frankenphp'
      - '/httpd'
      - '/apache2'
  selection_parent_fpm:
    ParentImage|contains: '/php-fpm'
  selection_shell:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
      - '/ksh'
  selection_cmd:
    CommandLine|contains:
      - 'curl '
      - 'wget '
      - '/dev/tcp/'
      - 'base64 -d'
      - '/etc/shadow'
  condition: (selection_parent or selection_parent_fpm) and selection_shell and selection_cmd
falsepositives:
  - PHP applications calling curl or wget via a shell (updates, imports)
level: high
sigma: parsed and converted (splunk, lucene) linux process_creation Licence DRL 1.1

PHP2Shell post-exploitation on Linux, including appliances: child shell of a PHP worker with download or reverse shell. False positives: PHP applications calling curl via a shell.

01/11 SIGMA LaunchAgent com.apple.sysmond.plist (macOS)Trojanised 'Claude Code' extension on Cursor Marketplace high T1543.001
tb-2026-11-01-launchagent-com-apple-sysmond-plist-macos.ymlDownload Sigma rule
title: LaunchAgent com.apple.sysmond created (trojanised Claude Code extension)
id: a691160f-78d6-4737-91e4-7f78091da15a
status: experimental
description: Creation of LaunchAgent com.apple.sysmond.plist, macOS persistence for the backdoor from the trojanised anthropic.claude-code extension on Cursor marketplace.
references:
  - https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cursor-extension-persistent-ssh-backdoor/
  - https://opensourcemalware.com/blog/trojanized-claude-code-extension-plants-persistent-ssh-backdoor
author: Threat Brief (tlpclear.fr)
date: 2026-11-01
tags:
  - attack.persistence
  - attack.t1543.001
logsource:
  product: macos
  category: file_event
detection:
  selection:
    TargetFilename|contains: '/Library/LaunchAgents/'
    TargetFilename|endswith: '/com.apple.sysmond.plist'
  condition: selection
falsepositives:
  - None known: Apple does not ship a user LaunchAgent with this name
level: high
sigma: parsed and converted (splunk, lucene) macos file_event Licence DRL 1.1

macOS backdoor persistence: fake Apple LaunchAgent dropped into a LaunchAgents folder. False positives: None known.

01/11 XQL authorized_keys modified from CursorTrojanised 'Claude Code' extension on Cursor Marketplace high T1098.004
tb-2026-11-01-authorized-keys-modifi-depuis-cursor.xqlXSIAM correlation rule
BIOC
Download XQL query
// Threat Brief 2026-11-01 · trojanised Claude Code extension (Cursor) · experimental
// Write to authorized_keys by a process chain originating from Cursor
config case_sensitive = false
| dataset = xdr_data
| filter event_type = ENUM.FILE and action_file_path contains "authorized_keys"
| filter causality_actor_process_image_name contains "cursor" or actor_process_command_line contains "anthropic.claude-code"
| fields _time, agent_hostname, actor_effective_username, causality_actor_process_image_name, actor_process_image_name, actor_process_command_line, action_file_path
| sort desc _time
xql: reviewed, not executed xdr_data Licence DRL 1.1

Loader adds svc-telemetry Ed25519 key to authorized_keys from the extension: writing to this file under Cursor is anomalous. False positives: Developer manually adding a key from Cursor's integrated terminal.

31/10 XQL Suspicious shell spawned by a PHP workerPHP2Shell (CVE-2026-109618/109619): root on PAN-OS firewalls high T1190 T1505.003 T1059.004
tb-2026-10-31-shell-suspect-enfant-d-un-worker-php.xqlXSIAM correlation rule
BIOC
Download XQL query
// Threat Brief 2026-10-31 · PHP2Shell (CVE-2026-109618/109619) · experimental
// Shell spawned by a PHP worker or web server with download, reverse shell, or decoding activity
config case_sensitive = false
| dataset = xdr_data
| filter event_type = ENUM.PROCESS and event_sub_type = ENUM.PROCESS_START
| filter actor_process_image_name in ("php-fpm", "php-cgi", "lsphp", "frankenphp", "httpd", "apache2") or actor_process_image_name ~= "^php-fpm"
| filter action_process_image_name in ("sh", "bash", "dash", "zsh", "ksh")
| filter action_process_image_command_line contains "curl" or action_process_image_command_line contains "wget" or action_process_image_command_line contains "/dev/tcp" or action_process_image_command_line contains "base64 -d" or action_process_image_command_line contains "/etc/shadow"
| fields _time, agent_hostname, actor_effective_username, actor_process_image_name, action_process_image_name, action_process_image_command_line
| sort desc _time
xql: reviewed, not executed xdr_data Licence DRL 1.1

PHP2Shell post-exploitation: shell child of php-fpm, php-cgi, lsphp, or Apache with curl, wget, /dev/tcp, or base64 -d (Elastic and Unit 42 logic). False positives: PHP applications legitimately calling curl via a shell ; mail() via sendmail.

31/10 XQL Traffic to 134.209.82.225 or ssh -R to localhost:22Trojanised "Claude Code" extension on the Cursor marketplace: persistent SSH backdoor high T1572 T1071
tb-2026-10-31-flux-vers-134-209-82-225-ou-ssh-r-vers-localhost-22.xqlXSIAM correlation rule
BIOC
Download XQL query
// Threat Brief 2026-10-31 · trojanised Claude Code extension (Cursor) · experimental
// Reverse SSH tunnel or traffic to 134.209.82.225 infrastructure (22, 8099)
config case_sensitive = false
| dataset = xdr_data
| filter (event_type = ENUM.NETWORK and action_remote_ip = "134.209.82.225") or (event_type = ENUM.PROCESS and event_sub_type = ENUM.PROCESS_START and action_process_image_name in ("ssh", "autossh", "ssh.exe") and action_process_image_command_line contains ":0:localhost:22")
| fields _time, agent_hostname, actor_effective_username, causality_actor_process_image_name, actor_process_image_name, action_process_image_command_line, action_remote_ip, action_remote_port
| sort desc _time
xql: reviewed, not executed xdr_data Licence DRL 1.1

Cortex XDR endpoints connecting to the backdoor tunnel IP (ports 22 and 8099) or launching the reverse SSH tunnel described by Microsoft. False positives: legitimate administrative reverse SSH tunnels.

31/10 YARA Trojanised extension.js in Claude Code extension (Cursor)Trojanised "Claude Code" extension on the Cursor marketplace: persistent SSH backdoor high T1195.002 T1098.004
tb-2026-10-31-extension-js-pi-g-de-l-extension-claude-code-cursor.yarDownload YARA rule
import "hash"

rule TB_20261031_ClaudeCode_Cursor_trojanized_extension
{
    meta:
        author = "Threat Brief (tlpclear.fr)"
        date = "2026-10-31"
        reference = "https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cursor-extension-persistent-ssh-backdoor/"
        description = "Trojanised extension.js from anthropic.claude-code 2.1.312/2.1.313 (Cursor marketplace): svc-telemetry key, tunnel to 134.209.82.225, LaunchAgent com.apple.sysmond"
        status = "experimental"
    strings:
        $k = "svc-telemetry" ascii
        $ip = "134.209.82.225" ascii
        $la = "com.apple.sysmond" ascii
        $t = "localhost:22" ascii
    condition:
        filesize < 20MB and ( hash.sha256(0, filesize) == "ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15" or ( $ip and 2 of ($k, $la, $t) ) )
}
yara: compiled JavaScript file (VS Code/Cursor extension) Licence DRL 1.1

Detects the loader prepended to extension.js (strings for svc-telemetry key, tunnel IP, LaunchAgent) or the published SHA256. False positives: copies of reports or IOCs referencing these strings.

31/10 SIGMA ssh/autossh -R *:0:localhost:22 (trojanised Claude Code extension)Trojanised "Claude Code" extension on the Cursor marketplace: persistent SSH backdoor high T1572 T1098.004
tb-2026-10-31-ssh-autossh-r-0-localhost-22-extension-claude-code-pi-g-e.ymlDownload Sigma rule
title: Reverse SSH tunnel from trojanised Claude Code extension (Cursor)
id: 9f2989bf-f6e0-46fd-90db-e78371716124
status: experimental
description: Execution of ssh or autossh opening a reverse tunnel to local port 22, backdoor pattern of the anthropic.claude-code 2.1.312/2.1.313 extension from the Cursor marketplace.
references:
  - https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cursor-extension-persistent-ssh-backdoor/
  - https://opensourcemalware.com/blog/trojanized-claude-code-extension-plants-persistent-ssh-backdoor
author: Threat Brief (tlpclear.fr)
date: 2026-10-31
tags:
  - attack.command-and-control
  - attack.t1572
  - attack.persistence
  - attack.t1098.004
logsource:
  category: process_creation
detection:
  selection_img:
    Image|endswith:
      - '/ssh'
      - '/autossh'
      - '\ssh.exe'
      - '\autossh.exe'
  selection_tunnel:
    CommandLine|contains|all:
      - '-R'
      - ':0:localhost:22'
  selection_ioc:
    CommandLine|contains: 'tunnel@134.209.82.225'
  condition: selection_img and (selection_tunnel or selection_ioc)
falsepositives:
  - Legitimate administrative or support reverse SSH tunnels exposing local sshd
level: high
sigma: parsed and converted (splunk, lucene) process_creation (Linux, macOS, Windows) Licence DRL 1.1

Detects the reverse SSH tunnel opened by the trojanised extension loader, or any ssh connection to tunnel@134.209.82.225. False positives: legitimate administrative reverse SSH tunnels.