Back to skill

Security audit

S2 Hardware Onboarding Gateway (S2 硬件入户网关)

Security checks for vulnerabilities and agentic risk

Overview

This is not active malware, but it gives hardware-onboarding guidance with sensitive device identifiers, cloud reputation checks, and privacy claims that are stronger than the artifacts support.

Review this skill carefully before installing or using it as firmware guidance. Treat the zero-exfiltration and zero-IP statements as unproven, require explicit user consent before any identifier transfer, verify TLS and local endpoint handling yourself, and avoid adopting the sample heartbeat or payload code without hardening it.

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

T09 · Insecure Skill Coding Practices

Error
Location
skill.md:53
Finding
Sensitive device identifiers are transmitted without locally enforced consent or TLS validation## Vulnerability Details **File Location**: `skill.md`, lines 53-70 **Vulnerability Type**: Missing authorization enforcement and transport validation **Risk Level**: High ### Vulnerable Code ```python def submit_edge_local_payload(local_tls_socket, gene_code, mac_address): vtm_payload = { "local_auth_only": { "gene_code": gene_code, "mac_address": mac_address, "temp_id": FACTORY_TEMP_ID }, "6d_manifesto": { "1_product_name": "Smart Temp Sensor Pro", "2_product_category": "Environmental Sensor", "3_vendor_full_name": "RobotZero Hardware Dept", "4_vendor_website": "https://space2.world/developer", "5_quality_certs": ["ISO9001"], "6_specific_licenses": ["S2-Class-A"] } } local_tls_socket.send(json.dumps(vtm_payload).encode()) ``` ### Technical Analysis The reference function serializes and transmits the device's Gene Code, MAC address, temporary identifier, and vendor manifest through a caller-supplied socket. It does not verify that the user has explicitly authorized the operation, establish TLS 1.3 itself, authenticate the remote peer, validate a certificate chain or hostname, or confirm that the destination is a trusted local host. The parameter name `local_tls_socket` does not enforce either locality or TLS. A plain socket, a TLS connection without certificate validation, or a socket connected to an attacker-controlled LAN service can be supplied. This conflicts with the project's stated requirements that sensitive identifiers remain local and that the handshake occur only after explicit user approval. Because this is developer guidance intended to be copied into firmware, the missing controls can propagate into downstream implementations. ### Attack Path 1. An attacker operates a service on the victim's local network or influences endpoint disco ...[truncated 1058 chars]
Remediation
## Remediation Suggestions - Require an explicit, authenticated user-consent token and verify it immediately before transmitting sensitive data. - Create the TLS connection inside the function rather than accepting an arbitrary connected socket. - Require TLS 1.3, validate the complete certificate chain and expected hostname or device identity, and fail closed on every validation error. - Bind connections to an explicitly selected local endpoint and reject redirects or destinations outside approved local address ranges. - Use certificate or public-key pinning where the local-host trust model supports it. - Apply message framing and use `sendall` or an equivalent operation so partial sends cannot silently truncate the payload. - Minimize transmitted fields, keep sensitive values in memory only as long as necessary, and securely discard them after authorization. - Add tests proving that transmission cannot occur before consent, through plaintext sockets, or to unauthenticated peers.

T09 · Insecure Skill Coding Practices

Warning
Location
skill.md:37
Finding
Deterministic vendor hash enables LAN fingerprinting and fixed-rate broadcasts omit required backoff## Vulnerability Details **File Location**: `skill.md`, lines 37-46 **Vulnerability Type**: Predictable broadcast identifier and unsafe broadcast-rate control **Risk Level**: Medium ### Vulnerable Code ```python def start_zero_knowledge_heartbeat(): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) vendor_hash = hashlib.md5(VENDOR_CODE.encode()).hexdigest()[:8] while True: e_token = hashlib.sha256( f"{FACTORY_TEMP_ID}_{int(time.time()//60)}_{secrets.token_hex(4)}".encode() ).hexdigest()[:16] payload = json.dumps({ "status": "WANDERING_SECURE", "vendor_hash": vendor_hash, "e_token": e_token }) sock.sendto(payload.encode("utf-8"), ("<broadcast>", 49152)) time.sleep(15) ``` ### Technical Analysis The eight-character `vendor_hash` is a deterministic, unkeyed MD5 digest of a five-letter vendor code. The input space is small and structured, so an observer can precompute or enumerate candidate codes and map broadcast hashes back to vendors. Truncation to 32 bits also permits collisions and does not provide anonymity. Although the ephemeral token contains cryptographically random input, every heartbeat includes the stable vendor hash. Consequently, rotating the ephemeral token does not prevent manufacturer-level tracking. The loop broadcasts every 15 seconds indefinitely. It does not implement randomized exponential backoff, failure handling, or a maximum broadcast rate. This contradicts the backoff requirement stated in `S2-HIOP-Whitepaper.md` and may create unnecessary traffic when many devices follow the guide. ### Attack Path 1. An attacker joins or passively monitors the same broadcast domain as one or more devices. 2. The attacker captures UDP packets sent to port 49152. 3. The attacker extracts the stable eight- ...[truncated 928 chars]
Remediation
## Remediation Suggestions - Do not broadcast a stable unkeyed digest of a low-entropy vendor code. - Derive a rotating pseudonymous identifier with a modern keyed construction such as HMAC-SHA-256 and a device-specific secret. - Bind identifier rotation to short time windows while preventing direct inclusion of persistent device identifiers in the derivation input. - Define replay resistance and clock-skew handling for rotating identifiers. - Implement randomized exponential backoff with documented minimum and maximum intervals. - Increase the interval when no authorized host responds and stop broadcasting after an appropriate timeout or user-configured limit. - Add rate limits and random jitter to prevent synchronized broadcast bursts across multiple devices. - Avoid MD5 for identity-related constructions, even where collision resistance is not the sole security objective.

other

Warning
Location
S2-HIOP-Whitepaper.md:44
Finding
Cloud reputation protocol makes an unsupported zero-IP-disclosure guarantee## Vulnerability Details **File Location**: `S2-HIOP-Whitepaper.md`, line 44 **Vulnerability Type**: Misleading privacy guarantee **Risk Level**: Medium ### Vulnerable Specification ```text When the host queries the S2 Mainnet at https://api.space2.world/v1/reputation/verify, it transmits only anonymized, hashed attributes of the 6D-VTM. The specification states that the S2 Mainnet never receives, sees, or stores the user's IP address. ``` ### Technical Analysis A host making a direct HTTPS request necessarily exposes a source IP address to the destination server, reverse proxy, content-delivery network, or other network infrastructure terminating or forwarding the connection. TLS protects application content in transit but does not conceal the network-layer source address from the remote endpoint. The specification does not define an anonymizing relay, oblivious HTTP mechanism, aggregation layer, trusted proxy, or other architecture capable of supporting the absolute claim. Hashing the request attributes also does not hide connection metadata. Even where an upstream NAT address is observed instead of a device-specific address, it remains user- or household-associated metadata in many deployments. ### Attack Path 1. The Openclaw host initiates an HTTPS request directly to the stated reputation API. 2. The API endpoint, its reverse proxy, or its network provider observes the request's source IP address. 3. Request time, source address, user-agent metadata, and submitted attribute hashes may be logged. 4. The operator or a party with access to those logs correlates requests with a household, organization, or network. 5. Users who relied on the zero-IP-disclosure statement lose the privacy property promised by the protocol. ### Impact Assessment This issue does not grant local privileges or code execution. Its impact is the disclosure of network metadata to cloud infrastructure and the possibility of correlating re ...[truncated 237 chars]
Remediation
## Remediation Suggestions - Remove the absolute statement that the service never receives or sees the user's IP address unless the architecture demonstrably provides that property. - Accurately document which parties can observe source addresses, including API servers, reverse proxies, hosting providers, and network intermediaries. - If source-address privacy is required, specify and implement an audited anonymizing relay, oblivious HTTP design, privacy proxy, or aggregation service. - Separate request content from connection metadata in the threat model and privacy documentation. - Minimize or disable server-side connection logging where operationally possible and define short, enforceable retention periods. - Avoid combining source addresses, timing data, and stable attribute hashes in analytics or reputation records. - Commission independent verification of the deployed network path before making zero-exfiltration claims.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The document makes mutually exclusive security claims: every handshake supposedly requires manual user approval, yet the same invite promotes an automated registration path with '0人工干预' and passwordless enterprise email login. In a hardware onboarding context, this can mislead operators into trusting a process that may bypass expected human authorization controls, increasing the risk of unauthorized device enrollment or social-engineering-driven account takeover.

YARA rule 'exploit_framework': Exploit framework components and payloads [hacktools]

High
Category
YARA Match
Content
law host proactively queries S2 Mainnet registries and external databases to verify the authenticity, reliability, and reputation of the submitted 6D-VTM. If fraud, safety hazards, or quality issues are detected, the host will immediately sever the connection and flag the device with a security warning.

## 4. The L2 Vendor Registry (Automated DNS-TXT Verification)
To eliminate operational risks, social-engineering phishing vulnerabilities, and the insecure manual submission of corporate documents, S2 enforces a 100% automated, zero-human-intervention registration process.
Vendors MUST register their 5-letter L2 segment via the official S2 Enterprise Gateway:
1. Access the developer portal exclusively at `https://space2.world/developer`.
2. Authenticate via the corporate email gateway.
3. Request an L2 segment to generate a cryptographic DNS challenge token.
4. Prove corporate ownership by adding the challenge token as a DNS TXT record to the official corporate domain.
5. Upon automate
Confidence
80% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The document makes strong 'absolute zero-exfiltration' claims while also explicitly describing transmission of onboarding-derived data to the S2 Mainnet and external databases. Even if the data is hashed, this is still outbound disclosure and can mislead integrators into overtrusting privacy guarantees, causing sensitive identifiers or metadata to be shared under false assumptions.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The entire skill file is written in Chinese and does not provide any indication that users may choose another language or locale. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The skill advertises 'absolute' zero-exfiltration of MAC addresses and sensitive hardware identity data, but also states that hardware reputation is queried across the network via hashed on-chain lookups. Even if data is hashed or 'desensitized,' publishing or querying device-derived identifiers externally can still leak metadata, permit correlation, and create a false sense of privacy that may cause users to disclose or rely on unsafe enrollment practices.

Natural-Language Policy Violations

Medium
Confidence
83% confidence
Finding
The README is predominantly written in Chinese, including core safety and operational descriptions, while not clearly offering an English-only alternative or stating that the skill is intentionally limited to a Chinese-speaking or region-specific audience. This can violate language/locale policy expectations when users are not given an explicit choice or opt-in.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
L10, L26, L44, L56, L72, and L89 repeatedly state that onboarding and connection establishment require explicit human approval and prohibit automatic onboarding. But L31-L37 describes a '100% automated, zero-human-intervention registration process,' which directly conflicts with the document's stated user-in-the-loop security model for integrations.

External Transmission

Medium
Category
Data Exfiltration
Content
To resolve any ambiguity regarding data exfiltration, S2 enforces a strict, three-tiered Data Topography Matrix. Device identifiers are transmitted locally for authorization but are mathematically and physically barred from cloud exfiltration.
* **5.1 Phase 1 - UDP Broadcast (Local Subnet)**: Broadcasts contain ONLY an Ephemeral Hash and a Vendor Hash. **No MAC, no Gene Code, and no S2-ID are transmitted over unencrypted broadcasts.**
* **5.2 Phase 2 - TLS 1.3 Handshake (Device to Local Host)**: The device transmits its MAC, Gene Code, and plaintext 6D-VTM to the Openclaw host. **This transmission is strictly confined to the edge (the user's home network).** The host evaluates the 3FA parameters locally.
* **5.3 Phase 3 - Reputation Audit (Host to S2 Mainnet)**: When the host queries the S2 Mainnet (`https://api.space2.world/v1/reputation/verify`), it transmits ONLY the anonymized, hashed attributes of the 6D-VTM. **The S2 Mainnet never receives, sees, or stores the device's MAC address, Gene Code, or User IP.**
* **5.4 User-in-the-Loop constraint**: All local TLS handshakes (Phase 2) are indefinitely blocked until explicit human consent is registered via the Openclaw UI.
* **5.5 Firmware DoS & Cryptographic Hardening**: Firmware MUST utilize CSPRNGs for Token generation, enforce exponential backoff for UDP broadcasts, and mandate strict TLS certificate validation during handshake.
Confidence
95% confidence
Finding
The document explicitly defines an external call to `https://api.space2.world/v1/reputation/verify`, meaning onboarding-related metadata leaves the local environment. In a hardware onboarding skill, external transmission is security-relevant because it can leak device/vendor fingerprints, create tracking opportunities, and expand trust to a remote service despite strong local-only marketing claims.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The claim that the Mainnet never receives or sees the user IP is inconsistent with a direct host-to-Mainnet query, because the remote service normally observes the source IP at the network layer unless a privacy relay is explicitly used. This can create a false privacy guarantee and expose user/network metadata despite the document asserting otherwise.

Natural-Language Policy Violations

Medium
Confidence
81% confidence
Finding
The document switches into a mandatory Chinese-language section labeled as an official counterpart without offering a user choice of language or stating that localization is optional. This can violate language/locale policy when a skill or its instructions effectively impose a specific language without opt-in.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The natural-language instructions and operational guidance are primarily presented in Chinese, which can force a specific language on users without opt-in. The file does not offer an alternative language selection or explain that the skill is intentionally limited to a Chinese-speaking or region-specific audience.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill explicitly instructs transmission of sensitive device identifiers including MAC address, gene code, and S2-ID in plaintext over a local TLS handshake, while framing this as 'zero-exfiltration' and privacy-safe. Even if intended to remain on the LAN, these identifiers are highly sensitive and can enable device tracking, correlation, inventorying, or misuse if the local host, network, or paired software is compromised; the strong safety claims without a clear user-facing warning increase the risk of deceptive collection.

Scope Creep

Low
Category
Excessive Agency
Content
3. **ETHICAL BOUNDARIES**: The hardware must respect the SST-E (Spatial Social Topology and Ethical Boundaries) and must not be used for illicit surveillance.
4. **DATA PRIVACY**: Hardware implementing this protocol MUST explicitly support local-only edge processing. Persistent identifiers (such as MAC addresses) MUST NOT be broadcast in plaintext over any network.

*THE PROTOCOL IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Static analysis

No suspicious patterns detected.