Back to skill

Security audit

通达信UA修改,TcefWnd.dll修改

Security checks for vulnerabilities and agentic risk

Overview

This skill transparently patches a trading app browser DLL to impersonate a mobile browser, but its bypass-focused purpose and broad binary-writing script require careful review.

Install only if you are authorized to modify the TongdaXin installation and understand that changing a trading application's DLL may break the application and may violate website rules when used to bypass access checks. Prefer dry-run first, confirm the exact TcefWnd.dll path, close TongdaXin before patching, and keep a verified backup for restore.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/patch_ua.py:103
Finding

Unrestricted and Non-Atomic Modification of User-Supplied Files

Content
View full analysis
original_length: return (False, f"新 UA 太长 ({len(new_ua_bytes)} > {original_length}),请缩短") if dry_run: return (True, f"预览模式 - 原始 UA: {original_ua}\n新 UA: {new_ua}") # 创建备份 backup_path = dll_path + ".backup" if not os.path.exists(backup_path): shutil.copy2(dll_path, backup_path) # 修改数据 for i, byte in enumerate(new_ua_bytes): data[start_pos + i] = byte # 写回文件 with open(dll_path, 'wb') as f: f.write(data) ``` The command-line path is accepted without target validation: ```python parser.add_argument('--path', help='指定 DLL 文件路径') ``` ```python if args.path: dll_path = args.path ``` ### Technical Analysis The `--path` argument is used directly as the file to read, back up, truncate, and rewrite. The script does not verify that the resolved path: - Is named `TcefWnd.dll`. - Belongs to a discovered TongdaXin installation. - Is a regular file rather than a symbolic link or another special file. - Has a valid Portable Executable header. - Is the expected TongdaXin browser component. - Falls below a reasonable maximum file size. Consequently, any file accessible under the caller's permissions can become a patch targe ...[truncated 2498 chars]
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill instructs users to run a script that modifies a DLL and creates backups, which is a file-write capability, but the skill metadata does not declare any tool scope such as permissions or allowed-tools. This weakens containment and reviewability because a file-mutating skill can be invoked without explicit capability disclosure, increasing the chance of unintended or unauthorized system changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The description explicitly frames the skill as a way to bypass website restrictions by altering the embedded browser's User-Agent. That enables deception of remote services and may violate site access controls or terms, making the skill riskier than a neutral compatibility tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The usage scenarios explicitly list bypassing browser/version detection and access restrictions as intended outcomes. In context, this is not incidental wording; it operationalizes evasion behavior and encourages modification of a binary component to defeat remote checks.

Content

No source excerpt is available for this finding.