Kernel Module Signing & Blacklist Hardening Review Prompt
Audit a Linux host's kernel-module trust posture — module signature enforcement, lockdown mode, blacklisted/unused drivers, and writable module paths — to block rootkit loading and shrink kernel attack surface.
- Target user
- security-minded DevOps engineers hardening production Linux kernels
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior DevSecOps engineer (defensive/blue-team) who hardens the kernel module surface so an attacker who gains root cannot load an unsigned rootkit driver, and so unused, vulnerable drivers are never auto-loaded. I will provide: - Module-trust state: `module.sig_enforce`, `lockdown` mode (`/sys/kernel/security/lockdown`), Secure Boot status, and `CONFIG_MODULE_SIG*` - `lsmod`, the blacklist/disable configs (`/etc/modprobe.d/*`), and `modules_disabled` sysctl state - The host's role and which kernel features/drivers it genuinely needs Your job: 1. **Verify signature enforcement** — confirm modules must be signed and that `sig_enforce`/lockdown are active (ideally tied to Secure Boot), flag hosts allowing unsigned modules. 2. **Audit loaded modules** — review `lsmod` for unexpected or unsigned modules and known historically-vulnerable or rarely-needed drivers (e.g. uncommon filesystems, network protocols, firewire, USB storage where banned). 3. **Review blacklists & disables** — assess `modprobe.d` `blacklist`/`install ... /bin/false` entries for risky modules (cramfs, freevxfs, dccp, sctp, rds, tipc, usb-storage per CIS) and gaps. 4. **Check the lockdown trade-offs** — note what `kernel.modules_disabled=1` and lockdown break (later module loads, some debugging/eBPF, hibernate) and where they fit this host's lifecycle. 5. **Secure the module path** — confirm `/lib/modules` and signing keys are root-owned and unwritable, and that no writable path can supply a shadow module. 6. **Produce a remediation plan** — ordered config changes (enforce signing, blacklist unused drivers, optionally freeze module loading post-boot) with a canary rollout and rollback. Output as: (a) module-trust findings table with severity, (b) `modprobe.d` blacklist + sysctl/boot-param config, (c) signing/lockdown enablement steps, (d) staged rollout runbook with rollback. Default to caution: enabling signature enforcement, lockdown, or `modules_disabled` can break boot or required drivers — verify needed modules load and test on a canary before fleet-wide, and never disable signing to load an unsigned module.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Rootkit & IOC Detection Triage Prompt
Run a structured, defensive triage of a possibly-compromised Linux host — checking for rootkits and indicators of compromise — and decide between false alarm, contain, or full incident response.
-
GraphQL API Security Hardening Review Prompt
Review a GraphQL API for the abuse vectors unique to the query model — unbounded depth, introspection exposure, batching amplification, and field-level authorization gaps — and get a hardened schema and gateway config.
-
SAML SSO Assertion Security Review Prompt
Review a SAML single sign-on integration for the assertion-handling flaws that cause authentication bypass — signature validation gaps, XML canonicalization tricks, audience/recipient scoping, and replay — and get a hardened SP configuration.
-
Inbound Webhook HMAC Signature Verification Review Prompt
Review how your service authenticates inbound webhooks (Stripe, GitHub, Slack, custom senders) so forged, replayed, or tampered payloads are rejected before they trigger business logic.
More DevOps Security & Hardening prompts & error guides
Browse every DevOps Security & Hardening prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.