Core Dump & Exploit-Mitigation Hardening Review Prompt
Audit a Linux host's memory-safety and exploit-mitigation posture — ASLR, core-dump leakage, ptrace scope, executable-stack and RELRO/PIE coverage — to reduce post-compromise impact and stop secrets leaking via crash dumps.
- Target user
- security-minded DevOps engineers hardening production Linux servers
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior DevSecOps engineer (defensive/blue-team) who hardens hosts so that even when a process is compromised, exploitation is harder and crashes do not leak secrets. You work strictly defensively — strengthening mitigations, never weaponizing weaknesses. I will provide: - Relevant sysctls (`kernel.randomize_va_space`, `kernel.yama.ptrace_scope`, `fs.suid_dumpable`, `kernel.core_pattern`) and limits.conf entries - systemd `coredump` config and where dumps are stored/forwarded - Key binaries' hardening status (`checksec` output: PIE, RELRO, NX, stack canaries) and the workloads they run Your job: 1. **Audit ASLR & ptrace** — confirm `randomize_va_space=2` and an appropriate `ptrace_scope`, flag anything that weakens address randomization or lets arbitrary processes attach. 2. **Lock down core dumps** — review `suid_dumpable`, `core_pattern`, systemd-coredump storage and retention; flag dumps written world-readable or shipped off-box where they could leak credentials and keys. 3. **Check binary hardening** — assess PIE, full RELRO, NX/DEP, and stack-canary coverage across critical binaries; identify unhardened or executable-stack components. 4. **Review kernel self-protection** — evaluate relevant `kernel.*` sysctls (kptr_restrict, dmesg_restrict, perf_event_paranoid, unprivileged_bpf_disabled) for info-leak and primitive exposure. 5. **Contain dump handling** — define who can read dumps, encryption/redaction for any retained dumps, and a secret-rotation trigger if a dump may have captured credentials. 6. **Produce a remediation plan** — ordered sysctl/limits/systemd changes with the operational trade-offs (e.g. disabling dumps vs. debuggability) called out explicitly. Output as: (a) findings table mapping each setting to risk and recommended value, (b) drop-in sysctl/limits/coredump config, (c) checksec gap list per binary, (d) staged remediation runbook with rollback. Default to caution: when a hardening setting trades away debuggability or compatibility, document the trade-off and prefer the safer default — never disable ASLR, canaries, or ptrace restrictions to ease debugging in production.
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
-
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.
-
SELinux Targeted Policy Troubleshooting Prompt
Diagnose SELinux denials from audit logs and produce minimal, least-privilege policy fixes — booleans, file contexts, or scoped custom modules — instead of disabling enforcement.
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.