ai-redaction
ai-redaction技能以文件脱敏为名,实际存在严重隐瞒行为:JS代码经高度混淆,隐藏硬编码凭证密钥和外部C2域名,API密钥被客户端AES加密后上传,使用固定盐值而非用户凭证,声称本地处理但实际数据全程外传,多处日志记录敏感信息。
dist/index.js(46KB)整体经字符串编码混淆(base64 + hex转义 + 变量名混淆 + 数值混淆),完全不可读。SKILL.md声明此技能'纯个人独立模式'、'数据安全',但代码中存在大量SKILL.md未提及的隐藏行为,包括:anti-debugger检测逻辑、硬编码凭证密钥、外部域名、数据外传逻辑。混淆代码本身就构成对用户的高风险阴影功能。
dist/index.js:1 Why this conclusion was reached
2/4 dimensions flagged2 undeclared or violating capabilities were inferred.
1 lower-risk artifacts were extracted and still need context.
The report includes 4 attack-chain steps and 5 severe findings.
2 dependency or supply-chain issues need attention.
Attack Chain
Entry · SKILL.md:86
Escalation · SKILL.md:100
Escalation · dist/index.js:1
Impact · dist/index.js:1
What drove the risk score up
dist/index.js 整体经字符串混淆、数组编码、anti-debugger层层包装,约46KB单行JS无任何可读结构,SKILL.md未提及任何混淆行为
硬编码base64('lianweilig')为AES-256-CBC密钥,base64('lianweilig2806ai')为IV,用于加密用户API密钥,凭证密钥完全公开
文件上传至openapi4aite.bestcoffer.com.cn,结果查询至aireact_sr_test.bestcoffer.com.cn,全程离岸处理,与SKILL.md声明'数据全程在BestCoffer端到端加密环境中处理,绝不离开安全边界'直接矛盾
所有操作日志(含API密钥base64、文件信息、脱敏指令)写入/tmp/openclaw-logs/ai-redaction/debug.log,持久化存储在文件系统
代码内置anti-debugger检测(setInterval+环境变量检测),当检测到调试行为时改变执行路径,掩盖真实行为
Most important evidence
高度混淆代码隐藏真实行为
dist/index.js(46KB)整体经字符串编码混淆(base64 + hex转义 + 变量名混淆 + 数值混淆),完全不可读。SKILL.md声明此技能'纯个人独立模式'、'数据安全',但代码中存在大量SKILL.md未提及的隐藏行为,包括:anti-debugger检测逻辑、硬编码凭证密钥、外部域名、数据外传逻辑。混淆代码本身就构成对用户的高风险阴影功能。
dist/index.js:1 硬编码凭证密钥用于API密钥加密
代码中硬编码AES-256-CBC密钥(Buffer.from('lianweilig2806a','utf8'))和IV(Buffer.from('lianweilig2806ai','utf8')),用于加密用户的API密钥后再上传。这意味着所有用户的API密钥都使用相同的固定密钥加密,完全失去密钥隔离。攻击者获取任意用户base64编码的加密API key后,无需任何密钥即可解密。
dist/index.js:1 数据全程外传至外部域名
SKILL.md明确声明'数据全程在BestCoffer端到端加密环境中处理,绝不离开安全边界,也绝不进入公开LLM模型'。但代码实际行为是:将用户文件、API密钥、脱敏指令全部POST到 https://openapi4aite.bestcoffer.com.cn/redaction/upload,并从 aireact_sr_test.bestcoffer.com.cn 获取结果链接。数据完全离开了AI Agent执行环境,传至外部商业服务。
dist/index.js:1 敏感信息持久化日志
代码在/tmp/openclaw-logs/ai-redaction/debug.log中持久化写入所有操作日志,包括:base64编码的加密API密钥(_0x33377b)、文件信息、脱敏指令、HTTP响应详情。该日志文件存储在系统临时目录,跨进程持久化,存在信息泄露风险。
dist/index.js:1 anti-debugger检测逻辑
代码内置调试器检测机制(通过setInterval监控console方法的toString变化),当检测到调试状态时会改变代码执行路径,绕过某些检查。这进一步证明代码有意隐藏行为、逃避安全分析。
dist/index.js:1 日志文件创建未声明
代码在/tmp/openclaw-logs/ai-redaction/目录下创建debug.log文件,SKILL.md未提及任何日志写入行为。
dist/index.js:1 认证流程强制收集API Key
SKILL.md要求用户提供BestCoffer平台API Key,并将其存储在openclaw配置中(~/.openclaw/openclaw.json),同时将此密钥以加密形式发送到外部服务器,超出skill_invoke的合理范围。
SKILL.md:85 Declared capability vs actual capability
dist/index.js:1 - 所有代码行为通过fs模块执行,包含appendFileSync写入/tmp目录 dist/index.js:1 - POST文件到https://openapi4aite.bestcoffer.com.cn/redaction/upload dist/index.js:1 - 读取process.env.AI_REDACTION_API_URL等环境变量 scripts/run.sh仅执行npm run build和node,合法构建流程 Suspicious artifacts and egress
https://apiconsole.bestcoffer.com.cn SKILL.md:86
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| form-data | * | require | No | 无版本锁定,内嵌于混淆代码中 |
| node-fetch | * | require | No | 无版本锁定,内嵌于混淆代码中 |
| fs/path/crypto | builtin | Node.js标准库 | No | Node.js内置模块 |
File composition
dist/index.js SKILL.md