// sigma convert -t kusto -p microsoft_xdr, pack v1.1.0 (15 Nov 2026). NOT run against a live tenant.
// ===== claude_code_ext_2_1_312_cursor_folder.yml (-p microsoft_xdr)
DeviceFileEvents
| where FolderPath contains "/.cursor/extensions/anthropic.claude-code-2.1.312" or FolderPath contains "/.cursor-server/extensions/anthropic.claude-code-2.1.312" or FolderPath contains "\\.cursor\\extensions\\anthropic.claude-code-2.1.312" or FolderPath contains "\\.cursor-server\\extensions\\anthropic.claude-code-2.1.312"

// ===== claude_code_ext_authorized_keys_by_editor.yml (-p microsoft_xdr)
DeviceFileEvents
| where (FolderPath endswith "/.ssh/authorized_keys" or FolderPath endswith "\\.ssh\\authorized_keys" or FolderPath endswith "\\ssh\\administrators_authorized_keys") and (InitiatingProcessFolderPath endswith "\\Cursor.exe" or InitiatingProcessFolderPath endswith "\\Code.exe" or InitiatingProcessFolderPath endswith "\\Code - Insiders.exe" or InitiatingProcessFolderPath endswith "\\Windsurf.exe" or InitiatingProcessFolderPath endswith "\\node.exe" or InitiatingProcessFolderPath endswith "\\powershell.exe" or InitiatingProcessFolderPath endswith "\\cmd.exe" or InitiatingProcessFolderPath endswith "/Cursor" or InitiatingProcessFolderPath endswith "/Code Helper (Plugin)" or InitiatingProcessFolderPath endswith "/Cursor Helper (Plugin)" or InitiatingProcessFolderPath endswith "/node" or InitiatingProcessFolderPath endswith "/code" or InitiatingProcessFolderPath endswith "/cursor" or InitiatingProcessFolderPath endswith "/sh" or InitiatingProcessFolderPath endswith "/bash" or InitiatingProcessFolderPath endswith "/zsh")

// ===== claude_code_ext_linux_editor_persistence.yml (-p microsoft_xdr)
DeviceProcessEvents
| where ((InitiatingProcessFolderPath contains "/Cursor.app/" or InitiatingProcessFolderPath contains "/Visual Studio Code.app/" or InitiatingProcessFolderPath contains "/Visual Studio Code - Insiders.app/" or InitiatingProcessFolderPath contains "/Windsurf.app/" or InitiatingProcessFolderPath contains "/usr/share/code/" or InitiatingProcessFolderPath contains "/usr/share/cursor/" or InitiatingProcessFolderPath contains "/opt/Cursor/" or InitiatingProcessFolderPath contains "/opt/cursor/" or InitiatingProcessFolderPath contains "/.mount_Cursor") or InitiatingProcessCommandLine contains "extensionHost") and ((FolderPath endswith "/launchctl" and (ProcessCommandLine contains "load" or ProcessCommandLine contains "bootstrap" or ProcessCommandLine contains "com.apple.sysmond")) or FolderPath endswith "/crontab" or ProcessCommandLine contains "-setremotelogin on" or ((FolderPath endswith "/ssh" or FolderPath endswith "/autossh") and ProcessCommandLine contains " -R "))

// ===== claude_code_ext_macos_editor_persistence.yml (-p microsoft_xdr)
DeviceProcessEvents
| where ((InitiatingProcessFolderPath contains "/Cursor.app/" or InitiatingProcessFolderPath contains "/Visual Studio Code.app/" or InitiatingProcessFolderPath contains "/Visual Studio Code - Insiders.app/" or InitiatingProcessFolderPath contains "/Windsurf.app/" or InitiatingProcessFolderPath contains "/usr/share/code/" or InitiatingProcessFolderPath contains "/usr/share/cursor/" or InitiatingProcessFolderPath contains "/opt/Cursor/" or InitiatingProcessFolderPath contains "/opt/cursor/" or InitiatingProcessFolderPath contains "/.mount_Cursor") or InitiatingProcessCommandLine contains "extensionHost") and ((FolderPath endswith "/launchctl" and (ProcessCommandLine contains "load" or ProcessCommandLine contains "bootstrap" or ProcessCommandLine contains "com.apple.sysmond")) or FolderPath endswith "/crontab" or ProcessCommandLine contains "-setremotelogin on" or ((FolderPath endswith "/ssh" or FolderPath endswith "/autossh") and ProcessCommandLine contains " -R "))

// ===== claude_code_ext_malicious_version_folder.yml (-p microsoft_xdr)
DeviceFileEvents
| where FolderPath contains "/anthropic.claude-code-2.1.313" or FolderPath contains "\\anthropic.claude-code-2.1.313"

// ===== claude_code_ext_network_attacker_ip.yml (-p microsoft_xdr)
DeviceNetworkEvents
| where RemoteIP =~ "134.209.82.225"

// ===== claude_code_ext_payload_files.yml (-p microsoft_xdr)
DeviceFileEvents
| where (FolderPath endswith "/.config/.smt" or FolderPath endswith "/.config/.smtk" or FolderPath endswith "\\.config\\smt.cmd" or FolderPath endswith "\\.config\\smtk" or FolderPath endswith "/Library/LaunchAgents/com.apple.sysmond.plist" or FolderPath endswith "\\Start Menu\\Programs\\Startup\\sysmon.cmd") or FolderPath matches regex "[/\\\\]\\.stk_[0-9a-f]{10}$"

// ===== claude_code_ext_proxy_beacon.yml (-p microsoft_xdr)
// NOT CONVERTED: this pipeline has no table or field mapping for the rule. Use the matching KQL hunt in kql/ instead.

// ===== claude_code_ext_smt_script_execution.yml (-p microsoft_xdr)
DeviceProcessEvents
| where ProcessCommandLine matches regex "[/\\\\]\\.config[/\\\\]\\.smt(\\s|\"|$)" or (ProcessCommandLine contains "\\.config\\smt.cmd" or ProcessCommandLine contains "\\Start Menu\\Programs\\Startup\\sysmon.cmd")

// ===== claude_code_ext_ssh_reverse_tunnel.yml (-p microsoft_xdr)
DeviceProcessEvents
| where (FolderPath endswith "/ssh" or FolderPath endswith "\\ssh.exe" or FolderPath endswith "/autossh" or FolderPath endswith "\\autossh.exe") and ((ProcessCommandLine contains "tunnel@134.209.82.225" or ProcessCommandLine contains "134.209.82.225") or (ProcessCommandLine contains " -R " and ProcessCommandLine matches regex "[*:]0:localhost:22") or (ProcessCommandLine contains " -R " and ProcessCommandLine contains "StrictHostKeyChecking=no" and ProcessCommandLine contains "UserKnownHostsFile=/dev/null" and ProcessCommandLine contains "ExitOnForwardFailure=yes") or ProcessCommandLine matches regex "\\.stk_[0-9a-f]{10}|\\.config[/\\\\]\\.?smtk")

// ===== claude_code_ext_windows_editor_persistence.yml (-p microsoft_xdr)
DeviceProcessEvents
| where ((InitiatingProcessFolderPath endswith "\\Cursor.exe" or InitiatingProcessFolderPath endswith "\\Code.exe" or InitiatingProcessFolderPath endswith "\\Code - Insiders.exe" or InitiatingProcessFolderPath endswith "\\Windsurf.exe" or InitiatingProcessFolderPath endswith "\\node.exe") and ((FolderPath endswith "\\schtasks.exe" and ProcessCommandLine contains "/create") or (ProcessCommandLine contains "Add-WindowsCapability" and ProcessCommandLine contains "OpenSSH.Server") or (ProcessCommandLine contains "Set-Service sshd" or ProcessCommandLine contains "Set-Service -Name sshd" or ProcessCommandLine contains "Start-Service sshd" or ProcessCommandLine contains "sc config sshd" or ProcessCommandLine contains "sc.exe config sshd" or ProcessCommandLine contains "net start sshd") or (FolderPath endswith "\\ssh.exe" and ProcessCommandLine contains " -R "))) or (FolderPath endswith "\\schtasks.exe" and (ProcessCommandLine contains "/create" and ProcessCommandLine contains "SysMon") and (ProcessCommandLine contains "smt.cmd" or ProcessCommandLine contains ".config"))

