A source-cited reference library 399 modules · 19 subdomains · 5 domains
Research Library
Forensics & Detection

Cybersecurity / Dfir

Forensics & Detection

Detection is artifact work. Investigators look for traces that an implant leaves behind: process records, database inconsistencies, staging folders, and network logs, and then reason carefully about what a missing trace does and does not prove.

Executive brief

Mobile spyware detection rests on a small number of recurring artifact classes. On iOS, Amnesty International's methodology points to process records in DataUsage.sqlite and netusage.sqlite, iMessage account lookups in idstatuscache.plist, staging folders under roleaccountd, and an incomplete database deletion that Citizen Lab named CASCADEFAIL. On Android, researchers have used indicators such as Paragon's BIGPRETZEL. The Mobile Verification Toolkit, released by Amnesty's Security Lab in July 2021, automates backup parsing and indicator matching, and Kaspersky's triangle_check does similar work for Operation Triangulation. All of these tools share a limit: they find what they have indicators for. Modern implants delete traces, run in memory, and avoid persistence, so a clean scan is not proof of a clean phone.

What device forensics can establish

Device forensics answers a narrower question than attribution. It can show that an implant ran on a specific phone, when it ran, and which processes it used. It generally cannot show who operated it, and it cannot show what was taken unless the implant's own logs survived. Those limits are inherent to the method, not a failure of any particular investigator, and they shape how a forensic finding should be described.

The method depends on what the phone records about itself. Operating systems log process execution, network use, account activity, and file writes. An implant that wants to hide must either avoid those logs or delete them afterwards. Most of the documented detection techniques exploit the gap between the two: a deleted process entry that leaves a live-usage record behind, a staging folder that the implant forgot to remove, an account lookup that precedes a payload by seconds. The investigator is reading the residue of concealment.

A mobile phone imaging device connected to a phone for forensic extraction
Acquisition — forensic examination begins with a defensible copy of the device or its backup. The imaging device shown here is used in law-enforcement mobile forensics. Photograph via Wikimedia Commons.

There are three common acquisition paths. An iTunes-style backup captures a subset of app data, including some databases that record process and account activity, and it can be taken without jailbreaking. A full file-system extraction requires a jailbreak or a forensic tool with the right privileges and captures far more. A live analysis inspects the running device, which matters when the implant exists only in memory.

Each path has a cost. Backups are easy to obtain and preserve but omit memory-resident traces. Full extractions are richer but require disturbing the device, and on modern iOS a reboot can wipe an in-memory implant. Live analysis can catch the implant in the act but is hard to repeat and easy to contaminate. Investigators usually combine paths and compare their results rather than relying on one.

Acquisition paths and what each captures

PathCapturesMain limitation
iTunes-style backupApp data and some databasesNo memory-resident traces
Full file-systemFiles, caches, staging foldersRequires jailbreak or tooling
Live analysisRunning processes and memoryHard to repeat; easy to disturb

The iOS artifact set

Amnesty International's forensic methodology organises iOS evidence into four classes. Network traces include Safari history, Favicon.db, WebKit IndexedDB, session resource logs, and app caches, which can record redirects to infection domains. Process records include DataUsage.sqlite and netusage.sqlite, which log suspicious process names such as bh, roleaccountd, stagingd, and msgacntd. Ancillary writes include com.apple.CrashReporter.plist and the staging folder under roleaccountd, where payload binaries have been found. iMessage indicators include suspicious account lookups by com.apple.madrid in idstatuscache.plist.

Two of these deserve emphasis because they are distinctive. The idstatuscache lookup appears in iTunes backups and does not require a jailbreak, which makes it one of the few high-value traces available in an ordinary backup. The roleaccountd staging folder has been consistent across investigations: Citizen Lab found the same pattern in a December 2020 report that Amnesty's methodology cites.

iOS artifact classes used in Pegasus investigations

ArtifactClassWhat it suggests
DataUsage.sqliteProcess recordsImplant process execution
idstatuscache.plistiMessage lookupsPre-payload account activity
roleaccountd stagingFile writesPayload binaries on disk
Safari and cache logsNetwork tracesRedirects to infection domains
CrashReporter.plistAncillary writesCrash reporting disabled

The database inconsistency known as CASCADEFAIL is the clearest example of forensic residue. Pegasus deletes an entry from the ZPROCESS table of DataUsage.sqlite but does not delete the related entries in ZLIVEUSAGE. A query that joins the two tables therefore finds a live-usage record with no matching process. Citizen Lab reported that it had only ever seen this kind of incomplete deletion associated with Pegasus, which made it an attribution signal as well as a detection technique. The report published a SQL query so that others could test for it.

The technique also illustrates why deletion is hard to get right. A database with several tables and indexes is not a single file that can be scrubbed; removing a row leaves references elsewhere, and removing those references changes timestamps and counts that other records depend on. An implant that deletes too much creates a different anomaly. Investigators learn both signatures: the trace that remains and the absence that should not be there.

Documented iOS process names and folders

bhBridgeHead-era marker
roleaccountdStaging and privilege use
stagingdPayload staging
msgacntdMessage account activity
pcsdLater-stage payload
gatekeeperdLater-stage payload

MVT and the open-source toolchain

The Mobile Verification Toolkit, or MVT, was released by Amnesty International's Security Lab in July 2021 alongside the Pegasus Project. It is a set of command-line utilities that parse iOS backups and file-system dumps and Android acquisitions, match them against indicators of compromise, and produce JSON logs and chronological timelines. Its stated purpose is to simplify and automate the gathering of forensic traces that may indicate a compromise, not to prove that a device is clean.

MVT accepts indicators in STIX2 format from Amnesty and other research groups. It includes separate commands, mvt-ios and mvt-android, and a general mvt command for version, completion, plugin management, and indicator download. It can be installed with pip or uv, and a typical check runs against a backup directory rather than the live device. The toolkit is extensible through plugins, which lets researchers add modules without changing the core.

A smartphone sealed inside a radio-frequency shielding bag
Preserving the device — a radio-frequency bag blocks network traffic while a phone is transported or examined, preventing a remote operator from wiping or reconfiguring it. Photograph via Wikimedia Commons.

The toolkit's own documentation is unusually direct about its limits. It states that MVT is intended for technologists and investigators, not for end users, and that concerned individuals should seek expert help. It warns that public indicators alone are insufficient and can create a false sense of security, because they may miss recent traces. It also notes that a major version merge introduced breaking changes, a reminder that the tool is research software rather than a product with a support contract.

The licensing follows the same logic. MVT uses a custom licence designed to support consensual forensic analysis and to avoid enabling privacy violations against people who have not consented. That choice reflects a real tension in the field: the same tools that help a journalist check a phone can be used to inspect someone else's device. The technical community has handled it through consent requirements and through guidance that investigations be conducted with the device owner's agreement.

MVT components

ComponentFunction
mvt-iosParse iOS backups and file-system dumps
mvt-androidParse Android acquisitions
STIX2 indicatorsMatch known compromise indicators
JSON and timeline outputRecord findings for review
PluginsAdd forensic modules

Anti-forensics: what implants delete

Modern implants are built to leave as little as possible. Microsoft's analysis of QuaDream's KingsPawn described two components: a monitor agent written in Objective-C whose job was to reduce the forensic footprint, and a main agent written in Go. The monitor agent deleted crash logs and execution artifacts from directories such as analyticsd, and the main agent removed calendar events that could reveal a malicious invitation. It also stripped location-monitoring records from locationd's clients.plist by hunting entries ending in subridged.

Kaspersky's Operation Triangulation analysis found a similar pattern in a different campaign. The implant ran entirely in memory, never touching the file system, and a binary validator cleaned traces by deleting the malicious iMessage through SQL queries against SMS.db. Kaspersky recovered stages of the attack only by reconstructing timelines from backups, intercepting command-and-control traffic, and recovering a deleted iMessage attachment by corrupting ciphertext so that the decryption key was stored in the message database.

Documented anti-forensic behaviour

ImplantDeletes or hidesResidual trace
PegasusZPROCESS rowsZLIVEUSAGE rows remain
KingsPawnCrash logs, calendar eventsStaging folder and plist edits
TriangleDBSMS.db messageBackup timeline gaps
GraphiteWhatsApp app dataBIGPRETZEL indicator

The Paragon case shows the Android side. Citizen Lab found clear indications on infected Android phones that spyware had been loaded into WhatsApp and other apps, and named the forensic evidence BIGPRETZEL. WhatsApp confirmed that it also associated the indicator with Paragon spyware. The vulnerability was patched server-side without a client fix and without a CVE identifier, which meant users did not receive a security update and the only way to find an infection was device analysis.

A server-side fix changes the detection problem. When there is no patch for users to install and no CVE to search for, the observable evidence is confined to the device and to platform telemetry. That is why WhatsApp's own notifications and Citizen Lab's device work were complementary: the platform could see targeting at scale, and the device could confirm what had been installed.

Why deletion is imperfect

TablesRows leave references behind
CachesCopies appear in several stores
TimelinesGaps reveal removed events
BackupsSnapshots preserve old state
SyncOther devices hold copies

Network-side and platform-side detection

Network detection works from the outside in. Amnesty's methodology describes recurring URL patterns: a fourth-level subdomain, a non-standard high port, and a random URI. Those patterns can be matched against proxy logs, DNS records, and passive DNS data. The same report notes the limits: passive DNS recorded no resolutions for either Pegasus infection domain used in Morocco, and NSO's move to Amazon CloudFront shielded early attack stages from internet scanning.

Platform detection works from the service side. WhatsApp identified the Paragon campaign through its own telemetry, patched the delivery path, and notified about 90 users. Apple issues threat notifications when its threat intelligence gives it high confidence that a user has been individually targeted. Apple states that it does not attribute attacks to specific actors or regions and does not disclose what triggered a notification. A platform alert is therefore a warning to a user, not a public finding.

Detection vantage points

VantageSeesBlind spot
Proxy and DNS logsRedirects and domainsEncrypted or fronted traffic
Passive DNSHistorical resolutionsCoverage is partial
Platform telemetryDelivery at scaleContent and implant
Device forensicsInstalled implantMemory-only payloads
Threat notificationLikely targetingNo attribution

The most useful defensive posture combines the vantage points. A newsroom or civil society group can preserve network logs, keep devices updated, enable high-security modes where available, and route suspicious messages to a forensic partner rather than opening them. Apple's Lockdown Mode is one such measure; Microsoft recommended it for high-risk iOS users in its QuaDream analysis. None of these measures proves a device is clean, and none replaces forensic examination after a credible alert.

For an investigator, the practical rule is to record the acquisition method and the indicator set alongside the result. A scan that finds nothing with a public indicator list is a different claim from a scan that finds nothing with a current, private indicator set plus a full file-system extraction. Reports that omit the method invite readers to treat a limited negative as a clean bill of health.

Detection tools and milestones

  • 2016 — Trident artifacts published with the Mansoor case
  • 2021 — Amnesty releases MVT and 700+ domains
  • 2021 — CASCADEFAIL published in the FORCEDENTRY report
  • 2023 — Kaspersky releases triangle_check
  • 2023 — KingsPawn anti-forensics documented
  • 2025 — BIGPRETZEL indicator linked to Paragon

The limits of detection and the meaning of a negative

The limits are technical, temporal, and structural. Technical limits come from memory-only payloads and deleted traces. Temporal limits come from log retention: Safari history is short-lived and may be purged by the malware, so an infection from a year ago may leave nothing to find. Structural limits come from platform differences: Android offers fewer forensic surfaces than iOS in the published Pegasus work, which is why findings skew toward iPhones and why that skew does not reflect the relative security of the two platforms.

There is also an attribution limit inside the forensic limit. An artifact can identify the product family, as CASCADEFAIL does for Pegasus, without identifying the operator. A shared iCloud account across several victims can suggest a common operator, and infrastructure can link campaigns, but neither establishes which government paid for the attack. Those conclusions require procurement records, political context, or an admission.

Limits and their consequences

LimitCauseConsequence
Memory-only payloadNo persistence on iOSReboot can erase evidence
Short log retentionSystem and malware purgingOld infections leave no trace
Platform differencesFewer Android surfacesFindings skew to iOS
Product versus operatorArtifacts identify toolingCustomer remains unknown

The correct conclusion from a negative scan is therefore narrow. It means that the tested device, acquired by the stated method, contained none of the indicators in the stated set. It does not mean the device was never infected, that no other device was infected, or that the owner was not targeted. Investigators who state the method and the indicator set make a claim that can be evaluated; investigators who report only the absence make a claim that cannot.

That discipline matters for accountability. Courts, regulators, and newsrooms all rely on forensic findings, and each has a different standard of proof. A technical report can support a finding that a device was compromised without supporting a finding about who did it. Keeping those claims separate is what allows the same evidence to be useful in a criminal case, a parliamentary inquiry, and a civil lawsuit without being overstated in any of them.

Reading a forensic report

MethodBackup, extraction, or live
Indicator setPublic, private, or both
ArtifactWhat was actually found
ConfidenceHow strong the match is
ScopeDevice, campaign, or operator