Back to skill

Security audit

同花顺Level2数据接入

Security checks for vulnerabilities and agentic risk

Overview

Review recommended because the skill includes reverse-engineered market-data access that can read another app's memory, inspect local app data, and use unsafe generated code.

Install only after careful review. Do not run the memory-reading scripts as administrator, do not use packet capture or reverse engineering unless you are authorized to do so, avoid storing live Tushare tokens in the skill directory, and prefer official documented APIs or exported data. Treat generated reports as potentially simulated or incomplete rather than reliable financial advice.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (6)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
ths_memory_reader.py:75
Finding

Privileged Broad Process-Memory Scanning

Content
View full analysis
bool: """Open the process.""" self.handle = kernel32.OpenProcess( PROCESS_VM_READ | PROCESS_QUERY_INFORMATION, False, self.pid ) return self.handle is not None and self.handle != -1 ``` ```python def scan_memory(self, pattern: bytes, mask: str = None) -> List[int]: """Scan process memory for a pattern.""" results = [] address = 0 mbi = wintypes.MEMORY_BASIC_INFORMATION() mbi_size = ctypes.sizeof(mbi) while kernel32.VirtualQueryEx( self.handle, ctypes.c_void_p(address), ctypes.byref(mbi), mbi_size ) == mbi_size: if mbi.State == MEM_COMMIT and mbi.Protect in [ PAGE_READWRITE, PAGE_EXECUTE_READWRITE ]: try: data = self.read_bytes(mbi.BaseAddress, mbi.RegionSize) if data: offset = 0 while True: pos = data.find(pattern, offset) if pos == -1: break results.append(mbi.BaseAddress + pos) offset = pos + 1 except: pass address = mbi.BaseAddress + mbi.RegionSize if address >= 0x7FFFFFFF: break ``` The standalone scanner also targets a hardcoded PID: ```python PID = 21152 handle = kernel32.OpenProcess( PROCESS_VM_READ | PROCESS_QUERY_INFORMATION, False, PID ) if not handle or handle == -1: print("Failed to open process; run with administrator privileges.") sys.exit(1) ``` ### Technical Analysis The project opens another process with `PROCESS_VM_READ` and `PROCESS_QUERY_INFORM ...[truncated 1880 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
test_600276.py:44
Finding

Recursive Reconnaissance of User Configuration and Cache Data

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
analyze_protocol.py:189
Finding

Python Source-Code Injection Through XML-Based Client Generation

Content
View full analysis
str: """Get {p['business']} Operation: {p['operation']} """ params = {{'code': code, **kwargs}} return THSProtocol.build_request({msg_id}, **params) ''' ``` The resulting source replaces a Python module in the project: ```python client_code = analyzer.generate_client_code(protocols) code_file = Path(__file__).parent / "ths_protocol_generated.py" with open(code_file, 'w', encoding='utf-8') as f: f.write(client_code) ``` ### Technical Analysis The generator applies only two string replacements to `business` and performs no validation of `operation` or `msg_id`. XML-controlled values are inserted into: - A Python function ...[truncated 1408 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
ths_client.py:91
Finding

Unauthenticated Plaintext TCP Connections to Hardcoded Market Servers

Content
View full analysis
bool: """Connect to Tonghuashun servers.""" for host, port in self.SERVERS: try: print(f"Attempting connection to {host}:{port}...") self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.settimeout(10) self.socket.connect((host, port)) self.connected = True self._stop_event.clear() self._recv_thread = threading.Thread( target=self._recv_loop, daemon=True ) self._recv_thread.start() print(f"Connected to {host}:{port}") return True except Exception as e: print(f"Connection to {host}:{port} failed: {e}") if self.socket: self.socket.close() self.socket = None continue ``` ```python def _send_request( self, msg_id: int, params: Dict[str, Any], timeout: float = 5.0 ) -> Optional[bytes]: if not self.connected: raise ConnectionError("Not connected to server") request = self._build_request(msg_id, params) self.socket.send(request) try: response = self._response_queue.get(timeout=timeout) return response except queue.Empty: return None ``` ### Technical Analysis The client uses raw TCP sockets. It does not establish TLS, authenticate the remote endpoint, verify a certificate, or cryptographically validate returned market data. The fallback list includes bare IP addresses, wh ...[truncated 1234 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
ths_full_analysis.py:20
Finding

Plaintext Tushare API Token Storage in Project Configuration

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned and Integrity-Unverified Python Dependencies

Content
View full analysis
=1.0.0 pandas>=1.3.0 numpy>=1.21.0 ``` The installation documentation also recommends unconstrained installation: ```bash pip install akshare pandas numpy ``` ```bash pip install -r requirements.txt ``` ### Technical Analysis The dependency specifications use open-ended lower bounds and do not include upper bounds, exact versions, hashes, a lockfile, or a restricted package index. Consequently, installation can resolve to any future package version satisfying the minimum. Python packages and their transitive dependencies may execute code during build, installation, or import. A compromised future release, dependency takeover, malicious index mirror, or incompatible transitive update can therefore alter the effective code executed by the Skill after review. No confirmed malicious dependency or typosquatted package was identified in the supplied files. The vulnerability is the absence of reproducible and integrity-verified dependency management. ### Attack Path 1. An attacker compromises a permitted package or transitive dependency, or influences the package index used by the victim. 2. A malicious version is published while still satisfying the open-ended version constraint. 3. The user follows the documented `pip install` command. 4. Pip resolves and installs the malicious or compromised release. 5. Package code executes during installation, import, or later analysis with the user's privileges. ### Impact Assessment A compromised dependency can obtain the same filesystem, network, environment-variable, and process privileges as the Python interpreter. If the user follows the project's administrator recommendation for memory-related features, dependency code may execute with elevated privileges. The issue ...[truncated 93 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (156)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README explicitly recommends reading another process's memory, using reverse-engineering tools, and capturing protocol traffic to obtain paid market data. Those instructions materially expand the skill from normal market-data consumption into bypass-oriented access methods that can enable unauthorized data extraction, EULA violations, and abuse of a local system or third-party service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the provided chunk lacks any real external data access and mainly performs simulated analysis, the main harm is misrepresentation rather than active exploitation. However, in an agent skill ecosystem this still matters because misrepresentation can be used to obtain broader trust and permissions than warranted.

Content

No source excerpt is available for this finding.