Detecting Commercial Spyware on iOS: Tactics & Unseen Threats | Brav

I uncover the stealthy world of commercial spyware on iOS, explaining its evolution, detection tactics, forensic tools, and how to protect your devices.

Detecting Commercial Spyware on iOS: Tactics & Unseen Threats

Published by Brav

Table of Contents

TL;DR

Why this matters

I’ve spent the last decade hunting stealthy actors on iOS. The hardest thing? Spotting an invisible thief that can exfiltrate data without ever asking the user to tap a link. Every new version of iOS feels like a patchwork of zero-day fixes, but the attackers keep one step ahead by evolving their delivery mechanisms. If you’re a SOC analyst, forensic examiner, or a security engineer, missing a single trace can mean a target’s entire communications and biometrics are in the wrong hands. Apple patched the Blast Pass vulnerability in iOS 16, closing a major zero-day vector iOS 16 — Wikipedia (2023).

Core concepts

Commercial spyware isn’t a one-size-fits-all program. Think of it as a sophisticated, purpose-built malware sold to state-actors. The core differences from jailbreaks are:

FeatureCommercial SpywareJailbreak
User interactionZero-click or one-clickExplicit user action
PersistenceOften removed by cleanup routinesLeaves the system open
VisibilityDesigned to evade forensic toolsLeaves obvious traces

The most notorious examples are Pegasus, Hermit, and the recently uncovered Predator 2.0 (re-written in Objective-C to sidestep static analysis). Each has a distinct delivery vector:

SpywareInfection VectorPersistenceDetection Difficulty
Pegasus 2016SMS linkMedium (cleanup leaves logs)Medium
Pegasus 2021iMessage zero-clickHigh (shutdown lock traces)High
HermitApp install via malicious downloadMedium (remains in App Store)Low
Predator 2.0Zero-click, sandbox escapeHigh (persistent payload)Very High
iSoonEnd-click SMS, no persistenceLowLow

Pegasus 2016 was the first publicly released sample that demonstrated the feasibility of a state-sponsored zero-click attack on iOS, using a malicious SMS link to exploit a WebKit vulnerability and install a covert payload Pegasus — Wikipedia (2023). Pegasus 2021 shifted tactics, using iMessage attachments that never require user interaction, leaving cleanup artifacts in the shutdown lock after the OS is rebooted Pegasus — Wikipedia (2023). The Hermit family, detailed in a 2022 Citizen Lab study, leveraged a compromised app that masqueraded as a benign utility, making it easy to detect through standard MDM inventory Hermit — Wikipedia (2023).

How does it hide?

Most commercial spyware relies on a two-stage approach:

  1. Delivery – A zero-day in WebKit or a misconfigured app triggers the payload.
  2. Execution – The malware runs in a sandbox, escalates privileges, and writes a command-and-control (C&C) channel through the device’s cellular or Wi-Fi connection.

Because the malware can delete its crash logs, clear its attachment history, and mimic legitimate system processes, conventional antivirus or anti-spyware solutions rarely flag it. The only reliable method is to compare a pristine backup with a suspect one, or to run a full forensic imaging of the device.

How to apply it

Below is a practical workflow I use in the field. It combines manual and automated steps and is tuned for teams that have limited budget and need quick turnaround.

StepActionToolExpected Result
1Validate iOS versionCheck Settings > General > AboutEnsure device is running latest security patch.
2MDM app inventoryMDM consoleFlag any app not listed in the company catalog; flag Hermit or other suspicious third-party apps. Apple — Mobile Device Management (MDM) (2023)
3Run SysDiagnoseSysDiagnose (Apple)Pull crash logs, attachment database, and diagnostic bundles.
4Backup analysisMBT or custom scriptsCompare backup metadata with device snapshots for orphaned files or unexpected binaries.
5Manual forensicSQLite editor, Xcode InstrumentsInspect iMessage attachment tables for anomalies; look for hidden data in the device’s local storage.
6Full wipe & restoreiTunes or FinderAfter confirming presence of spyware, erase all content and settings.
7Re-injection checkRestore from a known clean backupVerify that no spyware files reappear after the restore.

A deeper dive into SysDiagnose

Apple’s SysDiagnose is a command-line tool that dumps diagnostic logs, system state, and crash reports. It’s lightweight (10–15 min) and runs on macOS without root access Apple — SysDiagnose (2022). Key logs to parse include:

  • /var/log/diagnostics – system crash dumps
  • /private/var/mobile/Library/MessageAttachments – iMessage data
  • /private/var/mobile/Library/Preferences – app preferences, sometimes used to store API tokens

When a spyware like Pegasus 2021 runs, it writes a small “cleanup” script that deletes its own crash logs but leaves a timestamped file in /Library/Apple/Kernel/—a footprint that can be spotted with a simple grep.

Leveraging MBT

MBT (Mobile Backup Toolkit) is a free, open-source framework from Amnesty International that parses iOS backups and generates a JSON summary of file system trees, crash logs, and database snapshots Amnesty International — MBT Backup Analysis Tool (2023). Run MBT on both the clean and suspect backups and look for:

  • Orphaned binaries – files in /private/var/mobile/Library/Caches that aren’t present on the device.
  • Suspicious entries – any com.apple plist that references a third-party bundle identifier.
  • Deleted entries – records of files that were present in a prior backup but are missing now, suggesting a deliberate removal.

A simple diff script (diff -rq clean.backup/ suspect.backup/) will surface most anomalies in minutes.

Pitfalls & edge cases

Even with this workflow, I’ve run into a handful of gray areas:

  • Zero-click persistence – Some spyware can remain dormant in the background until the device is rebooted, making detection a race against time.
  • Backup reinfection – If the backup itself was compromised, a wipe will not help; you’ll end up restoring the same payload Citizen Lab — Pegasus 2021 Analysis (2021).
  • MDM blind spots – MDM can’t detect spyware that hides behind system extensions or in the iOS kernel; it only sees the app bundle identifiers.
  • False positives – Legitimate security tools (e.g., mobile antivirus apps) can leave behind large cache files that look like spyware remnants.
  • Legal & privacy – Forensic analysis can expose personal data that must be handled under GDPR or local privacy laws. Be sure to keep a chain of custody and only analyze data that’s necessary.

Because of these challenges, the industry still lacks a universally adopted IOC feed. Collaboration between academia, civil society, and commercial vendors is essential to keep the detection ecosystem up-to-date.

Quick FAQ

QA
Can I detect spyware without forensic tools?Rarely; most spyware is designed to stay invisible.
Is there an automated detection framework?No, current solutions rely on manual analysis.
How does MDM help?It flags unapproved apps like Hermit that can be blocked at the fleet level.
Can a full device wipe remove spyware?Yes, but only if the backup is clean; otherwise the spyware will be restored.
Does Apple patch spyware?Apple patches underlying vulnerabilities, but detection remains the onus of the user and security professionals.
Are there public IOCs?Very few; most organizations keep them internal.

Conclusion

The fight against commercial spyware on iOS is a high-stakes cat-and-mouse game. With each new iOS version, attackers find a fresh zero-day and a new delivery vector. For the mobile security professionals, the practical takeaway is to combine MDM inventory, SysDiagnose diagnostics, and backup analysis with a disciplined wipe-restore process. Keep the device’s firmware up to date, but don’t rely on that alone. The next step? Start sharing your findings with peers, publish IOCs in a secure, vetted channel, and push for an industry-wide spyware detection standard.

Last updated: December 14, 2025

Recommended Articles

iOS Zero-Day Nightmare: How I Uncovered a Kernel-Level Backdoor (and How to Detect It) | Brav

iOS Zero-Day Nightmare: How I Uncovered a Kernel-Level Backdoor (and How to Detect It)

I dissected a six-month iOS zero-day case, revealing kernel-level access, WebKit tricks, and hidden backdoors. Learn how to spot, mitigate, and defend.