Xtreme Android Exploitation Lab

Nullcon 2017

01 March 2017

AI Generated Summary

AI Generated Content Disclaimer

Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.

The “Xtreme Android Exploitation Lab” was a two-day workshop at Nullcon 2017 delivered by Anant Shrivastava and Anto Joseph, a security engineer at Intel. The training takes a hands-on, scenario-based approach to Android security: Day 1 covers APK reverse engineering, traffic interception, SSL pinning bypass, root detection evasion, and HTML5 application analysis. Day 2 moves to dynamic analysis, instrumentation frameworks (Xposed and Frida), and Android fuzzing, with the lab running on Android Tamer as the base environment plus a Genymotion emulator and its exercises mapped against the OWASP Mobile Top 10 risks.

Summary

The opening slide set the philosophy: rather than spending time on theory, the lab teaches how things work and performs the same attacks an attacker would use to gain access. Setup used VirtualBox with two trainer-provided VMs, Android Tamer (Nullcon Edition) and a Genymotion Android VM. The course explicitly said it was not an OWASP Top 10 course, being built on real-world problems.

Day 1 began with understanding Android application code: an APK is modified Java code, a ZIP/JAR containing classes.dex, resources, and binary-encoded XML. Decompilation produces Java (not always accurate) or Smali (accurate bytecode), with dex2jar or enjarify converting DEX to JAR and apktool decoding binary XML; Tamer ships a custom apk2java script automating the pipeline and producing Java from jad and jadx at once. Obfuscated code was handled through the usual techniques and tools (Simplify, JEB with custom modules), with the verdict that obfuscation defers application analysis and should not be considered a replacement for best practices. Dalvik and ART internals followed: register-based bytecode, dex versus device-optimized odex/oat, Dalvik’s dexopt, ART dropping JIT, and Oat2dex for Lollipop-era apps.

Traffic interception started with proxy configuration for Burp Suite, Charles, and OWASP ZAP. The PKI section declared the system broken: the OS trusts all CAs in the trust store and trusts root CAs rather than validating the full chain. Breaking HTTPS meant extracting the proxy’s root CA and importing it into Android via adb push or the browser. Certificate pinning was explained as validating a hardcoded pin through default platform code, a framework, or custom code, with two bypass routes: decompile the APK and modify the pinning code, or use the Xposed framework with JustTrustMe. Root detection was framed from both sides: apps check for binaries, command availability, and superuser controller apps, while pentesters bypass by hiding binaries or overloading the system calls that check for them. Day 1 also covered HTML5 hybrid applications built with PhoneGap or Titanium (source disclosure, DOM XSS, SSL misconfigurations, storage leakage), exercised against TripCase, static analysis with Mobilizer and droidscan.sh, and the c0c0n application challenge requiring the full decompile-modify-recompile cycle.

Day 2 opened with manual dynamic analysis using adb, ddms/Android Monitor, and pidcat, inspecting /data/data/<app>/, /sdcard/, and /sdcard1/ for leakage. Hooking and dynamic instrumentation came next: the Xposed framework modifies runtime behavior without recompilation; Frida was introduced as a dynamic code instrumentation toolkit injecting JavaScript snippets into native apps, exercised through Anto Joseph’s frida-android-hooks. The final block introduced fuzzing, with a DroidFuzzer lab covering dataset generation, target runs, glue scripts, and log collection. The OWASP mapping showed M2 through M10 addressed with M1 deferred to the separate Xtreme Web Hacking course, and a CTF challenge closed the class with solutions accepted by email.

Key Themes

Notable Points

Notable Quotes

“The entire lab is designed in a scenario based situation where we will perform the same attacks that an attacker can do to gain access.”

“Accuracy ~ complexity”

“PKI is broken”

“Welcome to Revocation hell and CRL Nightmare”

“should not be considered a replacement for best practices.”

“Let the automaton take over”

Social chatter