Commanding attention How adversaries are abusing AI CLI tool... #1491
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Focus
The post documents how adversaries can repurpose local AI command‑line tools (AI CLIs) such as Claude Code, Gemini CLI, Warp, and OpenAI Codex into agentic malware to read/write local files, harvest credentials, and automate reconnaissance and destructive actions. It explains how these tools work, what telemetry they generate, concrete attacker tasking patterns, and how to detect abuse.
How AI CLIs work (mechanics)
• Most AI CLIs run locally (often on Node/Ty...
🔧 Technical Details
Prompt‑driven credential and secrets inventory via AI CLIs. If an AI CLI can read/write files and run shell commands, a single prompt can task it to recursively scan
$HOMEand app/crypto‑wallet directories, skip/proc,/sys,/dev, avoidsudo, cap recursion depth, matchid_rsa,*.key,keystore.json,.env, and browser storage, then summarize to/tmp/inventory.txt(with backup if present) for later exfiltration.Capability extension via MCP (STDIO/HTTP). Register an MCP tool that wraps local/remote actions. Over STDIO, the client typically spawns a helper chain like
node → uv → pythonto perform file operations. Over HTTP, the client makes outbound TCP (e.g., port 8000) to a remote MCP server that executes tasks (e.g., file writes). This allows stealthy lateral capability growth without granting the model direct shell on...🤖 Agent Actions
I analyzed the repo and relevant sections, confirmed there was no existing page about abusing local AI CLI tools (Claude Code, Gemini CLI, Warp) and MCP from a phishing/adversary-ops perspective, and implemented the following updates:
What I added
Internal links (cross-references)
Files created/modified
Rationale
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.