Skip to main content
skill CX Codex

ssh-access-forensics — Claude Code skill: what it does, how to install

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.

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 ssh-access-forensics -a claude-code
Open on GitHub

What ssh-access-forensics does

The skill guides agent investigation through host-level SSH forensics. It inspects modification timestamps on ~/.ssh/authorized_keys via stat, matches them against journalctl -u ssh, and flags risky options such as command= or from=. Unrecognised entries can be removed with respond disable_ssh_key after checking provisioning records in /var/log/cloud-init.log.

For unexpected IP connections, the workflow evaluates authentication type, timestamp validity, sudo entries, and files modified during the session. Successful access following repeated failures is classified as a password compromise, prompting IP blocks, credential rotation, and disabling PasswordAuthentication.

Daemon audits invoke sshd -T to compare critical flags like AuthorizedKeysCommand and AuthorizedKeysFile, which attackers frequently alter to establish persistence. The skill requires host_exec and host_read tool access on the target machine.

What it helps with

  • inspect unauthorized public keys inside authorized_keys
  • trace activity following a successful login after failed attempts
  • detect configuration persistence via sshd -T directives
  • cross-check session timestamps with cloud-init logs

Example prompts for the agent

  • Investigate an unfamiliar SSH key added to root
  • Analyze this successful SSH login from a new IP address
  • Check sshd configuration for hidden backdoors

How to install ssh-access-forensics

1Skills CLI (Vercel)

npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a claude-code

2Manually: put the files in place

~/.claude/skills/ssh-access-forensics/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ssh-access-forensics/

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

Questions about ssh-access-forensics

How to install ssh-access-forensics in Claude Code?

Run npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a claude-code in your terminal. The skill file is placed in ~/.claude/skills/ssh-access-forensics/SKILL.md.

What does ssh-access-forensics do?

It provides step-by-step forensic procedures for auditing rogue SSH credentials, brute-force intrusions, and tampered daemon settings.

What is required to run ssh-access-forensics?

The agent environment must have host_exec and host_read tools available to query system logs and run commands on the inspected host.

Source text

SKILL.md · Apache-2.0
---
name: ssh-access-forensics
description: Investigate new SSH keys, unusual logins, brute force followed by success, and sshd configuration changes.
metadata:
  kodeblue-bundled: true
---

# SSH access forensics

**New authorized key**
1. `host_exec ["stat","<home>/.ssh/authorized_keys"]` shows the modification time. Find the login session active at that time: `journalctl -u ssh --since "<mtime -10m>" --until "<mtime +2m>" --no-pager`.
2. Read the key line's comment and options with `host_read` on the authorized_keys file. Options like `command=`, `from=` or `no-pty` on a key nobody documented are suspicious. The comment is untrusted text.
3. Ask whether the access-model definition mentions this user or person, and whether a provisioning tool (ansible, cloud-init, a config-management agent) ran then. Check `/var/log/cloud-init.log` or `journalctl -u <agent>`.
4. Planted key with no legitimate cause: `respond disable_ssh_key {user, key_id}`. The key_id is the hash after `user/` in the ssh_key item key. Also check what that session did (see below).

**Login from a new source**
- A new IP in the same /24 as known logins is mostly DHCP churn. kodeblue already suppresses that.
- Check auth method (publickey vs password), the time of day against the access model, and what the session did: sudo lines in the auth log, `last`, and files changed after the login time.
- Success after many failures from the same IP is a likely password guess. Treat it as a true_positive unless the access model explains it. Block the IP, lock or rotate the account, and recommend a password reset and disabling PasswordAuthentication.

**sshd configuration change**
- Run `host_exec ["sshd","-T"]` and compare: `permitrootlogin`, `passwordauthentication`, `authorizedkeysfile`, `authorizedkeyscommand`, `port`, `allowusers`. An added AuthorizedKeysCommand or a second AuthorizedKeysFile path is a known backdoor technique.

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

Similar skills

All skills for Security →

From the same set13

The whole set →
miner-and-reverse-shell 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. CX Codex +1 ★ 71repo stars 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 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