service-process-exploitation — Claude Code skill: install
service-process-exploitation is a Claude Code skill for detecting code execution inside a legitimate service process. It examines child processes, outbound connections, and file changes.
Apache-2.0 ★ 71 updated 2026-11-15
npx skills add Problem99-io/kodeblue --skill service-process-exploitation -a claude-codeWhat service-process-exploitation does
The skill guides investigations into attacks that run under a web service’s own process. It looks for spawned children, including a service starting its interpreter again, unexpected outbound traffic, and new files in directories the service can write to.
It also covers attacks with no child process: changes to code, templates, and other static files can reveal activity, but startup-generated writes need to be distinguished from later changes. A brief command may end before the next process snapshot, so request and connection logs matter too.
What it helps with
- find a child process launched by a network service
- detect outbound traffic outside a service’s usual destinations
- spot new files in a writable web directory
- separate startup file writes from later changes
Example prompts for the agent
- Investigate possible code execution inside this web service process.
- Check which child processes the service launched and where it connected.
- Find service file changes that did not happen at startup.
How to install service-process-exploitation
1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill service-process-exploitation -a claude-code2Manually: put the files in place
~/.claude/skills/service-process-exploitation/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/service-process-exploitation/
1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill service-process-exploitation -a codex2Manually: put the files in place
.agents/skills/service-process-exploitation/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill service-process-exploitation -a cursor2Manually: put the files in place
.cursor/skills/service-process-exploitation/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Problem99-io/kodeblue blue/skills/service-process-exploitation2Manually: put the files in place
.github/skills/service-process-exploitation/SKILL.md1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill service-process-exploitation -a gemini-cli2Platform CLI
gemini skills install https://github.com/Problem99-io/kodeblue --path blue/skills/service-process-exploitationManually: put the files in place
.devin/skills/service-process-exploitation/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about service-process-exploitation
How do I install service-process-exploitation in Claude Code?
Run npx skills add Problem99-io/kodeblue --skill service-process-exploitation -a claude-code. The skill file is located at ~/.claude/skills/service-process-exploitation/SKILL.md.
What does service-process-exploitation do?
It helps investigate code running inside a service process by examining child processes, outbound connections, and file changes.
Why might a process snapshot miss a command?
A short-lived child may exit before the next snapshot. The skill also checks request and connection logs, along with traces left in files.
Source text
SKILL.md · Apache-2.0
--- name: service-process-exploitation description: Detect exploitation that runs INSIDE a legitimate service process — web-app RCE, unsafe deserialization, template/expression injection, interpreter abuse — where the attacker's code masquerades as the normal service and may drop nothing or start no child at all. metadata: kodeblue-bundled: true --- # In-process service exploitation (living off the land) A whole class of compromise never spawns an obvious shell, drops no binary, and may never complete an outbound connection. The attacker gets code execution *inside* a running service — a web-app RCE, an unsafe deserialization (`!!js/function`, Java/Python pickle, YAML/XML), a template or expression injection, or an interpreter the app exposes — and runs their code AS that service's own process. It looks like the service doing its job. Detect it on the tells it cannot hide, not on a dropped file or a strange binary name. ## 1. Lineage, not the binary name The child process is often the *same* binary the baseline already trusts (node re-exec'ing node via `execFileSync`, python spawning python, php-fpm spawning php). A trusted name is not a trusted event. - The anomaly is that a long-running **service process forked/exec'd at all**. nginx, node, java, php-fpm, gunicorn, postgres and the like rarely spawn children in normal operation; when they do it is a known, repeating pattern (a worker pool, a documented sidecar) the baseline shows. - `host_exec ["ps","-eo","pid,ppid,user,lstart,etime,cmd","--forest"]` and find children whose parent is a network service. `host_exec ["readlink","-f","/proc/<pid>/exe"]`; a `(deleted)` or `memfd:` exe is a strong IOC. `host_list /proc/<pid>/fd` — a `socket:[…]` on fds 0/1/2 is an interactive shell. - The parent (the service) is *how they got in*. Name it in the report — that is the real fix, not just killing the child. ## 2. A snapshot miss is not an all-clear These children are often sub-second (an exec to read a file, run `id`, probe a port) and gone before the next snapshot. **Absence from `sensor_snapshot` does not exonerate.** Hunt the *traces* a transient exec leaves: - the request that triggered it in the request log or the app's own log (stack traces, 500 bursts, a probe that turned into a success), - new or modified files under paths the service can write (see §4), - connection traces in app/auth logs for attempts already gone, - a re-launcher (cron/systemd/timer) if they wanted persistence — see [persistence-hunting]. ## 3. Outbound attempts count, even when they fail The post-exploitation step is usually a call home: a reverse shell, a stage-two download, exfil. **A refused or timed-out connection is still an IOC** — "the C2 port was closed" means the attempt happened, not that it was benign. - The decisive signal is a **service reaching outside its baselined egress set** (its database, its known upstream APIs). *Any* other outbound from that process — to an internal neighbour or a public IP, on any port — is suspicious. - `host_exec ["ss","-tunap"]` for current state; correlate with app logs for attempts that have already closed. - Name the destination before calling it hostile: many services call their vendor on their own (update checks, usage stats, certificate renewal), often only once a day, so learning misses them. Skill [outbound-destination-check] covers the name lookups, the setting that makes the call and the timing against the process start. ## 4. Writable app/web directories are drop zones Code running as the service can write wherever the service can — its own web root, upload, cache or build dirs. Those are **not** the protected system paths kodeblue guards by default, so they must be watched explicitly. A new file under a service-writable web root (`.php`/`.jsp`/`.js`/`.sh`, or anything executable) is a webshell until proven otherwise. Inside a container, reach them as the service sees them: `host_list /proc/<pid>/root/<path>` (also `tmp`, `var/tmp`, `dev/shm` there). ## 5. Execution with no child and no drop The quietest case: the service process itself does the attacker's work — it rewrites its own code or assets (a defacement, an injected script), changes stored data, or reads secrets — with no child, no new file in a temp dir and no outbound. The tell is a **write by the service to files that are static while it runs**: its code, templates, built assets, config. **Rule out startup writes first.** Many applications write files every time they start: translations filled from a default language, compiled or minified assets, caches, generated config. Before you call a write an attack: 1. Get the process start time (`ps -o pid,lstart,etime,cmd -p <pid>`) and the file times (`host_list` shows mtimes). 2. Writes in the first minutes after a start, repeated after every restart, and never while the process has been running a while, are startup behaviour. Name it in the server-role definition so the next agent does not repeat the investigation. 3. A write long after the start, with no restart, deploy or admin session to explain it, is the service doing something it does not normally do. Never confirm a theory with your own action: killing a supervised service makes the runtime restart it, and the restart repeats the startup writes. Compare the new write times with the restart you caused before you call them a second wave. ## Containing it - `kill_process` ends the attacker's code, but a supervised service comes back at once. The new process is clean only if what it loads is clean: a payload in stored state (database rows, uploaded files, a poisoned cache) runs again. - A container restart keeps its writable layer; tampered files survive it. Say in the report that the container must be **recreated from its image**, and that attacker-created data (accounts, uploads, tokens) is for a human to remove. ## Setting up the detections (learner) The learner's procedure already creates the main monitors for each network service: `process` with `no_children` (code execution), `sockets` with `no_outbound` and the known `allow_remotes` (egress), and fast `file` monitors on the directories an attacker writes first, with `contain` where it is safe. In addition: - Record each service's legitimate outbound set in the `Server role and services` definition, so a new destination is judged against it. - `integrity_watch_add` the service's static code and asset files that stay the same while it runs (after checking §5's startup writes), so an in-place change is seen. - Capture the host-specific version with `skill_write` once you know the services, e.g. "node-app-egress-and-webroot". ## Verdict A service process that execs a child, re-execs its own interpreter, opens an outbound outside its egress set, gains a new file under its writable web root, or rewrites its static files outside its startup window — with no deploy, admin login, or config-management run to explain it — is suspicious, and malicious when two of these coincide. "The binary is one we know" and "nothing was in the last snapshot" are not causes (see [false-positive-playbook]). [persistence-hunting]: ../persistence-hunting/SKILL.md [false-positive-playbook]: ../false-positive-playbook/SKILL.md [outbound-destination-check]: ../outbound-destination-check/SKILL.md
© Problem99-io · Apache-2.0 · Problem99-io/kodeblue