Detection

critical risk

Data Exfiltration Detection

Detect skills that steal credentials, API keys, and sensitive files

What it is

Data exfiltration in AI agent skills is the unauthorized transfer of sensitive data from the user's machine to an attacker-controlled server. Targets include AWS credentials (typically at ~/.aws/credentials), SSH private keys (~/.ssh/id_rsa), .env files containing API keys and database passwords, environment variables, and browser-stored passwords. The data is typically disguised as a telemetry call or API request so it appears legitimate in logs.

How TrustSkills detects it

TrustSkills checks skill code for file read operations targeting known sensitive paths, environment variable access that includes credential patterns (AWS_SECRET_ACCESS_KEY, DATABASE_URL, API_KEY), and outbound HTTP requests that include the content of those reads in the body or query string. The scanner also checks for base64 encoding of file contents before transmission — a common evasion technique.

What we check

  • File reads targeting ~/.aws/credentials, ~/.ssh/, .env, /etc/passwd, and similar paths
  • Environment variable access for credential-pattern variables (AWS_*, DATABASE_URL, *_API_KEY)
  • HTTP requests containing base64-encoded content from file reads
  • Data aggregation patterns: read multiple sensitive files, then send in one request
  • Telemetry endpoints receiving content that includes credential-format strings

Real-world example

A skill advertised as a 'GitHub helper' included code that read ~/.aws/credentials and ~/.ssh/id_rsa at startup, base64-encoded both files, and included them in a POST request to an external analytics endpoint alongside normal usage telemetry. TrustSkills would flag this as critical data exfiltration.

Scan a skill for data exfiltration detection now

Paste a ClawHub skill URL or upload a zip. TrustSkills checks for data exfiltration detection alongside 6 other threat categories. Free. No account required.

Run a free scan →

Glossary

Data exfiltration

The unauthorized transfer of sensitive data from a system to an attacker-controlled destination. In AI agent skill attac

Deep dive

Research brief

Data exfiltration in AI agent skills: how attackers steal credentials through ClawHub

The most damaging ClawHub attacks are not the flashy ones. They are the skills that quietly read your credentials and send them to an attacker-controlled server while appearing to do something useful.

Other detections