Skip to content
← RegistryDossier · 6 steps · 5 edges

iOS URL scheme hijack → OAuth code theft

Multiple apps register the same custom URL scheme — a rogue app installed alongside the target receives the OAuth callback containing the authorisation code, then exchanges it for tokens.

Filed by AD Knowledge Base
§ Kill-chainDrag · zoom · scroll

§ Context

Assumed environment: target app uses an OAuth flow that returns to a custom URL scheme (myapp://oauth/callback). A rogue app declares the same scheme. iOS < 14 doesn't disambiguate.

§ Steps

  1. 01
    Sideload / TestFlight to victimInitial Access
    T1078Valid Accounts
  2. 02
    Victim initiates OAuth — callback hits rogueExecution
    T1204User Execution
  3. 03
    Exchange code for tokens at providerLateral Movement
    T1550Use Alternate Authentication Material
  4. 04
    Capture authorisation codeCredential Access
    W-OAUTH-MISCONFIGOAuth — redirect_uri Misconfig
  5. 05
    Identify target's URL schemeReconnaissance
    MOB-APK-REVERSEAPK Reverse Engineering
  6. 06
    Build rogue app with matching schemeInitial Access
    MOB-IOS-URL-SCHEMEiOS URL Scheme Hijack

§ References

§ Frequently asked

What is the "iOS URL scheme hijack → OAuth code theft" attack path?
Multiple apps register the same custom URL scheme — a rogue app installed alongside the target receives the OAuth callback containing the authorisation code, then exchanges it for tokens. It chains 6 steps drawn from real-world offensive-security techniques.
What starting position does this attack require?
The first step is Sideload / TestFlight to victim (T1078) — a initial access primitive. Assumed environment: target app uses an OAuth flow that returns to a custom URL scheme (myapp://oauth/callback).
What is the final impact of this kill-chain?
The final step lands on Build rogue app with matching scheme (MOB-IOS-URL-SCHEME), which falls under Initial Access. From here, an operator typically pivots into post-exploitation or maintains persistence.
How can defenders detect or prevent this attack?
Detection and prevention vary per step. Refer to each linked MITRE ATT&CK entry under "References" — every technique on that page lists defensive controls, detection telemetry, and known threat-actor usage.

§ Related dossiers