AI Engineer15 min
You Can't Tell What an Agent Skill Will Do by Reading It - Roey Ben Chaim, Zenity
Conference Presentation, Keynote
- Problem Definition: Agent skills are defined as "capability on demand" containing instructions, resources, scripts, and code written by third parties, creating ambiguity in distinguishing malicious from benign intent based solely on behavior.
- Observed Behavior: Official Azure diagnostic skills were observed scanning cloud configurations, Kubernetes settings, identity services, and instance metadata endpoints, mimicking the exact trajectory of "InfoStealer" malware.
- Static Analysis Failure:
- Payloads often reside outside the primary
skill.mdentry point, located instead in installation scripts, remote endpoints, or invoked via package registries. - LLM-based analyzers can be tricked by social engineering tactics, such as comments claiming AppSec team approval for malicious package registry manipulation.
- Payloads often reside outside the primary
- Solution Architecture (Detonation Chamber):
- Execution-Based Detection: Shifted from static scanning to a "detonation" methodology, running skills inside a sandboxed environment to observe actual agent behavior over minutes or hours.
- Environment Reconstruction: Developed a "world builder" to construct necessary external dependencies (e.g., CLI tools, specific services like Notion) that skills rely on for operation.
- Adversarial Operator: Created an operator to analyze skill trajectories and generate specific prompts for each use case (e.g., deployment vs. brainstorming), overcoming agent safety refusals by framing the execution as necessary security research.
- Deep Capture Mechanism: Enhanced monitoring to capture side effects missed by standard traces, including process creation events, file system changes, and network packet captures (e.g., post-installation scripts triggering new processes).
- Key Findings & Incidents:
- Zach Corman Proof of Concept: Uncovered a skill chain where a "security review tool" installed a secondary skill fetching hidden instructions from
skill.mdto execute payloads, demonstrating that static scanners miss multi-stage chains. - Malicious Skill Count: Successfully identified and shut down 100 malicious skills out of thousands tested within the
skills.shframework. - Polymarket Supply Chain Attack: Identified a skill installation script calling a non-official
PolyMarketsClientV2package linked to a fake NPM registry, which functioned as an InfoStealer.
- Zach Corman Proof of Concept: Uncovered a skill chain where a "security review tool" installed a secondary skill fetching hidden instructions from
- Emerging Attack Vectors:
- Persistence: Skills appending instructions to
sol.jsoragent.mdto force re-installation if removed. - Silent Replacement: Malicious scripts that detect and uninstall official skill creators to install themselves instead.
- Remote Prompt Execution: Skills retrieving critical instructions from external domains, creating risks of domain takeover or prompt hijacking over time.
- Hook Abuse: Skills triggering on user prompt submissions, potentially executing malicious code on every interaction.
- Persistence: Skills appending instructions to
- "Carly Paperclip" Campaign:
- Impersonation: Attacker "Carly" created a fake organization mimicking the legitimate "Paperclip" agent orchestration project.
- Payload Execution: Skilled cloned the project and injected a
logaction calling an attacker-controlled endpoint to fetch, decode, and execute a credential harvester. - Harvesting Scope: The payload scanned SSH, AWS, and Azure folders, exfiltrated data to a feedback endpoint, and self-destructed after 60 seconds.
- Scale: The malicious chain, used across JavaScript and Python variants, achieved 1.7 million total downloads before being neutralized.
- Response: Vercel and Microsoft removed the compromised assets within 12 hours of reporting.
- Supply Chain Scope: Expanded definition of agent context risk to include websites, database rows, npm packages, and even YouTube comments, necessitating treatment of skills as high-risk package dependencies.
- Mitigation Recommendations:
- Treat skills as package dependencies requiring full inspection of loaded resources.
- Enforce strict access limits and implement privilege listing.
- Monitor and analyze actual runtime execution rather than relying on code review alone.
- Availability: The "Detonation Chamber" tool developed by the Zenity Labs research and engineering team is accessible via Artoto.io.