Read these on cs.android.com, which gives you cross-references, blame and
history. See 07-AOSP for the navigation technique — in particular, search
for a string you saw in an exception message, because that is almost always the fastest route to
the enforcing function.
The files that decide whether an app can reach a component¶
You want checkComponentPermission. The single most important function in this chapter — four rules that answer every "can this app reach that component?" question, including the same-UID rule the confused deputy abuses.
You need to know exactly where Permission Denial: starting Intent is produced, and what else can reject a start before permissions are even considered.
You are proving URI-grant theft and need to see who is recorded as the granter when FLAG_GRANT_READ_URI_PERMISSION is honoured. This file is the reason the deputy attack works.
You want to see, in binder_transaction(), that the sender's UID is copied from the calling task's credentials and not from the parcel. This is the source of the "cannot be forged" guarantee.
frameworks/native/libs/binder/IPCThreadState.cpp
The BC_/BR_ command loop, and where mCallingUid / mCallingPid are stored in thread-local state for the duration of a transaction.
frameworks/native/libs/binder/Parcel.cpp
You are hand-crafting a transaction, or investigating a Parcel/Bundle mismatch.
frameworks/base/core/java/android/os/Binder.java
clearCallingIdentity, restoreCallingIdentity, execTransact, and the getCallingUidOrThrow variant that refuses to silently return your own UID.
frameworks/base/core/jni/android_util_Binder.cpp
How Binder.getCallingUid() in Java reaches the native thread state.
frameworks/native/cmds/servicemanager/
Name registration and the SELinux hook that decides who may addService — which is why an ordinary app cannot publish a named system service.
You want to see, in ten lines, that the single-argument constructor defaults to Namespace.ABSTRACT. This is §3.10's entire premise, straight from the source.
The JNI layer that writes the NUL into sun_path[0] and computes the address length. There is no permission check anywhere in the path, because the kernel has nothing to check against.
The right tool for reachability proof, because its agent runs as an ordinary app. scanner.provider.injection and scanner.provider.traversal are the two highest-value commands in the whole tool. See 54-Objection for the alternative workflow.
Fine for a first-pass component inventory. Understand that it reads the manifest, so it is structurally blind to abstract sockets, localhost listeners, shared memory and file modes. See 55-MobSF.
strace
device, root
-e trace=socket,bind,connect,accept catches a socket being created at the moment it happens, including from native code no Java hook would see.
MASVS-PLATFORM-1 — "the app uses IPC mechanisms securely" — is the control this entire chapter maps to. MASVS-PLATFORM-2 covers WebViews, which is where deep-link findings usually terminate. MASVS-PLATFORM-3 covers UI-level abuse reached through IPC: task hijacking, tapjacking, overlays.
The "Android Platform APIs" test group is the closest published procedure to §3.22. Use it as a coverage checklist in a report — not as a substitute for the manual reach-through analysis, which no checklist can encode.
MASVS-STORAGE-1 / -2
World-readable files, shared storage, clipboard and logs — the storage-shaped half of the IPC surface. See 33-Storage.
MASVS-CODE-4
"Validates and sanitises all untrusted inputs" — Intent extras, provider parameters and socket protocols are all untrusted inputs.
M8 Security Misconfiguration and M4 Insufficient Input/Output Validation are the two buckets IPC findings land in when a client asks for Top-10 mapping.
MASTG test apps (UnCrackable and the MASTG app series)
Practice targets with deliberately exposed components. See 80-Appendix.
The origin of most component-hijacking static analysis. Read it to understand why your scanner produces the false positives it does.
Arzt et al., FlowDroid, PLDI 2014
Taint analysis for Android, and the basis of most automated IPC-flow tooling. The source/sink framing is the vocabulary to use when designing detection at scale.
man 7 unix
The authoritative description of the abstract namespace and SO_PEERCRED. Two paragraphs that settle every argument about §3.10.
man 2 memfd_create, man 2 fcntl (F_ADD_SEALS)
memfd and file sealing, for the shared-memory fix in §3.13.
What Google itself considers reportable, and its severity model — a useful external anchor when a client disputes a rating.
Note on CVE citation. This chapter deliberately describes vulnerability classes rather than
naming identifiers. Android IPC bugs are numerous, version-specific and frequently
vendor-specific, and a misattributed CVE in a client report is worse than no citation at all. When
you need a specific reference, pull it from the bulletin for the affected release, verify the
affected versions yourself, and cite it with the release it applies to. Never cite one from memory
or from a blog post.
The best structural account of the permission and IPC model, including Binder-level identity. Dated in specifics, still the right mental model.
Android Internals: A Confectioner's Cookbook — Jonathan Levin
The deepest published treatment of the low-level plumbing, including servicemanager and the binder driver. Occasionally idiosyncratic, unmatched on detail.
The Mobile Application Hacker's Handbook — Chell, Erasmus, Colley, Whitehouse
Dated on tooling, but the IPC methodology chapters are still a good model for how to structure an assessment.
The Android Hacker's Handbook — Drake et al.
Historical, and useful precisely for that: it shows what the surface looked like before the mitigations, which is what a low-targetSdk app still gets.
Secure Coding in C and C++ — Seacord
Not Android, but the shared-memory TOCTOU material in §3.13 is a general systems problem, and this is where to learn it properly.
Search by topic rather than URL, since hosting moves:
Android intent redirection and URI-grant theft — Black Hat and DEF CON mobile tracks; several
vendors have published full-chain writeups.
Package visibility and <queries> in practice — Android Dev Summit sessions cover the developer
side; the security implications are mostly in blog form.
Binder internals and fuzzing — OffensiveCon and Recon.
Deep links, App Links and OAuth on mobile — OWASP AppSec and the IETF OAuth working group's mobile
best-practice discussions.
The mandatory access control that decides whether untrusted_app may reach a socket that DAC does not protect. This is the chapter that explains why a shell result and an app result can differ.