Back to skill

Security audit

l4d2-server

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its L4D2 server-admin purpose, but it needs Review because it enables unrestricted RCON control and handles RCON secrets in ways that can leak them.

Install only if you administer the target L4D2 servers and understand that RCON grants live administrative control. Keep RCON off public networks, use a VPN or SSH tunnel, restrict firewall access, avoid putting passwords on the command line, lock config files to the owner, and manually confirm any command that changes maps, kicks/bans players, toggles cheats, or alters server state.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/rcon_cmd.py:137
Finding

RCON Password Exposed Through Command-Line Arguments

Content
View full analysis
``` ### Technical Analysis The RCON password is supplied through `argv`. Depending on the operating system and process-monitoring configuration, command-line arguments can be visible to other local users, administrators, monitoring agents, process accounting systems, diagnostic collectors, and CI/CD logs. If an operator types the documented command into an interactive shell, the complete command—including the plaintext password—may also be retained in shell history. Although the Python script does not print the password directly, reading it from `sys.argv[3]` causes the secret to cross multiple disclosure-prone interfaces before authentication occurs. ### Attack Path 1. An administrator invokes the script using the documented syntax and includes the RCON password in the command line. 2. The complete invocation is recorded in shell history, process telemetry, audit logs, or a process listing while the command is running. 3. A local user or service with access to one of those sources obtains the plaintext password. 4. The attacker connects to the configured game server's RCON port. 5. The attacker authenticates with the recovered password and executes any command permitted by the RCON service. ### Impact Assessment Successful exploitation exposes the server's RCON administrative credential. The attacker may execute privileged game-server commands, change maps and server settings, enable cheats, remove or ban players, disrupt active sessions, and invoke commands exposed by installed server pl ...[truncated 167 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:102
Finding

Plaintext RCON Configuration Is Updated Through an Insecure Predictable Temporary File

Content
View full analysis
/tmp/l4d2.json && \ mv /tmp/l4d2.json ~/.openclaw/workspace/config/l4d2-servers.json ``` The configuration described in `SKILL.md:19-27` stores the credential directly in the JSON file: ```json { "servers": { "alias": { "host": "192.168.1.100", "port": 27015, "rcon_password": "your_rcon_password" } } } ``` ### Technical Analysis The documented update procedure writes the complete configuration, including the plaintext RCON password, to the fixed shared path `/tmp/l4d2.json`. It does not set a restrictive `umask`, use an securely generated temporary filename, verify file ownership, or explicitly apply mode `0600`. On a multi-user system, a permissive process `umask` can cause the temporary file to be created with permissions that allow another user to read it. A predictable shared pathname also creates race and pre-creation risks. Depending on operating-system hardening and existing filesystem permissions, an attacker may attempt to pre-create or manipulate that path before the privileged user runs the command. The final `mv` also replaces the configuration with the temporary file's permissions. Consequently, even if the original configuration was protected, the replacement file may become more broadly readable. ### Attack Path 1. An administrator follows the documented `jq` command to add or modify a server. 2. The complete configuration, including every stored RCON password, is written to the predictable `/tmp/l4d2.json` path. 3. If the administrator's `umask` permits group or world acce ...[truncated 1020 chars]
Remediation
View remediation
"$tmp" && chmod 600 "$tmp" && mv -- "$tmp" "$config" ``` - Ensure cleanup traps remove the temporary file if processing fails. - Rotate credentials if the configuration was previously written with permissive permissions. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/rcon_cmd.py:67
Finding

RCON Credentials and Administrative Commands Are Transmitted Without Transport Encryption

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

代码行为与描述部分重合:它确实执行 A2S 协议查询并解析服务器状态,且适用于 L4D2 等 Source 引擎服务器。但声明中的另外两项核心能力——多服务器信息管理、RCON 命令执行——在该代码片段中完全没有体现。代码也没有任何服务器持久化存储、别名管理、配置管理或 RCON 网络交互逻辑。因此,当前代码只覆盖了声明中的一部分功能,且实际更像是单一的 A2S 查询工具,而不是完整的“L4D2 服务器管理助手”。

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises direct RCON execution and lists destructive or administrative commands like map changes, kicks, bans, cheat toggles, and entity deletion, but does not prominently warn about their operational impact or require safeguards. In the context of a remote game-server administration skill, insufficient warning and lack of explicit safety controls can enable accidental or unauthorized disruptive actions against live servers.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

该 markdown 文件适用 SQP-1。L003 中将“L4D2、求生之路、服务器状态、rcon、a2s 查询”统称为触发词,其中“服务器状态”表述较泛,而整组触发词也未说明必须组合出现、适用上下文或排除条件,容易与一般聊天或其他服务器排障场景重叠。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation states that RCON status output may include player IP addresses and related connection details, but it does not frame this as sensitive data exposure or advise minimization. In this skill's context, querying and displaying player network metadata can leak personal or semi-sensitive information to operators or downstream logs, increasing privacy and compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file’s docstring and CLI usage/help text are presented only in Chinese, which imposes a specific language on users without any opt-in or alternative. The policy explicitly calls for flagging language or locale constraints when they are forced rather than optional or justified as region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This JSON file is a manifest/config-type file, so vague-trigger review applies. The entry is broadly labeled as an example configuration without any narrowing metadata or constraints describing when it should be used versus ignored, which can contribute to ambiguous activation or unintended use in systems that ingest config examples directly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description field is written in Chinese, and the file provides no indication that language selection is optional or that the configuration is intentionally region-specific. Under the language/locale policy, hardcoding a specific language without user opt-in or justification can be a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring and user-facing usage text are written only in Chinese, and later help/error output is also Chinese-only. For a general-purpose utility, this imposes a language choice on users without opt-in or a documented region/language limitation.

Content

No source excerpt is available for this finding.