T03 · Remote Payload Retrieval and Execution
- Location
remote_skill_installer.py:89- Finding
Arbitrary Remote Agent Instruction Installation
- Content
View full analysis
bool: """从远程 URL 安装 skill""" if not safe_name(agent_id) or not safe_name(name): print(f'❌ 错误:agent_id 或 skill 名称含非法字符') return False if not validate_url(source_url): print(f'❌ 错误:URL 不合法或指向内网地址') return False workspace = OCLAW_HOME / f'workspace-{agent_id}' / 'skills' / name workspace.mkdir(parents=True, exist_ok=True) skill_md = workspace / 'SKILL.md' print(f'⏳ 正在从 {source_url} 下载...') try: content = _download_file(source_url) except Exception as e: print(f'❌ 下载失败:{e}') return False if len(content.strip()) < 10: print(f'❌ 文件内容过短或为空') return False skill_md.write_text(content, encoding='utf-8') source_info = { 'skillName': name, 'sourceUrl': source_url, 'description': description, 'addedAt': now_iso(), 'lastUpdated': now_iso(), 'checksum': _compute_checksum(content), 'status': 'valid', } ``` ### Technical Analysis The `add` command accepts any URL that passes a limited URL check, downloads its content, and writes the result directly to an Agent's active `SKILL.md` location. It does not restrict downloads to approved publishers, pin content to an immutable revision, verify a publisher signature, compare against a trusted digest, scan the downloaded instructions, or require a separate approval step before activation. Although the downloaded artifact is Markdown rather than a native executable, `SKILL.md` controls Agent behavior. Installing attacker-controlled instructions into an active workspace therefore creates a remote instruction-payload channel. The effective payload can include requests to a ...[truncated 1474 chars]- Remediation
View remediation
