Skip to main content
skill CX Codex

analyzing-linux-kernel-rootkits — Claude Code skill

This skill looks for kernel-level rootkits in Linux memory dumps and live systems. Use it during incident investigations and digital forensics.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-linux-kernel-rootkits -a claude-code
Open on GitHub

What analyzing-linux-kernel-rootkits does

The skill examines a Linux physical memory dump with Volatility3 plugins: linux.check_syscall, linux.lsmod, linux.hidden_modules, and linux.check_idt. These checks look for syscall table hooks, hidden kernel modules, changed IDT entries, and other signs of tampering. Findings are collected in a JSON report.

It also compares module views from /proc/modules, lsmod, and /sys/module. Live checks with rkhunter and chkrootkit cover known rootkit signatures, suspicious files, and modified system binaries. Before starting, prepare Volatility3, a Linux memory dump, an ISF symbol table matching the target kernel version, and a known-good kernel image. Check the kernel and ISF versions first; a mismatch can make the Volatility3 results unusable.

What it helps with

  • find hooked system calls in a memory dump
  • detect kernel modules hidden from one system view
  • compare module lists from /proc, lsmod, and /sys
  • scan a live system for rootkit signatures and altered binaries
  • produce a JSON report of rootkit artifacts

Example prompts for the agent

  • Analyze /evidence/linux-mem.lime with the Volatility3 plugins and look for syscall hooks, hidden modules, and modified IDT entries.
  • Compare /proc/modules, lsmod, and /sys/module, then run checks with rkhunter and chkrootkit.
  • Create a JSON report of the Linux rootkit artifacts and explain which checks produced discrepancies.

How to install analyzing-linux-kernel-rootkits

1Skills CLI (Vercel)

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-linux-kernel-rootkits -a claude-code

2Manually: put the files in place

~/.claude/skills/analyzing-linux-kernel-rootkits/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/analyzing-linux-kernel-rootkits/

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

Questions about analyzing-linux-kernel-rootkits

How do I install analyzing-linux-kernel-rootkits in Claude Code?

Run npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-linux-kernel-rootkits -a claude-code, then run the same command again. Check ~/.claude/skills/analyzing-linux-kernel-rootkits/SKILL.md afterward.

What does analyzing-linux-kernel-rootkits do?

It analyzes Linux memory dumps with Volatility3, compares module views in /proc, lsmod, and /sys/module, and runs rkhunter and chkrootkit checks. The workflow looks for syscall hooks, hidden modules, and altered system structures.

What do I need before analyzing a Linux memory dump?

Prepare Volatility3, a Linux memory dump, an ISF symbol table that matches the target kernel version, and a known-good kernel image. Live-system checks use rkhunter and chkrootkit.

Source text

SKILL.md · Apache-2.0
---
name: analyzing-linux-kernel-rootkits
description: Detect kernel-level rootkits in Linux memory dumps using Volatility3
  linux plugins (check_syscall, lsmod, hidden_modules), rkhunter system scanning,
  and /proc vs /sys discrepancy analysis to identify hooked syscalls, hidden kernel
  modules, and tampered system structures.
domain: cybersecurity
subdomain: digital-forensics
tags:
- rootkit
- linux
- kernel
- volatility3
- memory-forensics
- malware-analysis
- rkhunter
- forensics
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- RS.AN-03
- DE.AE-02
- RS.MA-01
mitre_attack:
- T1014
- T1547.006
- T1564.001
---

# Analyzing Linux Kernel Rootkits

## Overview

Linux kernel rootkits operate at ring 0, modifying kernel data structures to hide processes, files, network connections, and kernel modules from userspace tools. Detection requires either memory forensics (analyzing physical memory dumps with Volatility3) or cross-view analysis (comparing /proc, /sys, and kernel data structures for inconsistencies). This skill covers using Volatility3 Linux plugins to detect syscall table hooks, hidden kernel modules, and modified function pointers, supplemented by live system scanning with rkhunter and chkrootkit.


## When to Use

- When investigating security incidents that require analyzing linux kernel rootkits
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques

## Prerequisites

- Volatility3 installed (pip install volatility3)
- Linux memory dump (acquired via LiME, AVML, or /proc/kcore)
- Volatility3 Linux symbol table (ISF) matching the target kernel version
- rkhunter and chkrootkit for live system scanning
- Reference known-good kernel image for comparison

## Steps

### Step 1: Acquire Memory Dump
Capture Linux physical memory using LiME kernel module or AVML for cloud instances.

### Step 2: Analyze with Volatility3
Run linux.check_syscall, linux.lsmod, linux.hidden_modules, and linux.check_idt plugins to detect rootkit artifacts.

### Step 3: Cross-View Analysis
Compare module lists from /proc/modules, lsmod, and /sys/module to identify modules hidden from one view but present in another.

### Step 4: Live System Scanning
Run rkhunter and chkrootkit to detect known rootkit signatures, suspicious files, and modified system binaries.

## Expected Output

JSON report containing detected syscall hooks, hidden kernel modules, modified IDT entries, suspicious /proc discrepancies, and rkhunter findings.

## Example Output

```text
$ sudo python3 rootkit_analyzer.py --memory /evidence/linux-mem.lime --profile Ubuntu2204

Linux Kernel Rootkit Analysis Report
=====================================
Memory Image: /evidence/linux-mem.lime
Kernel Version: 5.15.0-91-generic (Ubuntu 22.04 LTS)
Analysis Time: 2024-01-18 09:15:32 UTC

[+] Scanning syscall table for hooks...
    Syscall Table Base: 0xffffffff82200300
    Total syscalls checked: 449

    HOOKED SYSCALLS DETECTED:
    ┌─────────┬──────────────────┬──────────────────────┬──────────────────────┐
    │ NR      │ Syscall          │ Expected Address     │ Current Address      │
    ├─────────┼──────────────────┼──────────────────────┼──────────────────────┤
    │ 0       │ sys_read         │ 0xffffffff8139a0e0   │ 0xffffffffc0a12000   │
    │ 2       │ sys_open         │ 0xffffffff8139b340   │ 0xffffffffc0a12180   │
    │ 78      │ sys_getdents64   │ 0xffffffff813f5210   │ 0xffffffffc0a12300   │
    │ 62      │ sys_kill         │ 0xffffffff8110c4a0   │ 0xffffffffc0a12480   │
    └─────────┴──────────────────┴──────────────────────┴──────────────────────┘
    WARNING: 4 syscall hooks detected - rootkit behavior confirmed

[+] Checking for hidden kernel modules...
    Loaded modules (lsmod):         147
    Modules in kobject list:        149
    HIDDEN MODULES:
      - "netfilter_helper" at 0xffffffffc0a10000 (size: 12288)
      - "kworker_sched"    at 0xffffffffc0a14000 (size: 8192)

[+] Scanning /proc for discrepancies...
    Processes in task_struct list: 234
    Processes visible in /proc:   231
    HIDDEN PROCESSES:
      - PID 31337  cmd: "[kworker/0:3]"   (disguised as kernel thread)
      - PID 31442  cmd: "rsyslogd"         (fake, real rsyslogd is PID 892)
      - PID 31500  cmd: ""                 (unnamed process)

[+] Checking IDT entries...
    IDT entries scanned: 256
    Modified entries: 0 (clean)

[+] Running rkhunter scan...
    Checking for known rootkits:        68 variants checked
    Diamorphine rootkit:                WARNING - signatures match
    System binary checks:
      /usr/bin/ps:     MODIFIED (SHA-256 mismatch)
      /usr/bin/netstat: MODIFIED (SHA-256 mismatch)
      /usr/bin/ls:     MODIFIED (SHA-256 mismatch)
      /usr/sbin/ss:    OK

[+] Network analysis...
    Hidden connections (not in /proc/net/tcp):
      ESTABLISHED  0.0.0.0:0 -> 198.51.100.47:4443 (PID 31337)
      ESTABLISHED  0.0.0.0:0 -> 198.51.100.47:8080 (PID 31442)

Summary:
  Rootkit Type:         Loadable Kernel Module (LKM)
  Probable Family:      Diamorphine variant
  Syscall Hooks:        4 (read, open, getdents64, kill)
  Hidden Modules:       2
  Hidden Processes:     3
  Hidden Connections:   2 (C2: 198.51.100.47)
  Modified Binaries:    3 (/usr/bin/ps, netstat, ls)
  Risk Level:           CRITICAL
```

© mahipal · Apache-2.0 · mukul975/Anthropic-Cybersecurity-Skills

Similar skills

Everything for Security →

From the same set89

analyzing-disk-image-with-autopsy Guides forensic investigation of raw, E01, and AFF disk images using Autopsy and The Sleuth Kit. Helps extract metadata, recover deleted files, and build activity timelines. CX Codex +1 454installs analyzing-kubernetes-audit-logs Parses kube-apiserver audit logs in JSON lines and flags exec into pods, secret reads, RBAC edits and anonymous access. CX Codex +1 450installs analyzing-sbom-for-supply-chain-vulnerabilities Parses CycloneDX and SPDX SBOM files, matches components against the NVD CVE database through the NVD 2.0 API and builds a dependency graph. Useful when you need to size up third-party library risk. CX Codex +1 444installs abusing-dpapi-for-credential-access Guides extraction and decryption of Windows DPAPI secrets, including Credential Manager entries and browser data. Useful during authorized penetration tests after gaining host access. CX Codex +1 442installs analyzing-golang-malware-with-ghidra Walks an agent through Go binary analysis in Ghidra: buildinfo, pclntab, function names, dependencies. Useful when the sample is Go-compiled. CX Codex +1 441installs analyzing-network-packets-with-scapy This skill guides packet analysis with Scapy, from pcap parsing to anomalous traffic checks. Use it for authorised testing and protocol-level network forensics. CX Codex +1 441installs analyzing-ios-app-security-with-objection A skill for runtime iOS app testing with Objection and Frida: dump the keychain, bypass SSL pinning, check jailbreak detection. CX Codex +1 436installs implementing-secret-scanning-with-gitleaks This skill helps configure Gitleaks to find secrets in Git repositories and stop them from entering history. Use it for local hooks and CI/CD checks. CX Codex +1 439installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor