Back to skill

Security audit

MiaoQIDS 量子防火墙-会做pcap文件分析的猫娘

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent PCAP/IDS analyzer, but it needs review because it sends sensitive network metadata to external services by default and includes unsafe model/cloud credential handling.

Review before installing. Use --no-ip-query for sensitive PCAPs unless you are comfortable sending observed public IPs to ip-api.com. Treat any downloaded .pth or .pkl model files as executable-risk artifacts and only use them from a trusted, verified source. Do not expose the HTTP server beyond localhost, and the publisher should remove and rotate the embedded quantum-cloud token.

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
QNNmodel.py:198
Finding

Hardcoded Quantum Cloud Credential

Content
View full analysis

Vulnerability Details

File Location: QNNmodel.py:198
Vulnerability Type: Hardcoded service credential
Risk Level: Medium

Vulnerable Code

python
service=QCloudService("eca8012171babbc37d854e0f61d8240bbb2ed4d7801d5738c38b613e2d09cd073062576676394d74426c34786a4f4757")

Technical Analysis

QNN_MTD.forwardQ() embeds a quantum-cloud service credential directly in source code. Every party with access to the Skill package can recover the credential without executing the project.

Although the normal HTTP analysis path invokes forward() rather than forwardQ(), the secret remains exposed and forwardQ() will use it when called. Source-level exposure allows reuse independently of the Skill and therefore crosses the cloud account's authorization boundary.

Attack Path

  1. An attacker downloads or otherwise obtains the Skill source.
  2. The attacker reads QNNmodel.py and extracts the credential passed to QCloudService.
  3. The attacker supplies the credential to a compatible quantum-cloud client.
  4. Requests execute under the permissions and quotas assigned to the exposed credential.

No compromise of the normal HTTP endpoint is required.

Impact Assessment

An attacker may obtain the cloud-service privileges assigned to the credential. Depending on the provider-side permissions, this can permit unauthorized quantum jobs, resource or quota consumption, and charges against the associated account.

The exact provider-side privilege scope cannot be determined from the reviewed repository. No evidence indicates that this credential is used for covert exfiltration or that its exposure was intentional.

Remediation
View remediation

Remediation Suggestions

  1. Immediately revoke and rotate the exposed credential.
  2. Remove the credential from source code and repository history.
  3. Obtain it at runtime from a protected environment variable or secret manager.
  4. Require explicit cloud-mode configuration and fail safely when no credential is configured.
  5. Restrict the replacement credential to the minimum required API operations, quotas, and resources.
  6. Add automated secret scanning to development and release workflows.
  7. Review provider-side usage logs for unauthorized activity involving the exposed credential.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (44)

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The file imports and uses the requests library to make outbound HTTP calls, which adds network capability not aligned with the declared local analysis scope. In an IDS/PCAP analysis skill, unexpected network access is dangerous because analyzed IPs from captured traffic may be transmitted to third parties, creating privacy, compliance, and supply-chain trust issues.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill contains remote quantum-cloud execution logic with a hardcoded service token, causing local analysis inputs and generated circuits to be sent to an external service. In an IDS/firewall context, this is especially risky because packet-derived features may reflect sensitive network activity, and the remote execution capability is not necessary for the stated local traffic-analysis purpose.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

A hardcoded cloud API token embedded in source code can be extracted by anyone with file access and abused to run jobs, consume quota, or impersonate the service owner. In this skill, the token also enables undisclosed remote execution from a security-analysis tool, increasing both secret-exposure risk and data-egress risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Running a persistent HTTP server with exposed endpoints and browser-accessible responses is materially more sensitive than a passive local-analysis tool. If that network exposure is not clearly disclosed, users may deploy it in unsafe contexts, increasing the risk of unauthorized access, cross-origin abuse, or unintended data exposure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Running a persistent HTTP server with exposed endpoints and browser-accessible responses is materially more sensitive than a passive local-analysis tool. If that network exposure is not clearly disclosed, users may deploy it in unsafe contexts, increasing the risk of unauthorized access, cross-origin abuse, or unintended data exposure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Running a persistent HTTP server with exposed endpoints and browser-accessible responses is materially more sensitive than a passive local-analysis tool. If that network exposure is not clearly disclosed, users may deploy it in unsafe contexts, increasing the risk of unauthorized access, cross-origin abuse, or unintended data exposure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Running a persistent HTTP server with exposed endpoints and browser-accessible responses is materially more sensitive than a passive local-analysis tool. If that network exposure is not clearly disclosed, users may deploy it in unsafe contexts, increasing the risk of unauthorized access, cross-origin abuse, or unintended data exposure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Running a persistent HTTP server with exposed endpoints and browser-accessible responses is materially more sensitive than a passive local-analysis tool. If that network exposure is not clearly disclosed, users may deploy it in unsafe contexts, increasing the risk of unauthorized access, cross-origin abuse, or unintended data exposure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Running a persistent HTTP server with exposed endpoints and browser-accessible responses is materially more sensitive than a passive local-analysis tool. If that network exposure is not clearly disclosed, users may deploy it in unsafe contexts, increasing the risk of unauthorized access, cross-origin abuse, or unintended data exposure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

Running a persistent HTTP server with exposed endpoints and browser-accessible responses is materially more sensitive than a passive local-analysis tool. If that network exposure is not clearly disclosed, users may deploy it in unsafe contexts, increasing the risk of unauthorized access, cross-origin abuse, or unintended data exposure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest claims conversation-flow tracing for LLM interpretation, but the code does not retain packet payloads, ordered transaction content, or detailed session semantics needed for meaningful flow reconstruction. In the context of network forensics and WebShell triage, this can mislead users into believing the tool supports deep session interpretation when it only exposes coarse aggregates.

Content

No source excerpt is available for this finding.

Insecure deserialization: torch.load() without weights_only=True

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

Resuming training from an arbitrary checkpoint with torch.load() can trigger arbitrary code execution if the checkpoint file is malicious, because PyTorch deserialization is pickle-based by default. Since this path is likely to be used operationally during interrupted training or experimentation, it meaningfully expands the attack surface for anyone who can place or replace checkpoint files.

Content

Scanner excerpt · CNNmodel.py (reported line 93)May include surrounding context.

python
start_epoch=0
		
		if resume_checkpoint and os.path.exists(resume_checkpoint):
			checkpoint=torch.load(resume_checkpoint,map_location=self.device)
			self.load_state_dict(checkpoint['model_state_dict'])
			if'optimizer_state_dict'in checkpoint:
				optimizer.load_state_dict(checkpoint['optimizer_state_dict'])

Insecure deserialization: torch.load() without weights_only=True

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

torch.load() uses Python pickle semantics by default, so loading an attacker-controlled .pth file can execute arbitrary code during deserialization. In this skill, model/checkpoint files may be resumed or loaded from disk as part of normal workflow, making poisoned checkpoints a realistic code-execution vector rather than a purely theoretical issue.

Content

Scanner excerpt · CNNmodel.py (reported line 183)May include surrounding context.

python
@classmethod
	def load_model(cls,filepath):
		device=torch.device(DEVICE_TYPE if torch.cuda.is_available()else'cpu')
		checkpoint=torch.load(filepath,map_location=device)
		model=cls(
			input_dim=checkpoint.get('input_dim',180),
			latent_dim=checkpoint.get('latent_dim',64),

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file defines attack class names in Chinese and later emits multiple Chinese user-facing status/error messages. This imposes a specific language/locale without user opt-in, which matches the natural-language policy violation criteria.

Content

No source excerpt is available for this finding.

Insecure deserialization: pickle.load()

Medium
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The code deserializes a .pkl file with pickle.load() from a filesystem path without any integrity or authenticity validation. Python pickle is code-executing by design, so if an attacker can replace or tamper with unified_8class_spca.pkl in the writable result directory, loading it can trigger arbitrary code execution in the process running this skill.

Content

Scanner excerpt · FeatureSelection.py (reported line 135)May include surrounding context.

python
def load_unified_pca_model(self):
		result_file=os.path.join(self.result_dir,"unified_8class_spca.pkl")
		if os.path.exists(result_file):
			with open(result_file,'rb')as f:return pickle.load(f)
		return None
	
	def transform_features_unified(self,features):

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The query_ip_location function performs external geolocation lookups that go beyond the stated purpose of local PCAP/IDS analysis. This broadens the skill's behavior in a way users may not expect and can leak sensitive investigation artifacts such as attacker, victim, or internal-facing observed IPs to an external service.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code sends observed public IP addresses to ip-api.com over the network, which is a form of data exfiltration to a third party. In the context of packet capture and intrusion detection, those IPs can be sensitive incident-response data, customer infrastructure indicators, or regulated telemetry, making this more dangerous than a generic enrichment feature.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The function performs a remote lookup without any visible disclosure, consent flow, or warning in the code path, so users may unknowingly send investigated IPs to an external service. In a security-analysis skill, undisclosed sharing undermines operator trust and may violate organizational policies during incident handling.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The description focuses on PCAP analysis, attack detection, confidence reporting, conversation tracing, and defensive guidance. This file additionally implements generic model save/load behavior to local paths, which is a materially broader behavior than the manifest advertises and not an obvious requirement for end-user IDS analysis.

Content

No source excerpt is available for this finding.

Insecure deserialization: pickle.load()

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

The code uses pickle.load() on a user-supplied/local file path without any trust boundary enforcement. Python pickle deserialization is code-executing by design, so loading a malicious model file can trigger arbitrary code execution on the host running the IDS skill.

Content

Scanner excerpt · QNNmodel.py (reported line 112)May include surrounding context.

python
return False
		try:
			with open(filename,'rb')as f:
				model_data=pickle.load(f)
			if'params'in model_data:self.params=QTensor(model_data['params'])
			if'frozen_mask'in model_data:
				self.frozen_mask=model_data['frozen_mask']

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This instruction fixes the interaction style and language conventions rather than offering them as an option. The policy allows locale or language constraints only when the user is given a choice or the constraint is clearly justified as region-specific; neither is present here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill claims local PCAP/IDS analysis but also performs external lookups to ip-api.com. In a security-analysis context, observed IPs may be sensitive investigative artifacts, and sending them to a third party can leak internal monitoring targets, incident indicators, or customer infrastructure details.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

External IP geolocation is not strictly required for packet classification and broadens the skill's data-exposure surface. In an IDS/firewall context, unnecessary outbound enrichment can violate least-privilege and least-data principles, especially when handling sensitive or regulated traffic metadata.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file mentions ip-api.com lookups but does not clearly warn that IPs observed in analyzed traffic may be sent to an external service. That omission is dangerous because users may process sensitive PCAPs under the assumption that analysis is local, unintentionally disclosing network metadata to a third party.

Content

No source excerpt is available for this finding.