[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75KNST425RHD2MMYP8A5H3P":3,"skill-same:01M75KNST425RHD2MMYP8A5H3P":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":32,"ownerDescription":33,"updatedAt":34,"install":35,"resources":48},"01M75KNST425RHD2MMYP8A5H3P","sys-guard-linux-remediator",null,"Host-based Linux incident response and remediation skill focused on precise threat detection, forensic-safe data collection, firewall control (iptables\u002Fnftables), integrity validation, and controlled remediation while preserving system stability.","javimosch\u002Fopen-claw-skills","javimosch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F12900508?v=4","01M6D3F2AS6PV75ET9PZ1QGP8J","Javier Leandro Arancibia","01M75B8NCTAJG9WH5YNZH7C3D8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkiaraho\u002Fsys-guard-linux-remediator\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: sys-guard-linux-remediator\ndescription: Host-based Linux incident response and remediation skill focused on precise threat detection, forensic-safe data collection, firewall control (iptables\u002Fnftables), integrity validation, and controlled remediation while preserving system stability.\nmetadata:\n  author: Edwin Kairu (ekairu@cmu.edu)\n---\n\n# Linux Threat Mitigation and Incident Remediation (Hardened Edition)\n\nThis skill provides a structured, forensically-aware framework for analyzing and securing a Linux host during or after a security event.\n\nIt emphasizes:\n\n- Non-destructive evidence collection\n- Accurate threat detection\n- Firewall-aware containment\n- Integrity verification\n- Controlled, reversible remediation\n- Distribution-aware command usage\n\n---\n\n# Environment Context\n\n## Supported Systems\n\n- Debian \u002F Ubuntu\n- RHEL \u002F CentOS \u002F Rocky \u002F Alma\n- Fedora\n- Arch Linux (limited package guidance)\n\n## Execution Assumptions\n\n- Shell: `bash` or POSIX `sh`\n- Privilege: Root or sudo\n- Host-level access (NOT container-restricted environments)\n- systemd-based systems preferred\n\n> ⚠️ If running inside Docker, Kubernetes, LXC, or other containers, firewall, audit, and service commands may not reflect the host system.\n\n---\n\n# Firewall Architecture Awareness\n\nModern Linux systems may use:\n\n- `iptables-legacy`\n- `iptables-nft` (compatibility wrapper)\n- Native `nftables`\n- `firewalld` (RHEL-family default)\n\n## Identify Firewall Backend\n\n```bash\niptables --version\nwhich nft\nsystemctl status firewalld\n```\n\nIf nftables is active:\n\n```bash\nnft list ruleset\n```\n\nDo NOT assume `iptables -L` represents the full firewall state.\n\n---\n\n# Logging Differences by Distribution\n\n| Distribution | Primary Log File |\n|--------------|------------------|\n| Ubuntu\u002FDebian | `\u002Fvar\u002Flog\u002Fsyslog` |\n| RHEL\u002FCentOS\u002FFedora | `\u002Fvar\u002Flog\u002Fmessages` |\n| All modern systemd | `journalctl` |\n\nAlways prefer:\n\n```bash\njournalctl -xe\n```\n\n---\n\n# Operational Toolkit (Hardened)\n\n## 1. Network Inspection\n\n### Listening Services\n```bash\nss -tulpn\n```\n\n### Active Connections\n```bash\nss -antp | grep ESTABLISHED\n```\n\n### Firewall State\n\n#### iptables\n```bash\niptables -L -n -v --line-numbers\niptables -S\n```\n\n#### nftables\n```bash\nnft list ruleset\n```\n\n### Local Service Enumeration (Low Noise)\n```bash\nss -lntup\n```\n\nAvoid unnecessary full scans of localhost unless required.\n\n### Conservative Network Scan\n```bash\nnmap -sV -T3 -p- localhost\n```\n\n### Packet Capture (Short Snapshot)\n```bash\ntcpdump -i any -nn -c 100\n```\n\n---\n\n## 2. Process & Runtime Analysis\n\n### Process Tree\n```bash\nps auxww --forest\n```\n\n### High CPU \u002F Memory\n```bash\ntop\n```\n\n### Open File Handles\n```bash\nlsof -p \u003CPID>\n```\n\n### System Call Trace (Caution: Alters Timing)\n```bash\nstrace -p \u003CPID>\n```\n\n> ⚠️ `strace` may change process behavior. Use carefully during live compromise.\n\n### Kernel Modules\n```bash\nlsmod\n```\n\n### Kernel Messages\n```bash\ndmesg | tail -50\n```\n\n---\n\n## 3. Rootkit & Malware Scanning\n\n### Rootkit Scanners\n```bash\nrkhunter --check\nchkrootkit\n```\n\n> May produce false positives. Validate findings manually.\n\n### Antivirus Scan (Targeted)\n```bash\nclamscan -r \u002Fhome\n```\n\nUse selectively; large scans increase I\u002FO and may alter access timestamps.\n\n### Lynis System Audit\n```bash\nlynis audit system\n```\n\n---\n\n## 4. File Integrity & Package Verification\n\n### AIDE (After Initialization)\n\nInstall:\n```bash\napt install aide\n# or\ndnf install aide\n```\n\nInitialize:\n```bash\naideinit\nmv \u002Fvar\u002Flib\u002Faide\u002Faide.db.new.gz \u002Fvar\u002Flib\u002Faide\u002Faide.db.gz\n```\n\nRun Check:\n```bash\naide --check\n```\n\n### RHEL Package Verification\n```bash\nrpm -Va\n```\n\n### Debian Package Verification\n```bash\napt install debsums\ndebsums -s\n```\n\n---\n\n## 5. Forensic Analysis (Didier Stevens Suite)\n\nInstall:\n\n```bash\nsudo mkdir -p \u002Fopt\u002Fforensics\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Fbase64dump.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Fre-search.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Fzipdump.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002F1768.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Fpdf-parser.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Foledump.py\nsudo chmod +x \u002Fopt\u002Fforensics\u002F*.py\n```\n\n### Decode Base64\n```bash\npython3 \u002Fopt\u002Fforensics\u002Fbase64dump.py file.txt\n```\n\n### IOC Search\n```bash\npython3 \u002Fopt\u002Fforensics\u002Fre-search.py -n ipv4 logfile\n```\n\n### Inspect ZIP (No Extraction)\n```bash\npython3 \u002Fopt\u002Fforensics\u002Fzipdump.py suspicious.zip\n```\n\n### Extract Cobalt Strike Beacon Config\n```bash\npython3 \u002Fopt\u002Fforensics\u002F1768.py payload.bin\n```\n\n### Inspect Office\u002FPDF Documents\n```bash\npython3 \u002Fopt\u002Fforensics\u002Fpdf-parser.py file.pdf\npython3 \u002Fopt\u002Fforensics\u002Foledump.py file.doc\n```\n\n> Static inspection only. Never execute suspicious files.\n\n---\n\n## 6. Authentication & User Activity\n\n### Current Sessions\n```bash\nwho -a\n```\n\n### Login History\n```bash\nlast -a\n```\n\n### Failed SSH Logins\n\nUbuntu\u002FDebian:\n```bash\njournalctl -u ssh.service | grep \"Failed password\"\n```\n\nRHEL\u002FFedora:\n```bash\njournalctl -u sshd.service | grep \"Failed password\"\n```\n\n### Sudo Activity\n```bash\njournalctl _COMM=sudo\n```\n\n### Audit Logs\n```bash\nausearch -m USER_AUTH,USER_LOGIN,USER_CHAUTHTOK\n```\n\n---\n\n# Controlled Remediation\n\n## Blocking an IP\n\n### iptables (Immediate)\n```bash\niptables -I INPUT 1 -s \u003CIP> -j DROP\n```\n\n### nftables\n```bash\nnft add rule inet filter input ip saddr \u003CIP> drop\n```\n\nIf firewalld is active:\n```bash\nfirewall-cmd --add-rich-rule='rule family=\"ipv4\" source address=\"\u003CIP>\" drop'\n```\n\n---\n\n## Persisting Firewall Rules\n\niptables (Debian):\n```bash\nnetfilter-persistent save\n```\n\niptables (manual save):\n```bash\niptables-save > \u002Fetc\u002Fiptables\u002Frules.v4\n```\n\nfirewalld:\n```bash\nfirewall-cmd --runtime-to-permanent\n```\n\nnftables:\n```bash\nnft list ruleset > \u002Fetc\u002Fnftables.conf\n```\n\n---\n\n## Process Containment Strategy\n\nPreferred escalation:\n\n1. Observe\n2. `kill -TERM \u003CPID>`\n3. If required: `kill -STOP \u003CPID>` for analysis\n4. Use `kill -KILL \u003CPID>` only if necessary\n\nAvoid `killall` or broad `pkill`.\n\n---\n\n## Service Isolation\n\n```bash\nsystemctl stop \u003Cservice>\nsystemctl disable \u003Cservice>\nsystemctl mask \u003Cservice>\n```\n\n---\n\n# Persistence & Backdoor Checks\n\n### Cron Jobs\n```bash\ncrontab -l\nls -lah \u002Fetc\u002Fcron*\n```\n\n### Systemd Persistence\n```bash\nls -lah \u002Fetc\u002Fsystemd\u002Fsystem\u002F\n```\n\n### Startup Scripts\n```bash\ncat \u002Fetc\u002Frc.local\n```\n\n---\n\n# SELinux Awareness (RHEL\u002FFedora)\n\nCheck status:\n```bash\ngetenforce\n```\n\nReview denials:\n```bash\nausearch -m AVC\n```\n\n---\n\n# Forensic Hygiene\n\n1. Never execute suspicious binaries.\n2. Preserve evidence before deletion:\n\n```bash\nsha256sum file\nmkdir -p \u002Froot\u002Fquarantine\nmv file \u002Froot\u002Fquarantine\u002Ffile.vir\n```\n\n3. Log every remediation step:\n\n```bash\ndate -u\n```\n\nDocument:\n- Timestamp\n- Command executed\n- Observed outcome\n\n---\n\n# Usage Examples\n\n## Routine Audit\n\n- Run `lynis audit system`\n- Verify no unknown listening services\n- Check for modified system binaries\n\n## Active Threat\n\n- Identify high CPU process\n- Capture short `tcpdump`\n- Extract file hash\n- Contain IP via firewall\n- Preserve malicious artifact\n\n## Suspicious File\n\n- Use `zipdump`\n- Extract hash\n- Move to quarantine\n- Search logs for execution attempts\n\n---\n\n# Safety Guardrails\n\nThese guardrails are mandatory and apply to all remediation activity. Their purpose is to prevent self-inflicted outages, preserve forensic integrity, and ensure reversible, controlled incident response.\n\n---\n\n## 1. State Verification (Pre- and Post-Change Validation)\n\nBefore executing any remediation command:\n\n1. Record timestamp (UTC):\n   ```bash\n   date -u\n   ```\n\n2. Run a discovery command to capture current state:\n   - Network: `ss -tulpn`\n   - Active connections: `ss -antp`\n   - Firewall (iptables): `iptables -L -n -v`\n   - Firewall (nftables): `nft list ruleset`\n   - firewalld: `firewall-cmd --list-all`\n\nAfter remediation:\n\n3. Re-run the same discovery command.\n4. Compare state change and confirm:\n   - Intended effect achieved\n   - No unintended service disruption\n   - No management lockout (e.g., SSH access intact)\n\nNever assume a command succeeded without verifying its effect.\n\n---\n\n## 2. No Wildcards or Broad Termination\n\nTo prevent catastrophic system damage:\n\n- NEVER use:\n  - `rm -rf *`\n  - `rm -rf \u002F`\n  - `killall`\n  - Broad `pkill` patterns\n  - Unbounded globbing in sensitive directories\n\n- Always:\n  - Use absolute file paths (e.g., `\u002Ftmp\u002Fmalware.bin`)\n  - Target explicit PIDs (`kill -TERM \u003CPID>`)\n  - Confirm file existence with `ls -lah \u003Cfile>`\n  - Hash suspicious files before modification:\n    ```bash\n    sha256sum \u003Cfile>\n    ```\n\nWildcard deletions and pattern-based termination are prohibited during incident response.\n\n---\n\n## 3. Persistence & Re-Spawn Inspection\n\nAfter containment of a malicious process or service, immediately inspect for persistence mechanisms.\n\n### Check:\n\n#### Cron Jobs\n```bash\ncrontab -l\nls -lah \u002Fetc\u002Fcron*\n```\n\n#### systemd Services & Timers\n```bash\nsystemctl list-unit-files --type=service\nsystemctl list-timers --all\nls -lah \u002Fetc\u002Fsystemd\u002Fsystem\u002F\n```\n\n#### Init Scripts\n```bash\nls -lah \u002Fetc\u002Finit.d\u002F\ncat \u002Fetc\u002Frc.local\n```\n\n#### User-Level Persistence\n```bash\nls -lah ~\u002F.config\u002Fsystemd\u002Fuser\u002F\n```\n\n#### SSH Backdoors\n```bash\ncat ~\u002F.ssh\u002Fauthorized_keys\n```\n\nAfter removal of malicious artifacts:\n\n- Run integrity verification:\n  ```bash\n  aide --check\n  ```\n- On RHEL-based systems:\n  ```bash\n  rpm -Va\n  ```\n- On Debian-based systems:\n  ```bash\n  debsums -s\n  ```\n\nDo not consider a threat eradicated until persistence mechanisms are eliminated.\n\n---\n\n## 4. Firewall Rule Safety & Persistence\n\n### A. Anti-Lockout Requirement\n\nBefore modifying firewall rules:\n\n1. Confirm SSH listening port:\n   ```bash\n   ss -tulpn | grep ssh\n   ```\n\n2. Confirm an explicit ACCEPT rule exists for:\n   - Current management IP\n   - SSH port\n\nNEVER:\n```bash\niptables -F\n```\n\nNEVER set a default DROP policy without verifying SSH access rule exists.\n\n---\n\n### B. Immediate vs Persistent Rules\n\nFirewall rule changes are runtime by default and may not survive reboot.\n\n#### iptables (Debian\u002FUbuntu)\nRuntime only until saved:\n```bash\niptables-save > \u002Fetc\u002Fiptables\u002Frules.v4\n```\n\nIf using netfilter-persistent:\n```bash\nnetfilter-persistent save\n```\n\n#### RHEL (legacy iptables service)\n```bash\nservice iptables save\n```\n\n#### firewalld\nRuntime-to-permanent:\n```bash\nfirewall-cmd --runtime-to-permanent\n```\n\n#### nftables\nPersist ruleset:\n```bash\nnft list ruleset > \u002Fetc\u002Fnftables.conf\n```\n\nDocument:\n- Whether rule is temporary or permanent\n- Location of saved configuration\n- Verification after reboot (if applicable)\n\n---\n\n## 5. Forensic Preservation Before Destruction\n\nBefore deleting or killing:\n\n1. Hash the artifact:\n   ```bash\n   sha256sum \u003Cfile>\n   ```\n\n2. Move to quarantine:\n   ```bash\n   mkdir -p \u002Froot\u002Fquarantine\n   mv \u003Cfile> \u002Froot\u002Fquarantine\u002F\u003Cfile>.vir\n   ```\n\n3. Record:\n   - Timestamp (UTC)\n   - Original path\n   - Hash value\n   - Reason for containment\n\nAvoid `kill -9` unless absolutely required. Prefer:\n\n1. `kill -TERM \u003CPID>`\n2. `kill -STOP \u003CPID>` (if forensic inspection needed)\n3. `kill -KILL \u003CPID>` only as last resort\n\n---\n\n## 6. Change Logging Requirement\n\nEvery remediation action must include:\n\n- `date -u`\n- Command executed\n- Justification\n- Observed outcome\n- Updated risk level (if applicable)\n\nRemediation without documentation is non-compliant.\n\n---\n\n## 7. Minimal-Impact Principle\n\nAll actions must follow:\n\n- Smallest necessary change\n- Reversible where possible\n- No broad configuration resets\n- No service restarts without justification\n- No system-wide scans during active compromise unless scoped\n\nContain first. Eradicate methodically. Recover cautiously.\n\n","# Linux Threat Mitigation and Incident Remediation (Hardened Edition)\n\nThis skill provides a structured, forensically-aware framework for analyzing and securing a Linux host during or after a security event.\n\nIt emphasizes:\n\n- Non-destructive evidence collection\n- Accurate threat detection\n- Firewall-aware containment\n- Integrity verification\n- Controlled, reversible remediation\n- Distribution-aware command usage\n\n---\n\n# Environment Context\n\n## Supported Systems\n\n- Debian \u002F Ubuntu\n- RHEL \u002F CentOS \u002F Rocky \u002F Alma\n- Fedora\n- Arch Linux (limited package guidance)\n\n## Execution Assumptions\n\n- Shell: `bash` or POSIX `sh`\n- Privilege: Root or sudo\n- Host-level access (NOT container-restricted environments)\n- systemd-based systems preferred\n\n> ⚠️ If running inside Docker, Kubernetes, LXC, or other containers, firewall, audit, and service commands may not reflect the host system.\n\n---\n\n# Firewall Architecture Awareness\n\nModern Linux systems may use:\n\n- `iptables-legacy`\n- `iptables-nft` (compatibility wrapper)\n- Native `nftables`\n- `firewalld` (RHEL-family default)\n\n## Identify Firewall Backend\n\n```bash\niptables --version\nwhich nft\nsystemctl status firewalld\n```\n\nIf nftables is active:\n\n```bash\nnft list ruleset\n```\n\nDo NOT assume `iptables -L` represents the full firewall state.\n\n---\n\n# Logging Differences by Distribution\n\n| Distribution | Primary Log File |\n|--------------|------------------|\n| Ubuntu\u002FDebian | `\u002Fvar\u002Flog\u002Fsyslog` |\n| RHEL\u002FCentOS\u002FFedora | `\u002Fvar\u002Flog\u002Fmessages` |\n| All modern systemd | `journalctl` |\n\nAlways prefer:\n\n```bash\njournalctl -xe\n```\n\n---\n\n# Operational Toolkit (Hardened)\n\n## 1. Network Inspection\n\n### Listening Services\n```bash\nss -tulpn\n```\n\n### Active Connections\n```bash\nss -antp | grep ESTABLISHED\n```\n\n### Firewall State\n\n#### iptables\n```bash\niptables -L -n -v --line-numbers\niptables -S\n```\n\n#### nftables\n```bash\nnft list ruleset\n```\n\n### Local Service Enumeration (Low Noise)\n```bash\nss -lntup\n```\n\nAvoid unnecessary full scans of localhost unless required.\n\n### Conservative Network Scan\n```bash\nnmap -sV -T3 -p- localhost\n```\n\n### Packet Capture (Short Snapshot)\n```bash\ntcpdump -i any -nn -c 100\n```\n\n---\n\n## 2. Process & Runtime Analysis\n\n### Process Tree\n```bash\nps auxww --forest\n```\n\n### High CPU \u002F Memory\n```bash\ntop\n```\n\n### Open File Handles\n```bash\nlsof -p \u003CPID>\n```\n\n### System Call Trace (Caution: Alters Timing)\n```bash\nstrace -p \u003CPID>\n```\n\n> ⚠️ `strace` may change process behavior. Use carefully during live compromise.\n\n### Kernel Modules\n```bash\nlsmod\n```\n\n### Kernel Messages\n```bash\ndmesg | tail -50\n```\n\n---\n\n## 3. Rootkit & Malware Scanning\n\n### Rootkit Scanners\n```bash\nrkhunter --check\nchkrootkit\n```\n\n> May produce false positives. Validate findings manually.\n\n### Antivirus Scan (Targeted)\n```bash\nclamscan -r \u002Fhome\n```\n\nUse selectively; large scans increase I\u002FO and may alter access timestamps.\n\n### Lynis System Audit\n```bash\nlynis audit system\n```\n\n---\n\n## 4. File Integrity & Package Verification\n\n### AIDE (After Initialization)\n\nInstall:\n```bash\napt install aide\n# or\ndnf install aide\n```\n\nInitialize:\n```bash\naideinit\nmv \u002Fvar\u002Flib\u002Faide\u002Faide.db.new.gz \u002Fvar\u002Flib\u002Faide\u002Faide.db.gz\n```\n\nRun Check:\n```bash\naide --check\n```\n\n### RHEL Package Verification\n```bash\nrpm -Va\n```\n\n### Debian Package Verification\n```bash\napt install debsums\ndebsums -s\n```\n\n---\n\n## 5. Forensic Analysis (Didier Stevens Suite)\n\nInstall:\n\n```bash\nsudo mkdir -p \u002Fopt\u002Fforensics\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Fbase64dump.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Fre-search.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Fzipdump.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002F1768.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Fpdf-parser.py\nsudo wget -P \u002Fopt\u002Fforensics https:\u002F\u002Fraw.githubusercontent.com\u002FDidierStevens\u002FDidierStevensSuite\u002Fmaster\u002Foledump.py\nsudo chmod +x \u002Fopt\u002Fforensics\u002F*.py\n```\n\n### Decode Base64\n```bash\npython3 \u002Fopt\u002Fforensics\u002Fbase64dump.py file.txt\n```\n\n### IOC Search\n```bash\npython3 \u002Fopt\u002Fforensics\u002Fre-search.py -n ipv4 logfile\n```\n\n### Inspect ZIP (No Extraction)\n```bash\npython3 \u002Fopt\u002Fforensics\u002Fzipdump.py suspicious.zip\n```\n\n### Extract Cobalt Strike Beacon Config\n```bash\npython3 \u002Fopt\u002Fforensics\u002F1768.py payload.bin\n```\n\n### Inspect Office\u002FPDF Documents\n```bash\npython3 \u002Fopt\u002Fforensics\u002Fpdf-parser.py file.pdf\npython3 \u002Fopt\u002Fforensics\u002Foledump.py file.doc\n```\n\n> Static inspection only. Never execute suspicious files.\n\n---\n\n## 6. Authentication & User Activity\n\n### Current Sessions\n```bash\nwho -a\n```\n\n### Login History\n```bash\nlast -a\n```\n\n### Failed SSH Logins\n\nUbuntu\u002FDebian:\n```bash\njournalctl -u ssh.service | grep \"Failed password\"\n```\n\nRHEL\u002FFedora:\n```bash\njournalctl -u sshd.service | grep \"Failed password\"\n```\n\n### Sudo Activity\n```bash\njournalctl _COMM=sudo\n```\n\n### Audit Logs\n```bash\nausearch -m USER_AUTH,USER_LOGIN,USER_CHAUTHTOK\n```\n\n---\n\n# Controlled Remediation\n\n## Blocking an IP\n\n### iptables (Immediate)\n```bash\niptables -I INPUT 1 -s \u003CIP> -j DROP\n```\n\n### nftables\n```bash\nnft add rule inet filter input ip saddr \u003CIP> drop\n```\n\nIf firewalld is active:\n```bash\nfirewall-cmd --add-rich-rule='rule family=\"ipv4\" source address=\"\u003CIP>\" drop'\n```\n\n---\n\n## Persisting Firewall Rules\n\niptables (Debian):\n```bash\nnetfilter-persistent save\n```\n\niptables (manual save):\n```bash\niptables-save > \u002Fetc\u002Fiptables\u002Frules.v4\n```\n\nfirewalld:\n```bash\nfirewall-cmd --runtime-to-permanent\n```\n\nnftables:\n```bash\nnft list ruleset > \u002Fetc\u002Fnftables.conf\n```\n\n---\n\n## Process Containment Strategy\n\nPreferred escalation:\n\n1. Observe\n2. `kill -TERM \u003CPID>`\n3. If required: `kill -STOP \u003CPID>` for analysis\n4. Use `kill -KILL \u003CPID>` only if necessary\n\nAvoid `killall` or broad `pkill`.\n\n---\n\n## Service Isolation\n\n```bash\nsystemctl stop \u003Cservice>\nsystemctl disable \u003Cservice>\nsystemctl mask \u003Cservice>\n```\n\n---\n\n# Persistence & Backdoor Checks\n\n### Cron Jobs\n```bash\ncrontab -l\nls -lah \u002Fetc\u002Fcron*\n```\n\n### Systemd Persistence\n```bash\nls -lah \u002Fetc\u002Fsystemd\u002Fsystem\u002F\n```\n\n### Startup Scripts\n```bash\ncat \u002Fetc\u002Frc.local\n```\n\n---\n\n# SELinux Awareness (RHEL\u002FFedora)\n\nCheck status:\n```bash\ngetenforce\n```\n\nReview denials:\n```bash\nausearch -m AVC\n```\n\n---\n\n# Forensic Hygiene\n\n1. Never execute suspicious binaries.\n2. Preserve evidence before deletion:\n\n```bash\nsha256sum file\nmkdir -p \u002Froot\u002Fquarantine\nmv file \u002Froot\u002Fquarantine\u002Ffile.vir\n```\n\n3. Log every remediation step:\n\n```bash\ndate -u\n```\n\nDocument:\n- Timestamp\n- Command executed\n- Observed outcome\n\n---\n\n# Usage Examples\n\n## Routine Audit\n\n- Run `lynis audit system`\n- Verify no unknown listening services\n- Check for modified system binaries\n\n## Active Threat\n\n- Identify high CPU process\n- Capture short `tcpdump`\n- Extract file hash\n- Contain IP via firewall\n- Preserve malicious artifact\n\n## Suspicious File\n\n- Use `zipdump`\n- Extract hash\n- Move to quarantine\n- Search logs for execution attempts\n\n---\n\n# Safety Guardrails\n\nThese guardrails are mandatory and apply to all remediation activity. Their purpose is to prevent self-inflicted outages, preserve forensic integrity, and ensure reversible, controlled incident response.\n\n---\n\n## 1. State Verification (Pre- and Post-Change Validation)\n\nBefore executing any remediation command:\n\n1. Record timestamp (UTC):\n   ```bash\n   date -u\n   ```\n\n2. Run a discovery command to capture current state:\n   - Network: `ss -tulpn`\n   - Active connections: `ss -antp`\n   - Firewall (iptables): `iptables -L -n -v`\n   - Firewall (nftables): `nft list ruleset`\n   - firewalld: `firewall-cmd --list-all`\n\nAfter remediation:\n\n3. Re-run the same discovery command.\n4. Compare state change and confirm:\n   - Intended effect achieved\n   - No unintended service disruption\n   - No management lockout (e.g., SSH access intact)\n\nNever assume a command succeeded without verifying its effect.\n\n---\n\n## 2. No Wildcards or Broad Termination\n\nTo prevent catastrophic system damage:\n\n- NEVER use:\n  - `rm -rf *`\n  - `rm -rf \u002F`\n  - `killall`\n  - Broad `pkill` patterns\n  - Unbounded globbing in sensitive directories\n\n- Always:\n  - Use absolute file paths (e.g., `\u002Ftmp\u002Fmalware.bin`)\n  - Target explicit PIDs (`kill -TERM \u003CPID>`)\n  - Confirm file existence with `ls -lah \u003Cfile>`\n  - Hash suspicious files before modification:\n    ```bash\n    sha256sum \u003Cfile>\n    ```\n\nWildcard deletions and pattern-based termination are prohibited during incident response.\n\n---\n\n## 3. Persistence & Re-Spawn Inspection\n\nAfter containment of a malicious process or service, immediately inspect for persistence mechanisms.\n\n### Check:\n\n#### Cron Jobs\n```bash\ncrontab -l\nls -lah \u002Fetc\u002Fcron*\n```\n\n#### systemd Services & Timers\n```bash\nsystemctl list-unit-files --type=service\nsystemctl list-timers --all\nls -lah \u002Fetc\u002Fsystemd\u002Fsystem\u002F\n```\n\n#### Init Scripts\n```bash\nls -lah \u002Fetc\u002Finit.d\u002F\ncat \u002Fetc\u002Frc.local\n```\n\n#### User-Level Persistence\n```bash\nls -lah ~\u002F.config\u002Fsystemd\u002Fuser\u002F\n```\n\n#### SSH Backdoors\n```bash\ncat ~\u002F.ssh\u002Fauthorized_keys\n```\n\nAfter removal of malicious artifacts:\n\n- Run integrity verification:\n  ```bash\n  aide --check\n  ```\n- On RHEL-based systems:\n  ```bash\n  rpm -Va\n  ```\n- On Debian-based systems:\n  ```bash\n  debsums -s\n  ```\n\nDo not consider a threat eradicated until persistence mechanisms are eliminated.\n\n---\n\n## 4. Firewall Rule Safety & Persistence\n\n### A. Anti-Lockout Requirement\n\nBefore modifying firewall rules:\n\n1. Confirm SSH listening port:\n   ```bash\n   ss -tulpn | grep ssh\n   ```\n\n2. Confirm an explicit ACCEPT rule exists for:\n   - Current management IP\n   - SSH port\n\nNEVER:\n```bash\niptables -F\n```\n\nNEVER set a default DROP policy without verifying SSH access rule exists.\n\n---\n\n### B. Immediate vs Persistent Rules\n\nFirewall rule changes are runtime by default and may not survive reboot.\n\n#### iptables (Debian\u002FUbuntu)\nRuntime only until saved:\n```bash\niptables-save > \u002Fetc\u002Fiptables\u002Frules.v4\n```\n\nIf using netfilter-persistent:\n```bash\nnetfilter-persistent save\n```\n\n#### RHEL (legacy iptables service)\n```bash\nservice iptables save\n```\n\n#### firewalld\nRuntime-to-permanent:\n```bash\nfirewall-cmd --runtime-to-permanent\n```\n\n#### nftables\nPersist ruleset:\n```bash\nnft list ruleset > \u002Fetc\u002Fnftables.conf\n```\n\nDocument:\n- Whether rule is temporary or permanent\n- Location of saved configuration\n- Verification after reboot (if applicable)\n\n---\n\n## 5. Forensic Preservation Before Destruction\n\nBefore deleting or killing:\n\n1. Hash the artifact:\n   ```bash\n   sha256sum \u003Cfile>\n   ```\n\n2. Move to quarantine:\n   ```bash\n   mkdir -p \u002Froot\u002Fquarantine\n   mv \u003Cfile> \u002Froot\u002Fquarantine\u002F\u003Cfile>.vir\n   ```\n\n3. Record:\n   - Timestamp (UTC)\n   - Original path\n   - Hash value\n   - Reason for containment\n\nAvoid `kill -9` unless absolutely required. Prefer:\n\n1. `kill -TERM \u003CPID>`\n2. `kill -STOP \u003CPID>` (if forensic inspection needed)\n3. `kill -KILL \u003CPID>` only as last resort\n\n---\n\n## 6. Change Logging Requirement\n\nEvery remediation action must include:\n\n- `date -u`\n- Command executed\n- Justification\n- Observed outcome\n- Updated risk level (if applicable)\n\nRemediation without documentation is non-compliant.\n\n---\n\n## 7. Minimal-Impact Principle\n\nAll actions must follow:\n\n- Smallest necessary change\n- Reversible where possible\n- No broad configuration resets\n- No service restarts without justification\n- No system-wide scans during active compromise unless scoped\n\nContain first. Eradicate methodically. Recover cautiously.\n\n",{"name":5,"metadata":24,"description":7},{"author":25},"Edwin Kairu (ekairu@cmu.edu)","main","f9d3fe7cf9ac8f1ea63a0d96e98e1f510a3814db","skills\u002Fkiaraho\u002Fsys-guard-linux-remediator",1,"https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills","https:\u002F\u002Fgithub.com\u002Fjavimosch","intrane.fr","Building robust, open-source infrastructure for the commons. AI-leveraged, self-hosted, built to last.","2026-06-07 03:34:58",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add javimosch\u002Fopen-claw-skills --skill sys-guard-linux-remediator",{"tool":41,"command":42},"bunx","bunx skills add javimosch\u002Fopen-claw-skills --skill sys-guard-linux-remediator",{"tool":44,"command":45},"pnpm","pnpm dlx skills add javimosch\u002Fopen-claw-skills --skill sys-guard-linux-remediator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fkiaraho\u002Fsys-guard-linux-remediator\u002FSKILL.md",true,[],[50,58,65,72,79,86],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":57},"01M778GGXG2VQ0YF31W2MKGMQZ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":57},"01M778G7BH8SBJ9FJ6C3G7CB1K","ceaser","Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp \u003Csubcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir\u002FUltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyra-v21\u002Fceaser\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":57},"01M778FYCJQZWFKKX5FYMK3S47","ceaser-send","Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp \u003Csubcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir\u002FUltraHonk zero-knowledge proofs.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyra-v21\u002Fceaser-send\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":57},"01M778FQQNSEYA3HJKZBPQ4M9Z","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":57},"01M778FGVZX7QA2TF9BFMM37FY","moldium","Post and manage content on the Moldium blog platform. Triggered by \"post to Moldium\", \"write a blog post\", \"publish an article\", etc.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzyom45\u002Fmoldium\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":57},"01M778F88D8PQ9MQ0KNW2TJ8ZH","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http:\u002F\u002Fweakaccept.top:8000\u002F.","https:\u002F\u002Fgithub.com\u002Fjavimosch\u002Fopen-claw-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[]]