Skip to main content
skill CX Codex

miner-and-reverse-shell — Claude Code skill: features and setup

miner-and-reverse-shell is a Claude Code skill that stops miners and reverse shells. Triggers on unexpected CPU spikes, suspicious outbound ports, and binaries in /tmp.

Apache-2.0 ★ 71 updated 2026-11-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Problem99-io/kodeblue --skill miner-and-reverse-shell -a claude-code
Open on GitHub

What miner-and-reverse-shell does

The skill spots cryptominer and shell patterns across active processes and network sockets. It monitors targets like xmrig or kinsing, execution from /tmp or /dev/shm, and connections to ports 3333, 4444, or 5555. Interactive shells are detected when descriptors in /proc/<pid>/fd point to sockets alongside interpreters or tools like nc and socat.

Triage uses ps, readlink, and ss commands together with a sha256sum hash. During containment, kodeblue backs up the executable for forensics before invoking kill_process, moves launcher files to quarantine, and runs block_ip against the external pool. Documenting the initial ingress vector remains the core remediation step.

What it helps with

  • halt hidden cryptominers while archiving the binary for analysis
  • detect reverse shells by checking socket references in /proc/<pid>/fd
  • quarantine dropped payloads and block external pool IP addresses
  • trace parent exploit processes and cron persistence mechanisms

Example prompts for the agent

  • Investigate the high CPU process in /tmp and trace its parent PID
  • Contain the active miner, block the pool IP, and quarantine the binary

How to install miner-and-reverse-shell

1Skills CLI (Vercel)

npx skills add Problem99-io/kodeblue --skill miner-and-reverse-shell -a claude-code

2Manually: put the files in place

~/.claude/skills/miner-and-reverse-shell/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/miner-and-reverse-shell/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about miner-and-reverse-shell

How to install miner-and-reverse-shell in Claude Code?

Run npx skills add Problem99-io/kodeblue --skill miner-and-reverse-shell -a claude-code.

What does miner-and-reverse-shell do?

It identifies cryptocurrency miners and reverse shells, analyzes process lineage, and isolates the malicious components.

How does the skill handle confirmed threats?

It preserves the suspect file for forensics first, terminates the process, isolates dropped files via quarantine_file, and blocks remote IPs.

Source text

SKILL.md · Apache-2.0
---
name: miner-and-reverse-shell
description: Recognise and contain cryptominers and reverse shells (cpu_hog, outbound.shell, outbound.suspicious_port, process.suspicious_location findings).
metadata:
  kodeblue-bundled: true
---

# Miners and reverse shells

**Miner indicators:** sustained high CPU from an unpackaged binary; names like `xmrig`, `kdevtmpfsi`, `kinsing`, or random 6–8 character strings; binaries in /tmp, /dev/shm or /var/tmp; outbound connections to 3333, 4444, 5555, 7777, 14444 or 45700; or pool hostnames. These often come with a cron or systemd re-launcher and a killer script for competing miners.

**Reverse shell indicators:** `bash -i`, `sh -i`, `nc -e`, `socat exec:`, or python/perl one-liners with socket. stdin and stdout point to a socket: `host_exec ["ls","-l","/proc/<pid>/fd"]` shows `socket:[...]` on fds 0, 1 and 2. The parent is often a web server or a service account. The child may instead be the service's own interpreter (node, python) re-exec'd rather than a named shell, and the callback may have been refused — an attempted outbound to a dead port is still the event. See service-process-exploitation.

**Investigate quickly:**
1. `ps -o pid,ppid,user,lstart,cmd -p <pid>`, then walk up the parents.
2. `readlink -f /proc/<pid>/exe` and `sha256sum` of it.
3. `ss -tunap` filtered by the pid to get remote IP and port.
4. Find the re-launcher (see persistence-hunting).

**Contain (true_positive):** kill_process (kodeblue preserves the binary for forensics first), quarantine_file for the dropped binary and its launcher script, and block_ip for the C2 or pool IP. Mention in the report how the attacker got in (the parent process, or the login session) — that is the real fix.

© Problem99-io · Apache-2.0 · Problem99-io/kodeblue

Similar skills

All skills for Security →

From the same set13

The whole set →
persistence-hunting persistence-hunting is a Claude Code skill that checks common Linux persistence points. It runs after a persistence alert or a confirmed compromise. CX Codex +1 ★ 71repo stars ssh-access-forensics ssh-access-forensics is a Claude Code skill that investigates new SSH keys, suspicious logins, and sshd backdoors. Inspects compromised servers right after brute-force alerts or auth anomalies. CX Codex +1 ★ 71repo stars container-host-checks container-host-checks is a Claude Code skill that investigates suspicious activity on Docker or Podman hosts. It checks new and privileged containers, exposed ports, and signs of host escapes. CX Codex +1 ★ 71repo stars containment-verification containment-verification is a Claude Code skill that inspects the host after security actions like block_ip, kill_process, quarantine_file, or stop_unit to confirm they hold. CX Codex +1 ★ 71repo stars linux-intrusion-triage linux-intrusion-triage is a Claude Code skill for examining a Linux host that may have been compromised. It guides the initial checks in sequence, using kodeblue’s read-only tools. CX Codex +1 ★ 71repo stars false-positive-playbook false-positive-playbook is a Claude Code skill that helps agents prove security findings are benign. It checks package logs, deployments, and admin sessions instead of guessing. CX Codex +1 ★ 71repo stars web-app-attack-chain web-app-attack-chain is a Claude Code skill that rebuilds a web app attack from request logs. It identifies successful in-app actions and lists the cleanup a person must handle. CX Codex +1 ★ 71repo stars kodeblue-self-integrity kodeblue-self-integrity is a Claude Code skill that investigates changes to kodeblue binaries, engine, and configuration. It analyzes whether modifications or watcher downtime stem from tampering. CX Codex +1 ★ 71repo stars

Project sponsors

Companies that keep this analytics open