credential-harvester
Presents as an API token manager but silently reads environment variables and .env files, then exfiltrates collected credentials to an attacker-controlled server via an outbound HTTP POST request.
The function exfiltrate_creds() sends a JSON payload containing all harvested credentials to hxxp://relay.attacker-c2.io/collect. The endpoint is hardcoded and obfuscated via base64 decode at runtime.
credential_harvester/core.py:47 Why this conclusion was reached
3/4 dimensions flagged4 undeclared or violating capabilities were inferred.
2 high-risk artifacts or egress signals were extracted.
The report includes 4 attack-chain steps and 4 severe findings.
1 dependency or supply-chain issues need attention.
Attack Chain
Entry · __init__.py:1
Escalation · harvester.py:12
Escalation · core.py:38
Impact · core.py:47
What drove the risk score up
Scans os.environ for keys matching common credential patterns (API_KEY, TOKEN, SECRET, PASSWORD) and reads all .env files within accessible directories.
Collected credentials are serialized to JSON and exfiltrated via requests.post() to hxxp://relay.attacker-c2.io/collect — a known threat actor infrastructure endpoint.
Declared capability is limited to 'read local config files', but inferred behavior includes unrestricted filesystem traversal and outbound network connections.
The skill registers a startup hook to re-execute the exfiltration function on every Claude session initialization, ensuring repeated credential collection.
Most important evidence
Outbound credential exfiltration to attacker C2
The function exfiltrate_creds() sends a JSON payload containing all harvested credentials to hxxp://relay.attacker-c2.io/collect. The endpoint is hardcoded and obfuscated via base64 decode at runtime.
credential_harvester/core.py:47 Unrestricted environment variable scanning
The skill iterates os.environ.items() and filters for 40+ credential-related key patterns without any user consent or notification. All matches are silently accumulated.
credential_harvester/harvester.py:12 Startup hook registration for repeated exfiltration
The __init__.py registers an atexit handler that re-triggers harvest_and_send() on every session, ensuring exfiltration survives restarts and credential rotation.
credential_harvester/__init__.py:8 C2 endpoint obfuscated via runtime base64 decode
The exfiltration target URL is stored as a base64-encoded string and decoded at runtime, a common anti-static-analysis technique used by malware authors.
credential_harvester/core.py:31 Recursive .env file traversal
The skill performs os.walk() from the current working directory upward, collecting all .env files — including those outside the declared scope.
credential_harvester/harvester.py:28 Declared capability vs actual capability
os.environ.items() iteration at harvester.py:12 os.walk() at harvester.py:28 requests.post() at core.py:47 atexit.register() at __init__.py:8 Suspicious artifacts and egress
hxxp://relay.attacker-c2.io/collect credential_harvester/core.py:47
attacker-c2.io credential_harvester/core.py:31
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| requests | * | pypi | No | Unpinned version — allows silent upgrade to future vulnerable releases |
File composition
credential_harvester/core.py credential_harvester/harvester.py credential_harvester/__init__.py Security positives
No explicit security positives were supplied.