A crash dump is a copy of process or system memory, so it can hold every password, token, private key and customer record the process had in memory at the moment it failed. Dumps are created automatically, copied to support tickets, uploaded to crash reporting services and moved into debugging environments with far weaker controls than the production system they came from. This guide covers what Windows, Linux and managed runtimes put into dumps, the settings that control collection, how to handle dumps safely once they exist, and how to detect and measure exposure. It is for platform, endpoint, application and security engineering teams who run or support production systems.
Key takeaways
- Classify dumps at the level of the data in memory. A full dump of an authentication service is as sensitive as its key store, whatever the file extension says.
- Collection settings decide the exposure. Windows
DumpTypeandCrashDumpEnabled, Linuxcore_pattern,coredump.confandfs.suid_dumpable, and JVM heap dump flags set what is captured and where it lands. - Leaving the secure boundary is the real risk. Microsoft's Storm-0558 investigation centred on key material that left an isolated signing environment for a debugging environment, which was then reached through a compromised engineering account.
- Secret scanning does not reliably see into dumps. Binary memory images defeat many pattern-based scanners, so rely on access control, retention and isolation first.
- Code can keep secrets out of dumps. Linux
MADV_DONTDUMPexcludes memory regions from core dumps, and short-lived secrets in memory reduce what any dump can reveal.
What ends up in a dump
| Dump type | Platform and setting | Contents | Sensitivity |
|---|---|---|---|
| Small memory dump (64 KB) | Windows, CrashDumpEnabled = 0x3 | Stop information, driver list, kernel structures for the stopped processor, process and thread, kernel-mode call stack | Low |
| Kernel memory dump | Windows, CrashDumpEnabled = 0x2 | Kernel, HAL and kernel-mode driver memory; excludes user-mode program memory | Medium: kernel memory can still hold sensitive structures |
| Complete memory dump | Windows, CrashDumpEnabled = 0x1 | All system memory, including data from running processes | High: equivalent to a full memory image of the host |
| Application mini dump | Windows Error Reporting LocalDumps, DumpType = 1 (default) | Thread stacks and limited process data | Medium: stacks can hold arguments and buffers |
| Application full dump | Windows Error Reporting LocalDumps, DumpType = 2 | The whole user-mode address space of the process | High |
| Linux core dump | Kernel core dump, often handled by systemd-coredump or Apport | Memory selected by /proc/<pid>/coredump_filter; default 0x33 includes anonymous private and shared mappings, ELF headers and private huge pages | High: the heap is included by default |
| Java heap dump (.hprof) | JVM -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath | Every object on the Java heap, including strings, sessions and cached credentials | High |
| JVM fatal error log | hs_err_pid<pid>.log, location set by -XX:ErrorFile | Crash context, registers, loaded libraries, system properties and command line | Medium: command lines and properties can carry secrets |
Typical secrets found in application memory include database connection strings, cloud access keys and session tokens loaded from environment variables, OAuth refresh tokens, TLS private keys held by the process, signing keys, decrypted customer data and passwords being checked at login. The Environment Variables and .env Files guide explains why secrets loaded at start-up remain in memory for the life of the process.
Case study: key material and the debugging environment
In September 2023 Microsoft published the results of its investigation into how Storm-0558 obtained a consumer signing key. Its original account said a consumer signing system crash in April 2021 produced a crash dump containing the key, that the dump was moved from the isolated production network into a debugging environment on the corporate network, that credential scanning did not detect the key, and that the actor later compromised an engineer's account with access to that environment. On 12 March 2024 Microsoft updated the post: it had not found a crash dump containing the affected key material, though its leading hypothesis remained that operational errors let key material leave the secure token signing environment and that it was later accessed in a debugging environment through a compromised engineering account. Microsoft also said moving crash dump material out of the environment had not been prohibited in the past but is now prohibited by its debugging policy.
The lessons hold whatever the exact path: dumps and debugging data from high-value systems must not leave their security boundary, the debugging environment needs the same access controls as production, and scanning is a backstop. See the Microsoft Storm-0558 key breach analysis and the Storm-0558 and Cloud Key Theft Profile.
Collection controls on Windows
- System crash dumps:
HKLM\System\CurrentControlSet\Control\CrashControl, valueCrashDumpEnabled: 0x0 none, 0x1 complete, 0x2 kernel, 0x3 small, 0x7 automatic, and 0x1 withFilterPages0x1 for an active memory dump. The dump goes toDumpFile(%SystemRoot%\Memory.dmpby default) and small dumps toMinidumpDir(%SystemRoot%\Minidump). Changes need a restart. On servers that process secrets, prefer kernel or automatic dumps and use complete dumps only for a time-limited investigation. - Application dumps: Windows Error Reporting local dumps are configured under
HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps, with per-application subkeys such asLocalDumps\MyApplication.exe. Microsoft documents that the feature is not enabled by default and needs administrator rights.DumpFolderdefaults to%LOCALAPPDATA%\CrashDumps; dumps of services go to the service profile folders.DumpCountdefaults to 10 andDumpTypeto 1 (mini dump). - Policy: if you enable full application dumps for troubleshooting, scope them to one executable subkey, set
DumpFolderto a protected location with restrictive ACLs, keepDumpCountlow and remove the setting when the case closes. - LSASS: a memory dump of the LSASS process is a classic credential theft technique (MITRE ATT&CK T1003.001, OS Credential Dumping: LSASS Memory). Treat any LSASS dump outside a sanctioned forensic process as an incident. See the Credential Dumping Guide.
Collection controls on Linux and containers
- Where dumps go:
/proc/sys/kernel/core_patternnames the core file, or with a leading|pipes it to a handler such as systemd-coredump or Apport. Piped dumps run as root and are not subject toRLIMIT_CORE, soulimit -c 0alone does not stop them. - systemd-coredump:
/etc/systemd/coredump.conf(or a drop-in incoredump.conf.d/) setsStorage=(externalby default, storing cores in/var/lib/systemd/coredump/;journal; ornone),ProcessSizeMax=,ExternalSizeMax=,MaxUse=andKeepFree=. To keep only a log entry, setStorage=noneandProcessSizeMax=0; the documentation notes that withStorage=nonealone a core is still written during processing. Check the effective configuration withsystemd-analyze cat-config systemd/coredump.conf. - Privileged processes:
fs.suid_dumpable0 (default) produces no dump for processes that changed credentials or run set-user-ID programs; 1 is a debug mode that the kernel documentation calls insecure because unprivileged users can read privileged process memory; 2 writes such dumps readable only by root and requires an absolutecore_patternor a pipe. Keep it at 0 in production. - Handler vulnerabilities: in May 2025 Qualys disclosed CVE-2025-5054 in Apport and CVE-2025-4598 in systemd-coredump, race conditions that let a local attacker read the core dump of a crashed set-user-ID program; its proof of concept recovered password hashes from
/etc/shadowthroughunix_chkpwd. Qualys gave settingfs.suid_dumpableto 0 as a temporary mitigation where patching was not immediately possible. - Containers:
core_patternis a host kernel setting, so a container's crash is handled by the host's handler and dumps can land on the node, outside the container's own storage and access controls. Decide dump policy at node level and treat node dump directories as sensitive. See the Kubernetes NHI Security Guide. - In code: applications that hold keys can mark those pages with
madvise(MADV_DONTDUMP)so they are omitted from core dumps.
Managed runtimes and crash reporting services
- JVM:
-XX:+HeapDumpOnOutOfMemoryErroris commonly left on in production because Oracle documents it as having no overhead. Pair it with-XX:HeapDumpPathpointing to a protected directory rather than the working directory default (java_pid<pid>.hprof), and treat the files as sensitive data. - Fatal error logs:
hs_err_pidlogs and similar crash logs include the command line and system properties. Do not pass secrets on the command line. - Crash reporting SaaS: services such as Sentry scrub event fields whose names or values look like passwords, secrets, tokens and private keys by default, and let you add sensitive fields. Field scrubbing applies to structured event data; confirm separately how the service handles binary minidumps and attachments, and whether you need to upload them at all.
- Operating system error reporting: decide whether endpoint and server crash reports may be sent to the OS vendor, and set the relevant policy centrally.
Safe handling of dumps once they exist
| Stage | Control | Detail |
|---|---|---|
| At creation | Protected location | Dump folders readable only by administrators or the support tooling identity; no world-readable paths |
| Classification | Inherit the source system's data class | A dump from a payment or identity system is handled as that data, including any personal data rules |
| Transfer | Approved channel only | No email, chat or public file sharing; encrypted transfer to a named analyst or vendor case; record who received it |
| Analysis | Isolated debugging environment | Access limited to named engineers with phishing-resistant MFA; no internet egress; logging of file access |
| Third parties | Contract and minimisation | Send mini or kernel dumps where they answer the question; agree retention and deletion with the vendor |
| Retention | Short and enforced | Automatic deletion after the case closes; systemd MaxUse= and WER DumpCount cap volume, not age |
| After exposure | Rotate | If a dump containing live secrets left its boundary, rotate those secrets as you would after a leak |
Personal data in dumps is still personal data. Under GDPR Art. 32 controllers must apply appropriate security to processing, and a dump of customer data sent to the wrong party can be a personal data breach, which under Art. 33 must be notified to the supervisory authority without undue delay and, where feasible, not later than 72 hours after becoming aware of it, unless it is unlikely to result in a risk to individuals. See the Data Retention and Secure Deletion Guide for deletion controls.
Where identity fits
The highest-value contents of most dumps are non-human credentials: service account passwords, API keys, cloud access keys, workload tokens and signing keys. Three identity practices shrink the blast radius. Short-lived, automatically rotated credentials mean a dump from last month holds expired secrets. Fetching secrets from a vault at use time and discarding them reduces how long they sit in memory. Hardware-backed keys in an HSM or TPM never appear in process memory at all. The Secrets Access Logging and Detection guide covers spotting secret use after a possible exposure.
Choosing a collection policy
| System type | Default collection | Full dumps |
|---|---|---|
| Key management, signing, identity providers | Small or kernel dumps only; application dumps off or mini only | Only inside the secure boundary, analysed there, never exported |
| Production application servers with customer data | Mini dumps; Linux cores to a protected handler with short retention | Time-limited, per-application, with approval and a deletion date |
| Developer workstations and test systems | Product defaults acceptable if test data is synthetic | Allowed, but not with production secrets or data loaded |
| Endpoints for general staff | OS defaults with central policy for error reporting | Support-led only, removed after the case |
Small organisations can usually turn full dumps off everywhere and enable them case by case. Large organisations with vendor support contracts need a documented route for sending dumps to vendors that includes minimisation and deletion.
How to implement
- Find where dumps already exist. Search servers and endpoints for
*.dmp,*.hprof,core*files,/var/lib/systemd/coredump/,/var/crash/,%LOCALAPPDATA%\CrashDumps,%SystemRoot%\MinidumpandMemory.dmp, plus support ticket attachments and shared drives. Record size, age and source system. - Read the current settings. Collect
CrashDumpEnabled,LocalDumpskeys,core_pattern,coredump.conf,fs.suid_dumpableand JVM flags through configuration management. - Set baselines by system class using the table above, and deploy through Group Policy, Intune, configuration management or sysctl drop-ins.
- Pilot on one service. Confirm that support teams can still diagnose crashes with the reduced dump type before widening. Roll back by restoring the previous registry or configuration values from configuration management.
- Lock down storage and transfer. Restrict dump folder ACLs, define the approved transfer channel and set automatic deletion.
- Change code where it matters. Exclude key pages from dumps, avoid secrets on command lines, and shorten secret lifetimes in memory.
- Rotate anything exposed. For old dumps from sensitive systems found in step 1, delete them and rotate the credentials those systems held.
Detection and measurement
- Dump creation events: alert on new dump files on tier 0 and secret-handling systems, and on any dump of
lsass.exe. - File movement: data loss prevention or file access monitoring on dump extensions leaving servers, uploaded to cloud storage or attached to tickets.
- Configuration drift: alert when
CrashDumpEnabledchanges to 0x1, when fullLocalDumpsare set globally, or whenfs.suid_dumpableis not 0. - Debugging environment access: log and review who opens dump files from sensitive systems.
Metrics:
- Number of dump files older than the retention limit (target zero).
- Percentage of tier 0 and secret-handling systems on the approved dump baseline.
- Number of dumps sent to third parties per quarter, and percentage with recorded deletion.
- Median age of secrets held by services that produce dumps.
- Configuration drift alerts closed within the agreed time.
Common failure patterns
- Full dumps enabled globally during an outage and never turned off, filling disks with copies of production memory.
- Dumps attached to support tickets or chat and retained for years in systems with broad access.
- Treating the debugging environment as lower risk than production, the pattern at the centre of the Microsoft Storm-0558 key breach.
- Relying on secret scanning to catch keys in binary dumps instead of preventing the dump from leaving.
- Heap dump flags with the default path writing
.hproffiles into application directories that are backed up, synced or served. - Setting
fs.suid_dumpableto 1 for debugging and leaving privileged process memory readable by unprivileged users.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | SC-4, SC-28, SI-12, MP-6 | Information in shared resources, protection at rest, retention and sanitisation of dump files |
| NIST SP 800-53 Rev. 5 | CM-6, CM-7, AC-6 | Dump configuration settings, least functionality and restricted access to dump folders |
| NIST CSF 2.0 | PR.DS-01, PR.DS-10, PR.PS-01 | Data at rest and in use, configuration management |
| CIS Controls v8.1 | Control 3 and Control 4 | Data protection and secure configuration |
| ISO/IEC 27001:2022 Annex A | A.5.12, A.8.10, A.8.12 | Classification, information deletion, data leakage prevention |
| MITRE ATT&CK | T1003.001, T1552.001, T1005 | LSASS memory dumping, credentials in files, data from the local system |
Practitioner checklist
NHI Mgmt Group recommends the following checks.
- Inventory existing dump files and delete those past retention, rotating secrets from sensitive systems.
- Set
CrashDumpEnabledand WERLocalDumpsbaselines per system class. - Set
coredump.confstorage and size limits and keepfs.suid_dumpableat 0. - Point JVM heap dumps to a protected directory, or disable them on secret-handling services.
- Classify dumps at the level of the source system and restrict folder access.
- Define one approved transfer route for dumps to vendors, with deletion confirmation.
- Keep dumps from key and identity systems inside their security boundary.
- Exclude key material from dumps in code and keep secrets off command lines.
- Alert on LSASS dumps and on dump configuration drift.
Standards and references
- Microsoft: Collecting User-Mode Dumps
- Microsoft: Overview of memory dump file options for Windows
- Linux man-pages: core(5)
- Linux man-pages: proc_sys_fs(5)
- systemd: coredump.conf
- Oracle: Java SE Troubleshooting, Command-Line Options
- Microsoft MSRC: Results of Major Technical Investigations for Storm-0558 Key Acquisition
- Qualys: Information disclosure vulnerabilities in Apport and systemd-coredump
Related NHI Mgmt Group resources: Memory Forensics Guide · Credential Dumping Guide · Environment Variables and .env Files · Data Classification Guide · Storm-0558 and Cloud Key Theft Profile