moodle-connector
MCP server and batch downloader contain hardcoded default password 'test-pass' that bypasses documented MOODLE_CRED_PASSWORD requirement, creating credential decryption attack vector.
为什么得出这个结论
2/4 个维度触发声明资源与推断能力基本一致。
提取到 1 个高危 IOC 或外联信号。
报告包含 6 步攻击链,另有 2 项高危或严重发现。
依赖结构存在,但暂未看到明显高危告警。
攻击链
初始入口 · SKILL.md:184
setup · moodle_connector.py:254
vulnerability · mcp_server.py:37
权限提升 · credentials.enc
最终危害 · moodle_connector.py:86
最终危害 · moodle_connector.py:186
风险分是怎么被拉高的
mcp_server.py:37 uses password='test-pass' instead of reading MOODLE_CRED_PASSWORD env var
batch_downloader.py:59 defaults to 'test-pass' for --password argument
SKILL.md mandates MOODLE_CRED_PASSWORD but implementation ignores it and uses default
decrypt_credentials() enables decryption of stored credentials if hardcoded password matches
Documentation shows password='encryption-password' in example code
最关键的证据
Hardcoded default password in MCP server bypasses security requirement
mcp_server.py hardcodes password='test-pass' when initializing MoodleConnector instead of reading the documented MOODLE_CRED_PASSWORD environment variable. If a user's encrypted credentials were stored using this default password, an attacker who obtains credentials.enc can decrypt it with the known default.
mcp_server.py:37 Hardcoded default password in batch downloader
batch_downloader.py defaults --password argument to 'test-pass'. While it checks for env var, the explicit default makes the system vulnerable if credentials were encrypted with this password.
batch_downloader.py:59 Documentation mandates MOODLE_CRED_PASSWORD but implementation ignores it
SKILL.md line 184 explicitly states 'REQUIRED: Set MOODLE_CRED_PASSWORD environment variable before starting Claude Code' and shows MOODLE_CRED_PASSWORD in claude_desktop_config.json example. However, mcp_server.py ignores this and uses hardcoded 'test-pass', creating a doc-to-code mismatch.
mcp_server.py:37 SKILL.md contains plaintext credential example
SKILL.md line 130 shows password='encryption-password' in the Python library usage example. While this appears to be documentation, it exposes what could be a commonly used password pattern.
SKILL.md:130 Username/password storage without explicit user consent
MicrosoftAuthenticator.store_credentials() saves username and password (encrypted) for future logins. While encrypted, users may not be aware credentials are being persisted to disk.
moodle_connector.py:260 声明能力 vs 实际能力
All network calls are to declared Moodle API endpoints only Writes to config.json, credentials.enc, cache/ - all documented mcp_server.py ignores MOODLE_CRED_PASSWORD env var (SKILL.md:184) No shell execution found No skill invocation found No clipboard access Playwright used for SSO flow - declared in SKILL.md features section No direct database access 可疑产物与外联
password='encryption-password' SKILL.md:130
https://mytimes.taylors.edu.my/... SKILL.md:69
https://your-idp.example.com SKILL.md:103
https://mytimes.taylors.edu.my SKILL.md:203
https://mytimes.taylors.edu.my/webservice/pluginfile.php/... SKILL.md:222
https://login.microsoftonline.com moodle_connector.py:143
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| requests | >=2.31.0 | pip | 否 | Version range specified, acceptable |
| cryptography | >=41.0.0 | pip | 否 | Version range specified, acceptable |
| playwright | >=1.40.0 | pip | 否 | Version range specified, acceptable |
| mcp | >=0.1.0 | pip | 否 | Version range specified, acceptable |
文件构成
moodle_connector.py SKILL.md mcp_server.py batch_downloader.py