agent-p2p
Agent P2P skill contains hardcoded credentials, insecure remote deployment patterns, and supply chain vulnerabilities through unpinned dependencies and external GitHub code retrieval.
为什么得出这个结论
2/4 个维度触发发现 1 项声明之外的能力或越权行为。
提取到 18 个一般风险产物,需要结合上下文判断。
报告包含 5 步攻击链,另有 4 项高危或严重发现。
发现 10 项需要关注的依赖或供应链线索。
攻击链
delivery · install.py:105
delivery · scripts/deploy_portal.py:184
权限提升 · requirements.txt:1
权限提升 · auto_install.py:82
最终危害 · scripts/deploy_portal.py:262
风险分是怎么被拉高的
deploy_portal.py line 262 hardcodes htpasswd admin password 'AgentP2P2024' for Nginx admin protection
auto_install.py and deploy_portal.py SSH into VPS and execute arbitrary shell scripts, cloning from external GitHub
requirements.txt uses unpinned versions (e.g., 'fastapi>=0.100.0', 'paramiko>=3.3.0') enabling dependency hijacking
subprocess.Popen/run used throughout (install.py, auto_install.py, start.py) - only partially declared in SKILL.md
Deploy scripts clone from https://github.com/yananli199307-dev/AgentPortal-p2p-skill with no integrity verification
auto_install.py uses shell=True in subprocess.run calls, enabling shell injection
最关键的证据
Hardcoded default password for admin backend
The deploy_portal.py script creates an Nginx htpasswd file with hardcoded credentials: username 'admin', password 'AgentP2P2024'. While this is for the admin backend on a self-hosted VPS, it creates a backdoor if the user doesn't change the password.
scripts/deploy_portal.py:262 Remote code execution through SSH deployment
auto_install.py and deploy_portal.py use paramiko to SSH into user-provided VPS and execute arbitrary shell scripts. The scripts clone code from an external GitHub repository. This creates significant risk if the VPS credentials or the GitHub repo are compromised.
auto_install.py:82 Unpinned dependencies enable supply chain attacks
requirements.txt specifies dependencies without version pins (fastapi>=0.100.0, paramiko>=3.3.0, websocket-client>=1.6.0, etc.). This allows attackers to inject malicious code through version upgrades.
requirements.txt:1 External GitHub code pull without integrity verification
deploy_portal.py line 184 clones from 'https://github.com/yananli199307-dev/AgentPortal-p2p-skill.git' with no hash verification, no signed commits check, and no pinned commit/tag.
scripts/deploy_portal.py:184 Undeclared subprocess shell execution
install.py and auto_install.py use subprocess.run with shell=True and shell=True string commands. SKILL.md does not explicitly declare the use of subprocess for VPS management.
auto_install.py:82 Database access not declared in SKILL.md
The skill creates and manages a SQLite database at /opt/agent-p2p/data/portal.db on the VPS, and manages local state files. This is not declared in the SKILL.md capability declaration.
scripts/deploy_portal.py:340 SSH key access to ~/.ssh directory not explicitly declared
The skill accesses SSH private keys from ~/.ssh/ for VPS deployment. While SSH is declared, the specific path ~/.ssh/id_rsa (default) is not mentioned.
install.py:105 Silent dependency installation without user consent
SKILL.md metadata claims 'auto: true' for installation, meaning the skill auto-installs dependencies. While the openclaw metadata warns about this, the user is not prompted per-action as claimed.
SKILL.md:10 还有 2 项发现未展开显示
声明能力 vs 实际能力
SKILL.md metadata declares bins: [ssh]; deploy_portal.py uses paramiko SSH SKILL.md declares file writes to ~/.openclaw/gateway.env; confirmed in install.py line 180, start.py line 95 bridge.py POSTs to external URL; deploy_portal.py clones from external GitHub skill/bridge.py reads env vars; install.py writes to gateway.env No skill invocation found No clipboard access found No browser access found src/main.py and deploy_portal.py create/modify SQLite DB at /opt/agent-p2p/data/portal.db - not declared in SKILL.md 可疑产物与外联
https://agent.example.com CONFIG.md:73
https://your-domain.com CONFIG.md:87
http://127.0.0.1:18789 CONFIG.md:88
http://127.0.0.1:18789/hooks/wake CONFIG.md:146
https://your-domain.com/api/portal/info DEPLOY.md:277
https://your-domain.com/api/contacts README.md:98
https://friend-domain.com SKILL.md:100
https://your-domain.com/static/admin.html SKILL.md:143
https://your-portal.com client/configure.py:29
https://your-domain.com) client.py:12
http://127.0.0.1:18789\n install.py:405
http://127.0.0.1:8081 notify_server.py:77
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| fastapi | >=0.100.0 | pip | 否 | Version not pinned - supply chain risk |
| uvicorn | >=0.23.0 | pip | 否 | Version not pinned - supply chain risk |
| paramiko | >=3.3.0 | pip | 否 | Version not pinned - supply chain risk |
| websocket-client | >=1.6.0 | pip | 否 | Version not pinned - supply chain risk |
| requests | >=2.31.0 | pip | 否 | Version not pinned - supply chain risk |
| websockets | >=11.0 | pip | 否 | Version not pinned - supply chain risk |
| python-jose | >=3.3.0 | pip | 否 | Version not pinned - supply chain risk |
| python-multipart | >=0.0.6 | pip | 否 | Version not pinned - supply chain risk |
| psutil | * | pip | 否 | Version not pinned - supply chain risk |
| aiohttp | * | pip | 否 | Version not pinned - used in notify_server.py |
文件构成
scripts/deploy_portal.py install.py client.py auto_install.py SKILL.md setup.sh