T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:35- Finding
Unverified Mutable Executable Download and System-Wide Installation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent security-audit tool, but it needs Review because it asks users to install an unverified mutable scanner binary system-wide and automatically records sensitive host-scan details.
Review before installing. Only run it on systems and public IPs you are authorized to test, harden the nuclei installation with a pinned version and checksum/signature verification, and treat generated reports as sensitive because they may reveal exploitable host details.
SKILL.md:35Unverified Mutable Executable Download and System-Wide Installation
整体上,代码的主要目的与“自动化安全审计并生成 Markdown 报告”基本一致,没有出现明显无关或恶意的未声明能力;它还会访问外部服务 ifconfig.me 获取公网 IP,这可视为实现外网扫描的支持细节。然而,声明中的两个重要能力——cron 定时扫描和飞书推送——在代码中完全不存在,属于明显的描述过度。另有一些表述比实际能力更宽泛:所谓“12000+ CVE 漏洞检测”没有在代码层面得到保证,只是调用 nuclei 并在报告中写了一个固定模板数字;“内外网双扫”在实现上仅扫描 localhost 和本机公网 IP,且 nuclei 只对 http://target 运行,范围较受限。基于这些缺失和夸大,应判定描述与实际行为存在不匹配。
This is a true tool-parameter abuse issue because shell-mediated command execution is used as a generic wrapper for multiple security tools. In a security-audit skill, this is more dangerous because such tools often evolve to accept user-supplied targets, making the wrapper a natural injection point with broad system-level execution impact.
def run(cmd, timeout=120):
try:
r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
return r.stdout + r.stderr
except subprocess.TimeoutExpired:
return "[TIMEOUT]"
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
apture_output=True, text=True, timeout=timeout)
return r.stdout + r.stderr
except subprocess.TimeoutExpired:
return "[TIMEOUT]"
except Exception as e:
return f"[ERROR] {e}"
def get_external_ip():
out = run("curl -s ifconfig.me", timeout=10).strip()
return out if re.match(r'^\d+\.\d+\.\d+\.\d+$', out) else "unknown"
def scan_ports(target):
return run(f"nmap -sS -sV -T4 --top-ports 1000 -oN /dev/stdout {target}", timeout=300)
def scan_vuln(target):
return run(f"nmap --script vuln -T4 --top-ports 100 -oN /dev/stdout {target}", timeout=300)
def scan_nuclei(target):
return run(f"nuclei -u http://{target} -severity critical,high,medium -rate-limit 50 -silent 2>&1", timeout=600)
def scan_nuclei_external(ip):
if ip == "unknown":
return "跳过(无法获取外网IP)"
return run(f"nuclei -u http://{ip} -severity critical,high,medium -rate-limit 50 -silent 2>&1", timeout=600)
def scan_ssl(target, port=443):
return r
The skill advertises and instructs shell execution and report generation, but it does not declare an explicit tool scope such as allowed shell or file-write permissions. That weakens reviewability and policy enforcement, because a runner may permit broader command execution or filesystem access than users expect for a scanning skill that can touch network, system configuration, and local reports.
The manifest description and visible skill content are written entirely in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking environment. Under the language/locale policy rule, this is a natural-language locale constraint that lacks opt-in or justification.
The installation instructions fetch a release version from the GitHub API and download a binary from GitHub, then install it into /usr/local/bin without any checksum, signature, or pinned-version verification. This creates a supply-chain risk: if the download source, release metadata, or network path is compromised, a malicious binary could be installed and later executed with the user's privileges.
apt install -y nmap sslscan
# nuclei
curl -sL https://github.com/projectdiscovery/nuclei/releases/latest/download/nuclei_$(curl -s https://api.github.com/repos/projectdiscovery/nuclei/releases/latest | grep tag_name | cut -d'"' -f4 | tr -d v)_linux_amd64.zip -o /tmp/nuclei.zip
unzip /tmp/nuclei.zip -d /tmp && mv /tmp/nuclei /usr/local/bin/
nuclei -update-templates
The helper executes arbitrary shell commands with shell=True, which is unsafe because any variable interpolated into cmd can become shell metacharacter-controlled command injection. In this file, target/IP values are inserted into shell command strings, so future changes or externalized inputs could turn this into direct command execution.
def run(cmd, timeout=120):
try:
r = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=timeout)
return r.stdout + r.stderr
except subprocess.TimeoutExpired:
return "[TIMEOUT]"
The script makes external calls to ifconfig.me and performs nuclei scans against the discovered external IP without an explicit consent or warning flow. That can disclose host/network metadata off-device and may trigger unauthorized scanning of external-facing assets, which is sensitive in an agent skill context.
The generated Markdown report stores sensitive security data including open ports, vulnerabilities, firewall rules, listening services, SSH settings, package state, and recent login records in a predictable local path. If the workspace is shared, synced, or readable by other users/processes, this creates a high-value disclosure target for attackers.
The module docstring and all user-facing strings are in Chinese, indicating the skill is designed to operate in a fixed language. The policy for this audit requires flagging language/locale restrictions when the skill does not provide user opt-in or clearly justify the locale constraint.