Linux Incident Response logo

Linux Incident Response

Community
ProbiusOfficial
linux-incident-response

Linux服务器应急响应处置技能(源自 NOP Team《Linux应急响应手册 v2.0.2》全量内容)。覆盖挖矿病毒、远控后门、勒索病毒、暴力破解(SSH/MySQL/FTP/Redis/MongoDB/SMTP)、非持续性恶意外连、恶意软件包供应链攻击、网络隧道七类事件处置,39项常规安全检查(history/计划任务/账户/SUID/LD_PRELOAD/PAM/内核模块/udev 等40余种权限维持后门排查)、善后定损、常见问题排障与取证小技巧。当用户报告或要求处理Linux主机被入侵、CPU异常、挖矿、勒索加密、SSH/数据库爆破、可疑外连、后门、隧道、webshell,或要求应急响应、安全检查、权限维持排查、取证分析时使用。

Overview

PublisherProbiusOfficial
Repositorylinux-ir-skill
Skill namelinux-incident-response
Stars
32
Forks
0
Bundled files
18
LicenseGPL-3.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 18 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ProbiusOfficial on GitHub. Read the source before you install it.

Installation

Install the Linux Incident Response AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ProbiusOfficial/linux-ir-skill/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ProbiusOfficial/linux-ir-skill.git \
  .claude/skills/linux-incident-response
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Linux Incident Response in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Linux Incident Response on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Linux Incident Response is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Linux 应急响应

本技能是《Linux应急响应手册 v2.0.2》(NOP Team,2025)的完整结构化版本。原PDF共483页,已按章节拆分为 references/,全部保留PDF页码,可回溯原书截图。

使用流程

  1. 判断事件类型,按下方"场景路由"读取对应参考文件(每次处理前先读 00-cheatsheet.md 中的相关命令,参考文件中有完整背景与输出示例)。
  2. 所有事件都遵循统一处置主线(见下节),场景文件只讲差异部分。
  3. 进程与文件处置完成后,必须走"善后阶段 + 常规安全检查"两步——这是本手册的核心价值:挖矿/远控等事件通常伴随多种权限维持后门,只删恶意文件不查后门必然复发。
  4. 报告结论时给出:事件定性、IOC、时间线、已处置项、遗留风险、加固建议。

场景路由

场景参考文件
命令速查(高频命令完整单行版)references/00-cheatsheet.md
任何事件开始前(物料准备、注意事项)references/01-preparation.md
挖矿病毒(CPU异常、可疑外连矿池)references/02-mining-virus.md
远控后门(EDR告警文件、外连C&C的IP:端口)references/03-backdoor.md
勒索病毒(文件被加密、勒索信)references/04-ransomware.md
暴力破解(SSH/MySQL/FTP/Redis/MongoDB/SMTP爆破告警)references/05-brute-force.md
非持续性事件(恶意外连只出现几次、抓不到进程)references/06-non-persistent.md
恶意软件包供应链攻击(apt/dnf装的包带毒)references/07-supply-chain.md
网络隧道(SSH/DNS/ICMP/HTTP/SSL/Socks/Wi-Fi隧道)references/08-tunnel.md
常规安全检查(39项权限维持排查,处置收尾必做)references/09-security-checklist.md
善后阶段(定损、横向排查、改密)references/10-aftermath.md
常见问题(文件删不掉、netstat显示-、ps看不到进程、终端乱码)references/11-troubleshooting.md
小技巧(find/grep、数据恢复、dd/clonezilla取证、CRIU、抓包)references/12-tips.md(长文,用offset/limit分段读)
知识点附录(守护进程/进程组、启动项默认情况、SSH隧道原理、对抗云函数C&C、history无记录原因)references/13-appendix.md(长文,分段读)

辅助脚本(源自原书,用前先审计内容,改好目标IP/端口再上传受害机):

  • scripts/Linux_Audit_Nop.sh — 非持续性事件:监控连接指定IP的进程并自动记录 lsof//proc 信息
  • scripts/cc_hunt.sh — 对抗云函数C&C隐藏:监听指定IP的连接方并落盘取证
  • scripts/request_monitor.sh + scripts/request_monitor.bt — bpftrace 按对端IP定位隧道/后门进程

统一处置主线

七类事件中,挖矿、远控、供应链、隧道、非持续性事件共用同一条主线,仅"定位pid"的入口不同:

梳理现场(IOC→威胁情报研判→二次核实→问历史事件)
        ↓
定位异常进程 pid ←入口因场景而异:
  挖矿:      top -c -o %CPU / ps --sort=-%cpu / nethogs
  远控:      EDR给文件→lsof /root/evil.sh;态势给IP:端口→netstat -pantu | grep IP
  隧道:      bpftrace 按对端IP定位(scripts/request_monitor.sh)
  非持续性:  /etc/hosts 重定向恶意域名 → 部署监控脚本 → 等待触发
  供应链:    已有pid → dpkg -S / yum whatprovides 定位所属包
        ↓
查进程详情:lsof -p pid;pwdx pid;systemctl status pid;ls -al /proc/pid/exe;pstree -agplU pid
        ↓
确定运行时间并对比文件时间:ps -w -eo pid,lstart,etime,cmd | grep pid;stat 文件
        ↓
采样取证(scp/nc/http服务取样本;微步、VT等沙箱分析)→ 杀进程(见下方杀进程规则)→ 删文件(见下方删文件规则)
        ↓
善后阶段(references/10-aftermath.md):定损→同密码/同漏洞/互信机器横向排查→改强密码
        ↓
常规安全检查(references/09-security-checklist.md 全部39项):找出隐藏后门,防复发

杀进程规则

bash
ps -w ajfx                # 先看有无子进程(PPID/PID/PGID/SID)
kill -9 <pid>             # 无子进程
kill -9 -- -<PGID>        # 有子进程:按进程组杀,pid前有减号
sudo kill -9 -- -<PGID>   # sudo 下必须加 -- 分隔,否则按pid处理会失效
sudo pkill -g <PGID>      # 等效替代

有守护进程的恶意程序先杀守护进程。线程级注入(附在正常业务进程里的恶意线程)慎杀——极易把业务进程搞崩,须先与客户确认。

删文件规则(按顺序排查删不掉的原因)

  1. lsof evil.sh 看占用——占用进程本身可能就是恶意进程;
  2. lsattr 查隐藏属性 a/i → chattr -a/-i;
  3. 乱码文件名 → ls -li 取 inode → find ./* -inum <inode> -exec rm -f {} \;;
  4. Device or resource busy → sudo lsblk -a 查挂载点 → umount 后再删;
  5. rm ./* 不会删除以 . 开头的隐藏文件,删除时必须显式处理。

关键排障(排查过程卡住时读 references/11-troubleshooting.md)

  • netstat -pantu 的 pid 显示 - → /proc/PID 被 bind-mount 隐藏:cat /proc/$$/mountinfo → umount /proc/PID;
  • ps/top 看不到恶意进程 → 同上,或 ps/top 被替换(完整性检查 + busybox),或 LD_PRELOAD 劫持(查 /etc/ld.so.preload,用 busybox top);
  • 终端乱码 → 盲打 reset / stty sane / echo -e '\033c'。

检查时的注意事项

  • 计划任务等配置文件用 vim 打开看,cat 会被特殊字符截断导致看不全(持久化后门常藏在被截断部分之后)。
  • history 缺失有6种原因(清空/空格前缀/SSH异常断开/远程执行/HISTSIZE=0等),见 13-appendix.md §0x06,不能因 history 干净而排除入侵。
  • 威胁情报平台:微步在线、Virustotal、360/安恒/绿盟/腾讯/安天威胁情报中心、AlienVault 等;沙箱:微步云沙箱、哈勃、奇安信情报沙箱、魔盾、360沙箱云等。
  • 勒索病毒解密渠道:No More Ransom、ID Ransomware、各厂商解密工具(见 04-ransomware.md);拿到解密工具先备份再解密,防二次加密。
  • Redis 默认日志级别(notice)不记录登录和指令,无法凭日志判断是否被爆破,需看网络连接(05-brute-force.md §Redis)。
  • 长参考文件(09/12/13)超过2000行,用 Read 的 offset/limit 分段读取。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Linux Incident Response AI skill do?

Linux服务器应急响应处置技能(源自 NOP Team《Linux应急响应手册 v2.0.2》全量内容)。覆盖挖矿病毒、远控后门、勒索病毒、暴力破解(SSH/MySQL/FTP/Redis/MongoDB/SMTP)、非持续性恶意外连、恶意软件包供应链攻击、网络隧道七类事件处置,39项常规安全检查(history/计划任务/账户/SUID/LD_PRELOAD/PAM/内核模块/udev 等40余种权限维持后门排查)、善后定损、常见问题排障与取证小技巧。当用户报告或要求处理Linux主机被入侵、CPU异常、挖矿、勒索加密、SSH/数据库爆破、可疑外连、后门、隧道、webshell,或要求应急响应、安全检查、权限维持排查、取证分析时使用。

Why use Linux Incident Response on TypingMind?

Because you install it once and use it with any model. Linux Incident Response is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Linux Incident Response in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ProbiusOfficial/linux-ir-skill/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Linux Incident Response?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Linux Incident Response?

As many as you like. As long as a model supports skills, you can use Linux Incident Response with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Linux Incident Response AI skill free?

Yes. It is published on GitHub by ProbiusOfficial under the GPL-3.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇