Back to skill

Security audit

Wechat Db Decrypt

Security checks for vulnerabilities and agentic risk

Overview

This skill is for WeChat database decryption and message mining, but it asks users to run unverified tools, extract keys from a live WeChat process, and persist private chat-derived data without adequate safeguards.

Review carefully before installing. Only use this with WeChat data you own or are explicitly authorized to process, avoid running the unverified external executable, and do not store chat-derived results in plaintext files or persistent agent memory without a clear retention and consent plan.

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

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:153
Finding

Unverified Remote Executable Used to Extract WeChat Cryptographic Keys

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 153-156
Vulnerability Type: Remote payload retrieval and insecure dependency
Risk Level: Critical

Vulnerable Skill Instructions

text
Option A: Download WeChatMsg.exe
1. https://memotrace.lc044.love/ or a Quark cloud-drive link
2. Download the compiled executable and run it directly
3. It automatically locates the WeChat process, extracts the key, and decrypts the database

The excerpt is an English rendering of the instructions at the specified source lines.

Technical Analysis

The Skill instructs users to download and directly execute a precompiled Windows executable from a non-standard website or an unspecified file-sharing link. It provides no pinned version, cryptographic digest, trusted code-signing requirement, reproducible build process, or other integrity control.

This creates a remote payload execution channel: the content hosted at the URL can change after the Skill package has been reviewed. The downloaded program is especially sensitive because it is expected to attach to a logged-in WeChat process, read process memory, extract cryptographic material, and access private message databases.

The absence of provenance and integrity verification also creates a supply-chain risk. Compromise of the website, cloud-drive account, DNS path, distribution file, or upstream executable could cause users to run attacker-controlled code.

Attack Path

  1. An attacker compromises or replaces the executable distributed through the referenced website or cloud-drive link.
  2. A user follows the Skill instructions and downloads the mutable executable.
  3. The user runs it directly without verifying its signature or cryptographic digest.
  4. The executable runs with the user's privileges and attaches to the logged-in WeChat process.
  5. The malicious payload reads WeChat memory, cryptographic keys, account data, and decrypted conversations.

...[truncated 739 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the instruction to download and directly execute an externally hosted binary.
  2. Restrict the Skill to databases that the user has already exported and explicitly supplied.
  3. If an external utility is indispensable, reference a specific official release from a verifiable publisher.
  4. Pin the exact release version and publish its SHA-256 digest in the Skill.
  5. Require verification of both the digest and a trusted Authenticode signature before execution.
  6. Prefer reproducible builds from reviewed source code over opaque precompiled binaries.
  7. Run the utility in an isolated virtual machine or sandbox with network access disabled and only the required database directory mounted.
  8. Clearly disclose that the utility can read process memory and cryptographic keys, and obtain explicit authorization before use.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:174
Finding

Process-Memory Scanning and Database-Key Extraction Exceed Least-Privilege Requirements

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 174-178
Vulnerability Type: Unauthorized process access and cryptographic-key extraction
Risk Level: High

Vulnerable Skill Instructions

text
Option C: Manual memory scanning
1. Attach pymem to WeChatAppEx.exe.
2. Search for high-entropy data near android/iphone strings.
3. Verify candidate keys with HMAC.
4. Refer to simple_key_scan.py or pymem_key_scan.py.

The excerpt is an English rendering of the instructions at the specified source lines. Related key-extraction behavior is also declared at SKILL.md:156.

Technical Analysis

The Skill is presented as a utility for reading already decrypted message databases, but its troubleshooting instructions expand the operational scope to attaching to another live process, scanning its memory, identifying high-entropy secrets, and validating candidate database keys.

Reading a user-supplied SQLite database does not require access to live WeChat process memory. Process attachment therefore crosses a least-privilege boundary and grants the scanning tool access to sensitive runtime state beyond the nominal message-search task. Depending on the process and platform configuration, the scan may expose authentication state, cryptographic material, private message fragments, account identifiers, and unrelated secrets present in memory.

Although this technique can have legitimate forensic uses when performed by an authorized account owner, the Skill does not implement an authorization check, scope restriction, consent gate, or technical control limiting what the memory scanner can inspect.

Attack Path

  1. The operator starts the workflow while WeChat is logged in.
  2. The operator or an invoked utility attaches to WeChatAppEx.exe.
  3. The scanner reads process-memory regions in segments.
  4. It searches around selected strings for high-entropy candidate material.
  5. Candidate keys are tested us ...[truncated 796 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove live process attachment and memory scanning from the default Skill workflow.
  2. Accept only previously decrypted databases that the user deliberately selects.
  3. If forensic key recovery must remain supported, place it in a separate, explicitly authorized workflow.
  4. Require confirmation that the operator owns the account or has documented permission to inspect it.
  5. Run memory analysis offline in an isolated environment with network access disabled.
  6. Limit access to the specific target process and avoid broad system-memory scans.
  7. Never log, print, or persist recovered keys.
  8. Clear key buffers and temporary decrypted artifacts after use.
  9. Document the exact access required and refuse execution if elevated privileges are unnecessary or authorization is uncertain.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/search_messages.py:9
Finding

Extracted Private Messages Are Automatically Written to Predictable Plaintext Files

Content
View full analysis

Vulnerability Details

File Location: scripts/search_messages.py, lines 9-14 and 68-90
Vulnerability Type: Plaintext storage of sensitive chat data
Risk Level: High

Vulnerable Code

python
LOG_FILE = r"wechat_db_log.txt"

def log(msg):
    print(msg)
    with open(LOG_FILE, "a", encoding="utf-8") as f:
        f.write(msg + "\n")
python
log(f"\nFound {len(results)} results:")
for r in results:
    log(f"\n[{r['time']}] {r['db']}/{r['table']}  '{r['keyword']}':")
    log(f"  {r['content']}")

with open("wechat_search_results.json", "w", encoding="utf-8") as f:
    json.dump(results, f, ensure_ascii=False, indent=2)
log("\nResults saved to wechat_search_results.json")

The displayed string literals are translated into English for report-language compliance; the file operations and data flow reproduce the source behavior at the identified lines.

The result objects populated at lines 55-62 include the database name, table name, matching keyword, timestamp, and up to 300 characters of message content.

Technical Analysis

Every message result is passed through log(), which prints it and appends it to wechat_db_log.txt. The complete result collection is also written to wechat_search_results.json. Both filenames are fixed relative paths, so their destination depends on the process's current working directory.

The script does not ask the user whether message content should be retained. It does not redact message bodies, apply encryption, set restrictive file permissions, verify that the destination is private, impose a retention period, or securely remove old output. Because the log is opened in append mode, sensitive results from multiple executions can accumulate indefinitely.

Predictable plaintext output can be indexed, synchronized, backed up, or read by other local processes. On shared systems, inherited directory permissions may expose the files to other users.

...[truncated 1194 chars]

Remediation
View remediation

Remediation Suggestions

  1. Make disk persistence opt-in and default to in-memory or console-only summaries.
  2. Do not print or log full message bodies by default; return counts or redacted excerpts.
  3. Require the user to select an explicit output path rather than using the current working directory.
  4. Create output files with owner-only permissions, such as mode 0600 where supported.
  5. Offer authenticated encryption for exported results and avoid storing encryption keys beside the output.
  6. Replace append-only logging with bounded, user-controlled retention.
  7. Warn before overwriting or appending to an existing file containing prior chat data.
  8. Provide a cleanup option for logs, JSON exports, temporary files, and cached results.
  9. Avoid including internal table identifiers unless they are necessary for the requested task.
  10. Document that console output may also be captured by terminal history or orchestration logs.

T02 · Agent Memory Poisoning

Warning
Location
knowledge/prog demanda94c.md:96
Finding

Chat-Derived Information Is Directed into Persistent Agent Memory

Content
View full analysis

Vulnerability Details

File Location: knowledge/prog demanda94c.md, lines 96-99
Vulnerability Type: Persistent memory contamination with sensitive derived data
Risk Level: Medium

Vulnerable Knowledge-File Instruction

text
Next steps:
- Import this analysis result into MEMORY.md.
- Develop an automated script that monitors new messages in the decrypted database,
  extracts keywords, and pushes requirements in real time.

The excerpt is an English rendering of the instruction at the specified source lines.

Technical Analysis

The bundled knowledge file contains analysis derived from a decrypted WeChat group database and then directs the agent to import that analysis into MEMORY.md. Persistent agent memory can survive the current task and affect later sessions.

This is not required to perform a one-time message search. It creates a cross-session retention path for private group identifiers, market intelligence, message-derived conclusions, and workflow directives. The instruction also proposes continuous monitoring of newly decrypted messages, expanding a static analysis task into ongoing collection.

The file does not require explicit consent before persistence, define a retention period, minimize identifiers, or separate factual user preferences from third-party chat-derived data. Consequently, later tasks may consume or expose information unrelated to their original purpose.

Attack Path

  1. The agent loads the bundled knowledge document.
  2. The document presents chat-derived analysis and a next-step instruction to update MEMORY.md.
  3. The agent follows the instruction and copies the analysis into persistent memory.
  4. The retained content survives beyond the original database-analysis task.
  5. A later session retrieves or uses the stored group information, business intelligence, or monitoring directive.
  6. The retained content may influence future decisions or be disclosed in ...[truncated 512 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the directive to copy the analysis into MEMORY.md.
  2. Treat decrypted chat content and derived analysis as task-scoped data.
  3. Require explicit, informed user consent before retaining any result across sessions.
  4. Store only necessary user preferences in long-term memory, not third-party message content or identifiers.
  5. Redact group IDs, personal identifiers, quotations, and commercially sensitive details before any approved retention.
  6. Apply a defined expiration period and provide a mechanism to inspect and delete retained data.
  7. Keep continuous monitoring disabled by default and require a separately reviewed, explicitly authorized configuration.
  8. Ensure knowledge documents cannot autonomously trigger writes to persistent agent state.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (11)

Ssd 3

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The guidance explicitly instructs searching group messages by keywords and exporting demand-related chat content for analysis, including use cases like requirement mining and intelligence collection. This directly facilitates bulk collection and secondary use of private communications, creating substantial privacy, compliance, and abuse risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

This section goes beyond reading already-decrypted local data and provides operational guidance for obtaining WeChat database keys from a live process via memory scanning and third-party tooling. That enables bypass of another application's data protections and materially facilitates unauthorized access to private communications.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation describes sensitive operations such as process attachment, memory scanning, and candidate-key validation without meaningful warnings about privacy, legality, or system integrity. In context, those steps are not abstract research discussion; they are actionable instructions that can be used to compromise protected user data.

Content

No source excerpt is available for this finding.

Ssd 4

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

These step-by-step instructions culminate in access to another application's protected message store by directing the operator to locate a live process, extract or validate keys, and decrypt databases. That is dangerous because it lowers the barrier to unauthorized acquisition of private messages and can be readily repurposed for surveillance or data theft.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document explicitly states it is derived from a decrypted WeChat message database and proceeds to analyze group activity without any indication of consent, lawful basis, minimization, or privacy controls. This is dangerous because it normalizes use of private communications data for profiling and commercial targeting, creating risk of unauthorized surveillance, privacy violations, and downstream misuse of sensitive personal information.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file proposes building an automated script to monitor newly decrypted chat messages, extract keywords, and push opportunities in real time, which operationalizes continuous surveillance of private communications. This is especially dangerous because it moves from passive analysis to scalable, ongoing monitoring for commercial exploitation, increasing privacy harm, abuse potential, and unauthorized data processing risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill claims decrypted databases are a prerequisite, but later includes concrete fallback steps to decrypt them by extracting keys from the running WeChat process. That contradiction broadens the skill from benign local analysis into guidance for defeating application protections, increasing the risk of misuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The stated use cases include competitive-intelligence collection and customer lead mining from chat data, which normalizes extraction of private communications for surveillance or commercial exploitation without opt-in. That context makes the skill more dangerous because it frames sensitive data access as an intelligence-gathering workflow rather than a personal backup task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script logs and later stores message search output to local files, which can expose sensitive chat content and metadata to other local users, backups, or forensic tools. Because the data being handled comes from decrypted WeChat databases, writing it in plaintext increases secondary exposure beyond the original database access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code enumerates decrypted WeChat message databases, searches message contents, and extracts matching chat text without any consent, authorization, or privacy safeguards in the script itself. In an agent skill context, this is more dangerous because it operationalizes bulk access to private communications and can easily be repurposed for surveillance or data harvesting.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

Natural-language strings in the docstring, logs, and default keyword set assume Chinese usage only, with no opt-in or alternate locale handling. This can violate language/locale policy where skills should not force a specific language without user choice unless clearly justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.