Back to skill

Security audit

MinerDetector

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly transparent about exporting miner indicator files, but it can trigger paid billing actions with weak safeguards.

Review this skill before installing. It does not appear to mine cryptocurrency, install persistence, or scan your computer, but it can send your billing API key and user ID to a network billing service, charge your balance, and write exported files. Only use it if you trust the billing provider and publisher, avoid passing API keys on the command line, do not set MINERDETECTOR_BILLING_API_URL unless you fully trust the destination, and require explicit confirmation before any fetch charge.

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
scripts/miner_detector.py:24
Finding

Configurable billing origin can disclose the API key and user identifier

Content
View full analysis
Dict[str, Any]: headers = {"X-API-Key": api_key} data = None if payload is not None: headers["Content-Type"] = "application/json" data = json.dumps(payload).encode("utf-8") req = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=30) as resp: body = resp.read().decode("utf-8", errors="replace") except urllib.error.HTTPError as exc: body = exc.read().decode("utf-8", errors="replace") try: parsed = json.loads(body) except json.JSONDecodeError as json_exc: raise BillingError(f"HTTP {exc.code}: {body}") from json_exc raise BillingError(json.dumps(parsed, ensure_ascii=False)) from exc except urllib.error.URLError as exc: raise BillingError(f"Network error: {exc}") from exc try: return json.loads(body) except json.JSONDecodeError as exc: raise BillingError(f"Invalid JSON response: {body}") from exc def check_balance(user_id: str, api_key: str) -> Dict[str, Any]: query = urllib.parse.urlencode({"user_id": user_id}) url = f"{BILLING_API_URL}/api/v1/billing/balance?{query}" return _http_json("GET", url, api_key) def charge_user(user_id: str, api_key: str, amount: float = DEFAULT_CHARGE_AMOUNT) -> Dict[str, Any]: url = f"{BILLING_API_URL}/api/v1/billing/charge" return _http_json( "POST", url, api_key, { "user_id": user_id, "skill_id": SKILL_ID, ...[truncated 2762 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/miner_detector.py:138
Finding

The export command permits charges other than the declared 0.01 USDT price

Content
View full analysis
int: api_key = get_api_key(args.api_key) charge = charge_user(args.user_id, api_key, args.amount) ``` ```python p_fetch = sub.add_parser("fetch", help="Charge 0.01 USDT and export the 4 bundled files.") p_fetch.add_argument("--user-id", required=True, help="Billing user identifier.") p_fetch.add_argument("--amount", type=float, default=DEFAULT_CHARGE_AMOUNT, help="Charge amount in USDT.") ``` The value is then forwarded without validation: ```python def charge_user(user_id: str, api_key: str, amount: float = DEFAULT_CHARGE_AMOUNT) -> Dict[str, Any]: url = f"{BILLING_API_URL}/api/v1/billing/charge" return _http_json( "POST", url, api_key, { "user_id": user_id, "skill_id": SKILL_ID, "amount": amount, }, ) ``` ### Technical Analysis The documentation and command help describe `fetch` as charging exactly 0.01 USDT. The executable instead exposes `--amount` and passes its value directly to the billing service. There is no validation that the amount: - Equals the advertised 0.01 USDT price - Is positive - Is finite - Falls within a safe upper bound - Uses an appropriate fixed-precision monetary representation Python's `float` parser can accept values inconsistent with a fixed-price purchase, including excessive values and special floating-point values such as `nan` or `inf`. The billing server should independently reject invalid transactions, but the client does not enforce the Skill's declared financial invariant. Because Agent-generated command arguments can be influenced by user input or instruction injection outside this package, exposing a hidden price override unnecessarily increases fina ...[truncated 1408 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/miner_detector.py:42
Finding

Billing API key can be exposed through command-line arguments

Content
View full analysis
str: api_key = cli_api_key or os.environ.get("MINERDETECTOR_API_KEY") if not api_key: raise BillingError( "Missing API key. Set MINERDETECTOR_API_KEY or pass --api-key. " "Apply here: https://x.com/MaZhenZi1/status/2034654798906269916" ) return api_key ``` ```python parser.add_argument("--api-key", help="SkillPay API key. Overrides MINERDETECTOR_API_KEY.") ``` ### Technical Analysis The script permits a long-lived billing credential to be supplied directly on the command line. Command-line arguments are not an appropriate secret transport because they may be observable through: - Shell history - Process inspection facilities - Process-monitoring agents - Terminal session recording - Automation logs - Error reports or execution telemetry The documentation recommends `MINERDETECTOR_API_KEY`, which is safer than a command-line argument in many environments, but the executable still presents and recommends the insecure alternative in its missing-key error. This does not transmit the key to an unrelated remote service by itself. It increases local credential exposure and makes accidental logging more likely. ### Attack Path 1. A user invokes a command such as: ```bash python3 scripts/miner_detector.py --api-key SECRET balance --user-id USER ``` 2. The shell may persist the full command in its history. 3. While the process is running, local process-monitoring mechanisms may expose or record its argument vector. 4. Another user with sufficient local process visibility, or a monitoring/logging product, obtains the key. 5. The observer can attempt remote billing operations within the authorization scope of the stolen key. ### ...[truncated 434 chars]
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (10)

Tainted flow: 'req' from os.environ.get (line 59, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
94% confidence
Finding

The billing endpoint base URL is taken from the MINERDETECTOR_BILLING_API_URL environment variable and then used to send the X-API-Key header and user billing data over the network. In adversarial or multi-tenant execution environments, an attacker who can influence environment variables can redirect requests to an attacker-controlled host and capture credentials or trigger unauthorized billing-related actions.

Content

Scanner excerpt · scripts/miner_detector.py (reported line 61)May include surrounding context.

python
req = urllib.request.Request(url, data=data, headers=headers, method=method)
    try:
        with urllib.request.urlopen(req, timeout=30) as resp:
            body = resp.read().decode("utf-8", errors="replace")
    except urllib.error.HTTPError as exc:
        body = exc.read().decode("utf-8", errors="replace")

YARA rule 'crypto_mining_pools': Connection to known cryptocurrency mining pools [cryptominers]

High
Category
YARA Match
Confidence
85% confidence
Finding

YARA rule matched cryptocurrency mining indicators (stratum protocol, mining pools, miner binaries, or cryptojacking scripts).

Content

Scanner excerpt · indicators/mining_pool_websites.txt (reported line 1)May include surrounding context.

text
2miners.com
antpool.com
binance.com
braiins.com
emcd.io
emcd.network
f2pool.com
f2pool.io
foundrydigital.com
foundryusapool.com
grinmint.com
kryptex.network
litecoinpool.org
luxor.tech
moneroocean.stream
nanopool.org
poolbinance.com
powhashing.com
slushpool.com
supportxmr.com
viabtc.cc
viabtc.com
viabtc.io
xmrpool.eu

YARA rule 'crypto_miner_software': References to known cryptocurrency mining software [cryptominers]

High
Category
YARA Match
Confidence
97% confidence
Finding

This file is an IOC/signature list composed entirely of known cryptocurrency mining software names, and the skill metadata explicitly says it charges to export bundled miner signature libraries. In this context, the package is facilitating miner identification data distribution rather than benign documentation, which can enable monetized threat tooling, miner deployment support, or evasion-aware operations around cryptomining software.

Content

Scanner excerpt · indicators/mining_software_filenames.txt (reported line 2)May include surrounding context.

text
awesomeminer
bfgminer
bminer
bmminer
bzminer
cgminer
gminer
hiveos
kawpowminer
kryptex
lolminer
miniz
nbminer
quickminer
t-rex
teamredminer
xmrig
xmrig-proxy

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill invokes a Python script that uses environment variables, writes exported files, and makes outbound network requests, but the manifest does not declare an explicit tool scope such as permissions or allowed-tools. This weakens reviewability and consent boundaries because an agent may be allowed to perform networked billing and file output without clear up-front restriction metadata.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The command section presents fetch as a normal export action, but the charging side effect is not made prominent enough at the point of use. Users or agents may execute fetch expecting only data retrieval, leading to unauthorized or surprise charges against the user's balance.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger phrases are broad enough that ordinary requests like 'update' or 'get' miner signatures could automatically invoke fetch, which charges the user's balance. In a tool-calling agent context, ambiguous triggers can convert a benign information request into an unintended paid action with external network calls and file export.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description frames the skill as charging 0.01 USDT to export bundled miner signature libraries and explicitly says there is no scanning or detection. While the code indeed does not scan, it also implements broader remote billing capabilities, including balance checks, payment-link generation, and charging via HTTP APIs, which are not reflected in that narrow manifest description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The commands transmit an API key plus user_id and billing information to a third-party service without an explicit user-facing warning at the point of use. In a skill ecosystem, this can lead to users unknowingly disclosing sensitive identifiers or invoking remote billing operations they did not expect.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The stated purpose is to charge a small amount to export four bundled libraries. Creating arbitrary payment/recharge links is a separate wallet or billing-management capability that goes beyond what is necessary to perform a one-time paid export.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The export function creates directories and copies bundled files into the user-specified output path, which modifies the filesystem. Although the fetch subcommand help mentions export behavior, the write operation itself has no runtime notice or confirmation before creating directories and writing files.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.