Back to skill

Security audit

动环综合网管交互式登录

Security checks for vulnerabilities and agentic risk

Overview

This skill appears intended to automate an internal monitoring-platform login, but it handles passwords and session cookies in ways that could expose them.

Review before installing. Do not use this with real credentials unless TLS verification is fixed, any example credential is confirmed rotated or replaced, dependencies are pinned, and password/session files are protected and cleaned up. If used at all, run it only in a private trusted environment with a dedicated account and restrict the cookie file permissions.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/donguan_login.py:27
Finding

TLS certificate verification is disabled for authentication traffic

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/donguan_login.py:58
Finding

Plaintext credentials and reusable session secrets persist in insecure files

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:34
Finding

Documentation contains a realistic plaintext username and password

Content
View full analysis
/scripts/donguan_login.py \ --username 05310480 \ --password 'XZ$ua98E#dYO' \ --cookie-file dh_session_cookie.txt ``` ```bash python /scripts/donguan_login.py \ --base-url https://172.20.251.9:30666 \ --username 05310480 \ --password 'XZ$ua98E#dYO' \ --cookie-file /path/to/dh_session_cookie.txt ``` ### Technical Analysis The documentation includes the same concrete-looking username and password in multiple executable examples rather than using unmistakable placeholders. The audit cannot establish whether the credential is currently valid, but publishing a potentially genuine credential creates an avoidable unauthorized-access risk and may expose reused credentials. The documented interface also encourages users to provide passwords as command-line arguments. Depending on the environment, command-line arguments can be retained in shell history, terminal logs, process accounting, diagnostic output, or process listings available to other local users. Neither embedding credentials nor accepting them through process arguments is necessary for the declared interactive login function. ### Attack Path 1. An attacker obtains the Skill package or reads its documentation. 2. The attacker extracts the documented username and password. 3. If the credential is valid or reused, the attacker attempts authentication against the documented endpoint or another service associated with the account. 4. Separately, a local attacker can monitor process arguments or inspect shell history after a user follows the documented command. 5. The local attacker recovers the user's supplied password and uses it in a later login attempt. SMS authentication may prevent immediate access in some cases, but password disclosure still comp ...[truncated 511 chars]
Remediation
View remediation
` and ``. - Remove the `--password` command-line argument or make it optional. - Prompt for the password securely with Python's `getpass.getpass()` when it is not supplied through an approved secret source. - Support protected secret stores or carefully controlled standard input for automation. - Add documentation warning users not to place passwords in shell history, scripts, logs, or shared configuration. - Review repository history and distributed packages for earlier copies of the credential. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:25
Finding

Installation instructions use an unpinned third-party dependency

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

Using curl with -k disables TLS certificate validation, allowing man-in-the-middle interception or tampering with the login flow. In this skill, that could expose usernames, encrypted-password exchanges, CAPTCHA/SMS workflow data, and especially the resulting session cookie, enabling account compromise even on an internal network.

Content

Scanner excerpt · SKILL.md (reported line 95)May include surrounding context.

md
- Cookie 写入文件后,监控脚本 `acquire_session()` 会优先读取该文件,实现定时任务全自动运行
- 密码以明文作为参数传入,请确保执行环境安全(不要在共享终端暴露命令历史)
- ddddocr 对 `?` 常误识为 `9`、`×` 误识为 `x`,脚本已做算术后处理,答案通常正确,但建议用户看 `_captcha.png` 图片二次确认
- 自签名证书使用 `curl -k` 跳过校验,仅限内网可信环境使用

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/donguan_login.py (reported line 27)May include surrounding context.

python
DEFAULT_BASE = 'https://172.20.251.9:30666'


# ===== curl 封装 =====
def _curl_get(url, CJ):
    r = subprocess.run(
        ['curl', '-k', '-s', '--connect-timeout', '15', '-b', CJ, '-c', CJ, url],

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Disabling HTTPS certificate verification without any prominent user warning is especially dangerous in a login automation tool because users may assume transport security is intact while entering credentials and 2FA codes. In this context, the tool handles authentication bootstrapping and cookie capture, so MITM exposure has direct account-compromise implications.

Content

No source excerpt is available for this finding.

eval() call detected

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

Direct eval() call evaluates arbitrary expressions. This can be exploited to execute malicious code or exfiltrate data.

Content

Scanner excerpt · scripts/donguan_login.py (reported line 98)May include surrounding context.

python
d1, op, d2, ans = m.groups()
    op_norm = '*' if op in ('x', 'X', '*', '×') else op
    try:
        result = str(int(eval(f'{d1} {op_norm} {d2}')))
    except Exception:
        result = None
    return result, raw

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises shell execution and file-writing behavior but does not declare any explicit tool scope or permissions boundaries. This weakens least-privilege controls and can cause an agent to invoke powerful capabilities unexpectedly, especially in a login workflow that handles credentials, cookies, and local files.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger phrases are broad enough that an agent may activate this login skill in loosely related contexts, causing unnecessary credential handling or network interaction. In a skill that prompts for passwords, sends SMS codes, and stores session cookies, accidental invocation expands the chance of secret exposure or unintended authentication attempts.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

This curl invocation disables TLS certificate verification via '-k', allowing a machine-in-the-middle attacker to intercept or modify authentication traffic, including captcha, public key material, and session cookies. Although subprocess is called safely with an argument list rather than a shell, the transport-layer downgrade is a real security weakness in a login tool handling credentials.

Content

Scanner excerpt · scripts/donguan_login.py (reported line 29)May include surrounding context.

python
# ===== curl 封装 =====
def _curl_get(url, CJ):
    r = subprocess.run(
        ['curl', '-k', '-s', '--connect-timeout', '15', '-b', CJ, '-c', CJ, url],
        capture_output=True, timeout=30)
    return r.stdout

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

This POST helper also uses curl with '-k', so login credentials, RSA public key retrieval, and 2FA requests occur without server identity validation. An active attacker could impersonate the server, supply a malicious public key, capture the encrypted password for offline use, or steal the resulting session.

Content

Scanner excerpt · scripts/donguan_login.py (reported line 37)May include surrounding context.

python
def _curl_post(url, data, CJ):
    body = json.dumps(data, ensure_ascii=False)
    r = subprocess.run(
        ['curl', '-k', '-s', '--connect-timeout', '15', '-b', CJ, '-c', CJ,
         '-X', 'POST', url, '-H', 'Content-Type: application/json', '-d', body],
        capture_output=True, encoding='utf-8', errors='replace', timeout=30)

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

The binary fetch helper retrieves captcha images over HTTPS with certificate verification disabled. In this login context, a man-in-the-middle can tamper with the captcha or session establishment flow and facilitate broader credential/session compromise.

Content

Scanner excerpt · scripts/donguan_login.py (reported line 45)May include surrounding context.

python
def _curl_bin(url, CJ):
    r = subprocess.run(
        ['curl', '-k', '-s', '--connect-timeout', '15', '-b', CJ, '-c', CJ, url],
        capture_output=True, timeout=30)
    return r.stdout or b''

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script writes the plaintext password to '_pwd.txt' during RSA encryption and later saves session cookie material to disk for reuse. On shared hosts, insecure directories, or systems with backups and endpoint monitoring, these artifacts can expose credentials or reusable authenticated sessions to other users or processes.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
89% confidence
Finding

The openssl subprocess itself is not shell-injection-prone because arguments are passed as a list, but the function writes the plaintext password and downloaded public key to predictable files in the working directory before encryption. That creates local credential exposure risks through file-system access, backups, or multi-user environments.

Content

Scanner excerpt · scripts/donguan_login.py (reported line 60)May include surrounding context.

python
pwd_path = os.path.join(workdir, '_pwd.txt')
    with open(pwd_path, 'wb') as f:
        f.write(plaintext.encode('utf-8'))
    enc = subprocess.run([
        'openssl', 'pkeyutl', '-encrypt', '-pubin', '-inkey', pub_path,
        '-pkeyopt', 'rsa_padding_mode:oaep',
        '-pkeyopt', 'rsa_oaep_md:sha256',

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The initial session-establishing curl command also uses '-k', so the very first cookie exchange can be intercepted or spoofed by an active network attacker. Because this script ultimately persists session material for reuse, compromise at session setup can directly lead to account hijacking.

Content

Scanner excerpt · scripts/donguan_login.py (reported line 109)May include surrounding context.

python
CJ = os.path.join(workdir, '_login_cookies.txt')
    open(CJ, 'w').close()
    # 1. 建立会话
    subprocess.run(['curl', '-k', '-s', '--connect-timeout', '15', '-c', CJ, base + '/'],
                   capture_output=True, timeout=15)

    # 2. 下载验证码 + OCR

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/donguan_login.py:98