Nullcon Android

Nullcon 2015 Goa, India
1 / 107
Slide 1 of Nullcon Android
Slide 2 of Nullcon Android
Slide 3 of Nullcon Android
Slide 4 of Nullcon Android
Slide 5 of Nullcon Android
Slide 6 of Nullcon Android
Slide 7 of Nullcon Android
Slide 8 of Nullcon Android
Slide 9 of Nullcon Android
Slide 10 of Nullcon Android
Slide 11 of Nullcon Android
Slide 12 of Nullcon Android
Slide 13 of Nullcon Android
Slide 14 of Nullcon Android
Slide 15 of Nullcon Android
Slide 16 of Nullcon Android
Slide 17 of Nullcon Android
Slide 18 of Nullcon Android
Slide 19 of Nullcon Android
Slide 20 of Nullcon Android
Slide 21 of Nullcon Android
Slide 22 of Nullcon Android
Slide 23 of Nullcon Android
Slide 24 of Nullcon Android
Slide 25 of Nullcon Android
Slide 26 of Nullcon Android
Slide 27 of Nullcon Android
Slide 28 of Nullcon Android
Slide 29 of Nullcon Android
Slide 30 of Nullcon Android
Slide 31 of Nullcon Android
Slide 32 of Nullcon Android
Slide 33 of Nullcon Android
Slide 34 of Nullcon Android
Slide 35 of Nullcon Android
Slide 36 of Nullcon Android
Slide 37 of Nullcon Android
Slide 38 of Nullcon Android
Slide 39 of Nullcon Android
Slide 40 of Nullcon Android
Slide 41 of Nullcon Android
Slide 42 of Nullcon Android
Slide 43 of Nullcon Android
Slide 44 of Nullcon Android
Slide 45 of Nullcon Android
Slide 46 of Nullcon Android
Slide 47 of Nullcon Android
Slide 48 of Nullcon Android
Slide 49 of Nullcon Android
Slide 50 of Nullcon Android
Slide 51 of Nullcon Android
Slide 52 of Nullcon Android
Slide 53 of Nullcon Android
Slide 54 of Nullcon Android
Slide 55 of Nullcon Android
Slide 56 of Nullcon Android
Slide 57 of Nullcon Android
Slide 58 of Nullcon Android
Slide 59 of Nullcon Android
Slide 60 of Nullcon Android
Slide 61 of Nullcon Android
Slide 62 of Nullcon Android
Slide 63 of Nullcon Android
Slide 64 of Nullcon Android
Slide 65 of Nullcon Android
Slide 66 of Nullcon Android
Slide 67 of Nullcon Android
Slide 68 of Nullcon Android
Slide 69 of Nullcon Android
Slide 70 of Nullcon Android
Slide 71 of Nullcon Android
Slide 72 of Nullcon Android
Slide 73 of Nullcon Android
Slide 74 of Nullcon Android
Slide 75 of Nullcon Android
Slide 76 of Nullcon Android
Slide 77 of Nullcon Android
Slide 78 of Nullcon Android
Slide 79 of Nullcon Android
Slide 80 of Nullcon Android
Slide 81 of Nullcon Android
Slide 82 of Nullcon Android
Slide 83 of Nullcon Android
Slide 84 of Nullcon Android
Slide 85 of Nullcon Android
Slide 86 of Nullcon Android
Slide 87 of Nullcon Android
Slide 88 of Nullcon Android
Slide 89 of Nullcon Android
Slide 90 of Nullcon Android
Slide 91 of Nullcon Android
Slide 92 of Nullcon Android
Slide 93 of Nullcon Android
Slide 94 of Nullcon Android
Slide 95 of Nullcon Android
Slide 96 of Nullcon Android
Slide 97 of Nullcon Android
Slide 98 of Nullcon Android
Slide 99 of Nullcon Android
Slide 100 of Nullcon Android
Slide 101 of Nullcon Android
Slide 102 of Nullcon Android
Slide 103 of Nullcon Android
Slide 104 of Nullcon Android
Slide 105 of Nullcon Android
Slide 106 of Nullcon Android
Slide 107 of Nullcon Android

Abstract

An intensive two-day hands-on Android exploitation training covering the OWASP Mobile Top 10, reverse engineering, traffic interception, automated exploitation with Drozer, and ARM-based exploitation.

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 Nullcon 2015 Xtreme Android Exploitation Lab was a two-day training co-delivered alongside Aditya Gupta, founder of Attify and author of Learning Pentesting for Android. It covers Android basics and the security model, application development fundamentals, a pentesting environment built on Android Tamer, the OWASP Mobile Top 10, reverse engineering and traffic interception, rooting fundamentals, application exploitation, automated analysis with Drozer, dynamic instrumentation with Introspy, ARM basics, and Android forensics and malware analysis.

Summary

The two-day, eight-session plan: Day 1 runs Android basics, the security model, development basics, the pentesting environment, App Kung-Fu, and exploiting logic and code flaws; Day 2 covers ARM basics and Dex labs, automated analysis with dynamic instrumentation frameworks, further exploitation plus forensics and malware analysis, and a closing Being secure session. Expectations are honest: fast-paced hands-on work mixed with theory, but nobody becomes an Android hacking expert or ninja in two days.

Android fundamentals run from Android Inc.’s 2003 founding, Google’s 2005 acquisition, and the first release on November 5, 2007, through 57 percent tablet and 84.4 percent smartphone marketshare. The filesystem is mapped partition and folder by folder. The architecture stacks kernel protections (ASLR, PIE, process isolation) over Android controls: read-only /system, bootloader wipe on unlock, and device administrator powers. The permission model is examined with a zero permission application demo, with bypasses via third-party exposed intents and rooting. Development basics cover Activities, Intents, Services, the manifest, the SDK/NDK toolchain, ADB, fastboot, and signing with keytool and jarsigner.

Android Tamer, the VM environment focused on Android security first launched at Clubhack 2011, was used as a Version 4 beta ahead of its planned March 1, 2015 launch, an Ubuntu 14.04 LTS build with apt-get updates. Methodology contrasts blackbox and whitebox (partial whitebox is possible since apps are in Java) and defines analysis as data at rest, in transit, entry points, and logic flaws. Reverse engineering exploits that an APK is simply a Jar, a ZIP: unzip, apktool, dex2jar, then JD-GUI or jad. Traffic interception runs passive with tcpdump, and active with proxies plus Burp’s CA certificate.

The rooting timeline runs from Exploid through towelroot and CVE-2014-7911. The OWASP Mobile Top 10 is covered with named examples, from insecure data storage (Outlook, Google Authenticator) through unintended data leakage (Firefox profile leakage in logcat) and broken cryptography to lack of binary protections.

Application exploitation covers insecure file storage checked with the fsdiff.rb audit tool, the native code world-readable-writable bug found by Tavis Ormandy, SQLite database dumping, content provider and SQL injection exploitation, drive-by attacks (NotCompatible), tapjacking, LFI, the WebView JavaScript interface below Android 4.1.1, Cordova scripting, and the LastPass backup bug found by Chris John Riley.

Automation and instrumentation close the technical arc. The Drozer framework from MWR InfoSecurity covers package listing, attack surface analysis, content provider discovery and querying, debuggable app listing, and a drozer_check wrapper. Hooking moves from manual Apktool and Log.d work to Introspy on MobileSubstrate, pulling introspy.db from the app’s databases directory and processing it. Attify’s AppWatch API automates vulnerability tracking via an appwatch.io API key and a vuln() call.

Key Themes

  • Android internals: history, layered architecture, partition map, and directory layout, establishing where app data, system apps, and privileged executables live.
  • Security model and permission system: kernel protections (ASLR, PIE, process isolation, dmesg_restrict) plus Android controls (read-only /system, bootloader wipe, device admin policies), over install-time all-or-none consent demonstrated with a zero permission application and bypassed via exposed intents and rooting.
  • Android Tamer as the lab: a Ubuntu 14.04 LTS VM focused on Android security with modding, rooting, development, pentesting, reversing, wireless capture, and forensics tooling, paired with Genymotion.
  • Methodology and reverse engineering: blackbox versus whitebox with Java’s reversibility enabling partial source audits, the four-part analysis of data at rest, in transit, entry points, and logic flaws, and the unzip, apktool, dex2jar, JD-GUI chain.
  • Traffic interception and rooting history: passive tcpdump and Shark for Android with live nc streaming, active proxies and Burp CA installation, and the exploit timeline from Exploid through towelroot and CVE-2014-7911.
  • OWASP Mobile Top 10: all ten risks grounded in real cases from Outlook and Google Authenticator to GetBase CRM and Yahoo Weather.
  • Application exploitation: insecure file storage, native code permission bugs, SQLite dumping, content providers, SQL injection, drive-by APKs, tapjacking, LFI, WebView JavaScript bridges, Cordova attacks, and backup tampering.
  • Automated analysis and instrumentation: Drozer’s attack surface and content provider modules, Introspy over Cydia Substrate exporting captured calls to introspy.db, and the AppWatch API for vulnerability tracking.

Notable Points

  • Android market figures used: 57 percent tablet share (Gartner, October 2014), 84.4 percent smartphone share (IDC, 2014 Q3), 25 USD developer license.
  • Permissions are stored at /data/system/packages.xml, with groups at /etc/permissions/platform.xml; a zero permission application demo shows the model’s edges, kernel protections include dmesg_restrict and kptr_restrict, and bootloader unlock results in a /data wipe.
  • Signing artifacts: MANIFEST.MF, CERT.RSA, CERT.SF; signatures print via keytool -printcert -file META-INF/CERT.RSA.
  • Android Tamer Version 4 beta was used in this training, with release planned around March 1, 2015; tools update via apt-get.
  • Live capture: tcpdump -w /data/local/output.pcap tcp port 80 pulled over adb, or tcpdump -w - | nc -l -p 31337 streamed through adb forward tcp:12345 tcp:31337 into Wireshark.
  • SSL interception: open http://burp on the device to fetch cacert.cer, rename to cacert.crt, install under Settings, Security, Install Certificate. Emulator proxy: emulator -avd [avd name] -http-proxy 127.0.0.1:8080; the host machine’s IP from the emulator is 10.0.2.2.
  • Rooting exploits: Exploid (CVE 2009-1185), RageAgainstTheCage (RLIMIT_NPROC), KillingInTheNameOf (ro.secure=0), Zimperlich (Zygote), GingerBreak (vold), adb backup mount timing and directory traversal, and kernel exploits memprod, towelroot, CVE-2014-7911, CVE-2014-4322.
  • Named examples: Firefox profile information leakage via logcat, Twitter Vine and older WhatsApp versions for insecure file storage, and the native code bug where files created using native code are world readable and writable by default, found by Tavis Ormandy of Google; database inspection uses sqlite3 database.db .tables and .dump against /data/data/app_name/databases.
  • Backup exploitation chain: adb backup com.app.android -f app.ab, abe unpack, tar edit, star -c -v -f app_new.tar -no-dirslash list=app.list, abe pack, adb restore; the LastPass vulnerability was found by Chris John Riley and is patched. NotCompatible malware detects the user agent containing the name Android; the WebView payload writes “Device Exploited” to /mnt/sdcard/XAEL.txt via java.lang.Runtime on Android below 4.1.1.
  • Introspy hooking steps: install Busybox, CydiaSubstrate, reboot, Introspy core, Introspy Config, select functions; results come from adb pull of introspy.db and python introspy.py -p android -o Appname appname.db. AppWatch API usage: import Appwatch, app=Appwatch(), reg=app.Projects('API_KEY'), reg.list_projects(), reg.retrieve_project(NUM), reg.vuln().

Notable Quotes

“FastPaced Hands-On approach mixed with Theory”

“To be an Android Hacking Expert/Ninja in a matter of 2 days.”

“Provides the most extensive Collection of tools for android security.”

“APK is simply a Jar == TAR == ZIP”

“Too easy to decompile.”

“Remember click-jacking”

“Often times apps don’t leak logs”

“Debugging and Analysing at each method is painful and tiring job”

Resources

Embed This Presentation

See Also