ssh-access-forensics — скилл для Claude Code
Скилл ssh-access-forensics для Claude Code расследует подозрительные SSH-сессии, новые публичные ключи и правки sshd. Помогает разобрать инцидент сразу после взлома или аномального входа.
Apache-2.0 ★ 71 обновлён 2026-11-15
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a claude-codeЧто делает ssh-access-forensics
Скилл направляет агента по шагам форензики на хосте при подозрительной активности через SSH. Сначала агент смотрит время модификации ~/.ssh/authorized_keys через stat, сопоставляет его с журналами journalctl -u ssh и разбирает опции вроде command= или from=. Если ключ чужой, скилл предлагает отключить его через respond disable_ssh_key и проверить логи провижининга вроде cloud-init.log.
При входе с нового адреса отслеживаются метод аутентификации, вызовы sudo и файлы, изменённые сразу после сессии. Успешный вход после череды ошибок расценивается как подбор пароля: скилл советует заблокировать IP, сбросить пароль и выключить PasswordAuthentication.
Проверка демона запускает sshd -T, чтобы выявить скрытые бэкдоры через директивы AuthorizedKeysCommand или второй путь в AuthorizedKeysFile. Для выполнения команд скиллу требуются инструменты хоста host_exec и host_read.
Какие задачи решает
- расследовать добавление недоверенного SSH-ключа в authorized_keys
- проверить сессию после успешного входа после серии неудачных попыток
- выявить бэкдоры в конфигурации демона через sshd -T
- найти связь сессии с логами cloud-init или утилитами провижининга
Примеры запросов агенту
- Проверь инцидент с новым SSH-ключом у пользователя ubuntu
- Разбери подозрительный вход по SSH с нового IP-адреса
- Сверь настройки sshd на сервере через sshd -T
Как установить ssh-access-forensics
1Через Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a claude-code2Вручную: положить файлы
~/.claude/skills/ssh-access-forensics/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/ssh-access-forensics/
1Через Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a codex2Вручную: положить файлы
.agents/skills/ssh-access-forensics/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a cursor2Вручную: положить файлы
.cursor/skills/ssh-access-forensics/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install Problem99-io/kodeblue blue/skills/ssh-access-forensics2Вручную: положить файлы
.github/skills/ssh-access-forensics/SKILL.md1Через Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a gemini-cli2Командой платформы
gemini skills install https://github.com/Problem99-io/kodeblue --path blue/skills/ssh-access-forensicsВручную: положить файлы
.devin/skills/ssh-access-forensics/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о ssh-access-forensics
Как установить ssh-access-forensics в Claude Code?
Выполните в терминале команду npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a claude-code. Файл скилла запишется в ~/.claude/skills/ssh-access-forensics/SKILL.md.
Что делает ssh-access-forensics?
Скилл даёт инструкции и команды для поиска следов несанкционированного доступа через SSH, анализа неизвестных ключей и поиска бэкдоров в sshd_config.
Что нужно для работы ssh-access-forensics?
Требуются доступ к хосту и зарегистрированные в окружении инструменты агента host_exec и host_read для чтения файлов и запуска системных утилит.
Исходный текст
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