Back to skill

Security audit

Ganidhuz-FoxX

Security checks for vulnerabilities and agentic risk

Overview

This skill uses your logged-in X/Twitter session cookies as advertised, but it handles login secrets and browser control too broadly for safe default installation.

Install only if you are comfortable giving the skill reusable access to your X/Twitter login session. Treat `secrets/x-cookies.json`, screenshots, extracted text, and any storage-state file as sensitive account data; do not run plans from untrusted sources, and prefer a disposable X account or a version that removes cookie export, limits navigation to X/Twitter, disables write actions by default, and confines outputs to a protected directory.

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

T09 ยท Insecure Skill Coding Practices

Error
Location
scripts/export-x-cookies.sh:29
Finding

Python Code Injection Through FOXX_COOKIES_OUT

Content
View full analysis
/dev/null && sleep 2 || true cp "$DB" "$TMP_DB" python3 - << EOF import sqlite3, json conn = sqlite3.connect("$TMP_DB") rows = conn.execute(""" SELECT host, name, value, path, expiry, isSecure, isHttpOnly, sameSite FROM moz_cookies WHERE host LIKE '%twitter%' OR host LIKE '%x.com%' """).fetchall() cookies = [] for r in rows: exp = r[4] if exp > 1e10: exp = int(exp / 1000) elif exp < -1: exp = -1 cookies.append({ "domain": r[0], "name": r[1], "value": r[2], "path": r[3], "expires": exp, "secure": bool(r[5]), "httpOnly": bool(r[6]), "sameSite": ["None","Lax","Strict"][r[7]] if r[7] < 3 else "None" }) conn.close() with open("$OUT", "w") as f: json.dump({"cookies": cookies}, f, indent=2) print(f"โœ… Exported {len(cookies)} cookies -> $OUT") EOF ``` ### Technical Analysis The heredoc delimiter is not quoted, so the shell expands variables throughout the generated Python program. `FOXX_COOKIES_OUT` controls `OUT`, which is inserted directly inside a Python string literal: ```python with open("$OUT", "w") as f: ``` A value containing quotation marks and newline characters can terminate the intended string and introduce additional Python statements. The value is therefore treated as executable Python syntax rather than exclusively as file-path data. The shell quoting applied when assigning and using `OUT` for `mkdir` does not protect its later interpolation into the heredoc. ### Attack Path 1. An attacker gains control over `FOXX_COOKIES_OUT`, such as through a wrapper scr ...[truncated 934 chars]
Remediation
View remediation

T05 ยท Unauthorized Access and Privilege Escalation

Error
Location
scripts/export-x-cookies.sh:29
Finding

Overbroad Extraction and Insecure Storage of Live Session Cookies

Content
View full analysis
/dev/null && sleep 2 || true cp "$DB" "$TMP_DB" python3 - << EOF import sqlite3, json conn = sqlite3.connect("$TMP_DB") rows = conn.execute(""" SELECT host, name, value, path, expiry, isSecure, isHttpOnly, sameSite FROM moz_cookies WHERE host LIKE '%twitter%' OR host LIKE '%x.com%' """).fetchall() cookies = [] for r in rows: exp = r[4] if exp > 1e10: exp = int(exp / 1000) elif exp < -1: exp = -1 cookies.append({ "domain": r[0], "name": r[1], "value": r[2], "path": r[3], "expires": exp, "secure": bool(r[5]), "httpOnly": bool(r[6]), "sameSite": ["None","Lax","Strict"][r[7]] if r[7] < 3 else "None" }) conn.close() with open("$OUT", "w") as f: json.dump({"cookies": cookies}, f, indent=2) print(f"โœ… Exported {len(cookies)} cookies -> $OUT") EOF ``` ### Technical Analysis The script copies Firefox's cookie database to a predictable global path, `/tmp/foxx-cookies-copy.sqlite`. It neither creates the file securely nor removes it after processing. This creates several risks: - A local attacker may pre-create the path as a symbolic link, potentially redirecting the privileged copy operation. - Other local processes may access residual cookie data depending on ownership and process context. - The copied database remains in `/tmp` after the script exits. - Concurrent executions use the same path and can interfere with one another. The exported JSON contains raw cookie ...[truncated 1982 chars]
Remediation
View remediation

T05 ยท Unauthorized Access and Privilege Escalation

Error
Location
scripts/playwright-firefox-control.py:17
Finding

Unrestricted Authenticated Browser Automation Exceeds the Declared Read-Oriented Scope

Content
View full analysis
dict: action = step.get("action") if action == "goto": url = step["url"] wait_until = step.get("wait_until", "domcontentloaded") page.goto(url, wait_until=wait_until) return {"action": action, "ok": True, "url": page.url} if action == "click": page.locator(step["selector"]).first.click(timeout=step.get("timeout_ms", 10000)) return {"action": action, "ok": True} if action == "fill": page.locator(step["selector"]).first.fill( step.get("text", ""), timeout=step.get("timeout_ms", 10000) ) return {"action": action, "ok": True} if action == "type": page.locator(step["selector"]).first.type( step.get("text", ""), delay=step.get("delay_ms", 50), timeout=step.get("timeout_ms", 10000), ) return {"action": action, "ok": True} if action == "press": page.keyboard.press(step["key"]) return {"action": action, "ok": True} ``` ```python initial_url = plan.get("url", "about:blank") steps = plan.get("steps", []) with sync_playwright() as p: browser = p.firefox.launch(headless=headless) context = browser.new_context() # Inject cookies from file if provided in plan cookies_path = plan.get("cookies_path") if cookies_path and os.path.exists(cookies_path): import json as _json with open(cookies_path) as cf: cookie_data = _json.load(cf) context.add_cookies(cookie_data.get("cookies", [])) page = context.new_page() page.goto(initial_url) for step in steps: try: step_result = run_step(page, step) results["steps"].append(step_res ...[truncated 2066 chars]
Remediation
View remediation

T09 ยท Insecure Skill Coding Practices

Warning
Location
scripts/playwright-firefox-control.py:47
Finding

Plan-Controlled Arbitrary File Writes and Authentication State Export

Content
View full analysis
Remediation
View remediation

T08 ยท Insecure Dependencies

Warning
Location
SKILL.md:17
Finding

Unpinned Playwright and Browser Installation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented behavior frames the skill as an X/Twitter browsing helper, but the plan format and supported actions enable generic browser automation, arbitrary URL navigation, selector-based content extraction, screenshot capture, cookie injection, and storage-state export. In the context of a logged-in browser session, that broader capability can be abused to access unrelated sites, harvest authenticated content, or persist session material beyond the stated purpose.

Content

No source excerpt is available for this finding.

YARA rule 'info_stealer': Information stealer patterns (credential harvesting, browser data theft) [malware]

High
Category
YARA Match
Confidence
97% confidence
Finding

The core behavior of the skill is to harvest authenticated cookies from a real Firefox profile and inject/reuse them to access X/Twitter without an API. In the context of an agent skill, this is highly dangerous because session-cookie extraction is a classic credential-theft pattern that can enable account impersonation and bypass normal authentication controls.

Content

Scanner excerpt ยท scripts/export-x-cookies.sh (reported line 2)May include surrounding context.

sh
#!/bin/bash
# Ganidhuz-FoxX: Export X/Twitter cookies from real Firefox snap profile
# Run this when session expires. Close Firefox first!
# 
# Config via env vars:
#   FIREFOX_PROFILE_PATH  - path to Firefox profile dir (default: auto-detect)
#   FOXX_COOKIES_OUT      - output path for cookies JSON (default: ./secrets/x-cookies.json)

set -e

# Auto-detect Firefox profile
if [ -n "$FIREFOX_PROFILE_PATH" ]; then
    PROFILE_PATH="$FIREFOX_PROFILE_PATH"
elif [ -f "$HOME/snap/firefox/common/.mozilla/firefox/profiles.ini" ]; then
    PROFILE_DIR="$HOME/snap/firefox/common/.mozilla/firefox"
    PROFILE_NAME=$(grep "^Path=" "$PROFILE_DIR/profi

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script reads authenticated Twitter/X cookies from the Firefox profile database and writes them in plaintext JSON to disk. These cookies can grant session access equivalent to the logged-in user, so persisting them in a reusable file materially increases the risk of account takeover if the file is exposed, copied, or mishandled.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill documents capabilities that read environment variables, read files, and write files, but it declares no explicit tool scope or permission boundaries. In a skill that handles exported authenticated cookies and writes screenshots/session state to disk, missing scope declarations increases the chance of overbroad access and unsafe use of sensitive local data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup instructions tell users to export real authenticated X/Twitter cookies to a JSON file but do not prominently warn that these cookies are equivalent to session credentials. Because the skill relies on cookie injection, mishandling that file can allow account takeover or unauthorized access if the file is copied, logged, or stored insecurely.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill supports screenshots and selector-based content extraction while operating inside an authenticated social-media session, but it does not warn that outputs may capture private messages, account data, recommendations, or other sensitive content. This omission raises the risk of accidental data exposure through saved images, logs, or downstream processing.

Content

No source excerpt is available for this finding.

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
85% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt ยท SKILL.md (reported line 119)May include surrounding context.

md
- `goto` - navigate to URL
- `click` - click element by selector
- `fill` - fill input by selector
- `type` - type text with delay
- `press` - press keyboard key
- `wait` - wait ms

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script unconditionally runs pkill -f firefox, forcibly terminating Firefox processes system-wide without user confirmation. While likely intended to avoid SQLite lock issues, this can disrupt unrelated user activity and cause data loss, and it exceeds a minimally safe cookie-export workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Firefox is terminated without explicit confirmation despite the script comment only advising the user to close it first. Abruptly killing the browser can interrupt active sessions, lose unsaved work, and may terminate unrelated Firefox instances not associated with the target profile.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script exposes a generic browser automation primitive set including arbitrary navigation, clicking, typing, key presses, waits, screenshots, and content extraction. Although described as an X/Twitter browsing skill, these actions can drive any site reachable by Firefox, enabling broader account interaction or data access than the manifest suggests. In the context of a real logged-in browser session, this scope mismatch materially increases risk.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script will ingest cookies from any local file path supplied in the plan and inject them into the browser context. This permits use of arbitrary stolen or unrelated cookies and broadens the skill from viewing X/Twitter to importing external authenticated sessions, which is especially dangerous given the stated use of a real logged-in Firefox workflow. It also enables local sensitive-file access patterns and unauthorized session manipulation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Writing storage state to an attacker-controlled path enables export and persistence of authenticated browser session material beyond simple browsing. In a skill that operates with a real logged-in session, session export can allow replay or long-term reuse of credentials/cookies and exceeds the declared functionality. This makes compromise of the user's account or cross-session tracking materially easier.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.