Security & malwareDevice & system
shutdown.log: iOS Reboot Log and Spyware Traces
iOS shutdown.log lists processes still running at each reboot. Where it lives, its SIGTERM format and Unix time, and how it exposes spyware traces.
- Location
- /private/var/db/diagnostics/shutdown.log (and rotated shutdown.*.log); in a sysdiagnose: system_logs.logarchive/Extra/shutdown.log
- Evidence area
- Proves
- When the device was shut down or rebooted, and which processes (by PID and executable path) were still running and delaying the shutdown at that moment
- Timestamps
- Unix time in seconds in SIGTERM lines, UTC; delays in seconds
- Acquisition
- sysdiagnose is enough; a full file system extraction also reaches it. Not in iTunes / Finder backups
- Retention
- Entries have been appended at each reboot and observed to span many months; researchers reported that iOS 26 rewrites the log at reboot instead, so history may be lost. Measure the first and last SIGTERM entry
- Collection
- sysdiagnose, Full file system extraction
Tools
Compare all toolsWhat it is
When an iPhone shuts down or reboots, iOS asks every process to exit and waits. Processes that do not exit in time are written to shutdown.log, with their PID and executable path, followed by a line recording the SIGTERM time. The file keeps growing across reboots, which turns it into a long history of what was running at each shutdown.
In January 2024, Kaspersky researchers showed that devices infected with mercenary spyware (Pegasus, and later Reign and Predator in their comparison) left their processes in shutdown.log, often running from unusual directories such as /private/var/db/ or /private/var/tmp/. Because the log survives across reboots and is included in every sysdiagnose, it became one of the lightest-weight checks available for iOS compromise.
Where it lives
| Source | Path | Notes |
|---|---|---|
| Full file system | /private/var/db/diagnostics/shutdown.log | Live log; rotated copies such as shutdown.0.log may exist |
| sysdiagnose | system_logs.logarchive/Extra/shutdown.log | Copy taken when the sysdiagnose was generated |
| Packed sysdiagnoses on disk | DiagnosticLogs/sysdiagnose/sysdiagnose_*.tar.gz | Older copies, useful if the live log rotated |
It is not in iTunes or Finder backups. A sysdiagnose is the standard way to collect it from a device without an extraction.
What it proves
- The date and time of each shutdown or reboot captured in the log.
- Processes that were still running and delaying shutdown, with their PIDs and full paths.
- How long the shutdown was delayed and how many times the "still here" check repeated.
It does not prove infection by itself. Legitimate processes, including Apple's, also appear, and some legitimate software runs from paths that look unusual. A clean log does not exclude compromise either: a process that exits quickly will not be listed.
Key fields
The file is plain text. A shutdown block looks like this (paths shortened, values illustrative):
remaining client pid: 1234 (/usr/libexec/exampled)
remaining client pid: 5678 (/private/var/db/<suspicious>/<name>)
After 1.02s, these clients are still here:
remaining client pid: 5678 (/private/var/db/<suspicious>/<name>)
SIGTERM: [1705312345]
| Element | Meaning |
|---|---|
remaining client pid: N (path) | A process still running, with PID and executable path |
After X.XXs, these clients are still here: | Delay checkpoint; clients listed after it delayed the shutdown |
SIGTERM: [N] | End of the block, with the time the shutdown signal was sent |
Parsers attach the SIGTERM time of the block to every process listed in it.
Timestamps
The value in SIGTERM: [...] is Unix time in seconds (not Cocoa time), UTC. Some builds place the value after an @ instead of in brackets; MVT handles both.
date -u -r 1705312345 # macOS
date -u -d @1705312345 # Linux
Retention
On the releases studied in the original research, entries accumulate at each reboot, and published analyses and parser tests show logs covering many months. The file can rotate. Researchers reported in late 2025 that iOS 26 changed this behaviour and rewrites the log at reboot, which would leave only the most recent shutdown: verify on your build, and on iOS 26 treat every reboot before collection as potential loss of history. The newest block is written at the most recent shutdown, so a device that has not rebooted since an event has not yet recorded the processes running at that time. That is a reason to reboot deliberately only after collecting a first sysdiagnose, then collect a second one, when the case warrants it and the device state allows (a reboot also returns the device to BFU).
Collection
- Trigger a sysdiagnose and extract
system_logs.logarchive/Extra/shutdown.log. Record the time you pressed the buttons. - From a full file system, collect the live log, any rotated copies and every packed sysdiagnose under
DiagnosticLogs. - Hash the sysdiagnose archive before extraction.
Parsing
- iShutdown (Kaspersky) extracts the log from a sysdiagnose, parses it and flags known indicators and unusual paths.
- MVT parses
shutdown.login file system mode and matches paths and process names against indicator files. - iLEAPP reports processes with their delay and marks paths under
/private/var/db/and/private/var/tmp/, reading both live and packed copies. - The EC-DIGIT-CSIRC sysdiagnose analyser includes a shutdown log parser.
Investigator tips
- Treat a path flag as a lead to review, not a finding. Compare with a clean device on the same iOS build.
- Look for the same process name in DataUsage and netusage, crash reports and JetsamEvent files and unified logs.
- Several short-lived blocks close together can indicate repeated reboots, which some infections cause and some users perform to clear implants. Record the pattern.
- The sysdiagnose and shutdown.log guide covers collection order and the full sysdiagnose layout.