~/talk

Breaking the Android ClassLoader

Talkat droidCon NYC 2018 · 2018-08-27..08-28· [android, java]
github:hzsweers
slides:none on file

Demonstrates hijacking an app's class loading at runtime by reflectively replacing class loader fields and constructing loaders from APK paths or packaged dex bytes, implemented as the Black Mirror tool and published on GitHub at hswearblackmirror. Uses Android's PathClassLoader and hidden constructor taking assets/raw dex buffers to load classes, read BuildConfig values, invoke Retrofit interfaces and even POST an image through a neighbor app's API. Works on many devices including Pixel, but Samsung models block fields and Android P closes some reflective paths.

AI-written summary · about

  1. 0:00Introduction
  2. 1:56ClassLoader delegation model
  3. 3:47Android ClassLoader specifics
  4. 5:09Friday night hacking story
  5. 8:16Reflection and PathClassLoader
  6. 12:52BlackMirror project setup
  7. 14:57Interceptors for class loading
  8. 16:01Widget replacement attempt
  9. 18:27Loading code from assets
  10. 20:33Loading code from resources
  11. 21:36Running neighbor app code
  12. 23:43Extracting BuildConfig secrets
  13. 26:37Calling neighbor API methods
  14. 28:23Play Services and security
  15. 29:05Decompiler apps like Show Java
  16. 30:08Android P limitations
  17. 31:10Ethical considerations
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.