C0c0n Deep Dive Android

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

Abstract

An end-to-end workshop covering Android security from OS architecture through the complete OWASP Mobile Top 10, hands-on exploitation with Drozer, dynamic instrumentation via Xposed, and secure coding practices.

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 c0c0n 2015 one-day Android security deep dive workshop is built around the Android Tamer environment and its beta Version 4. The course moves from Android OS and application fundamentals through penetration testing setup and methodology, the OWASP Mobile Top 10, hands-on application exploitation, automated testing with Drozer, dynamic instrumentation with the Xposed Framework, and closes on secure coding practices.

Summary

The course opens with expectations management: a fast-paced hands-on approach mixed with theory, covering Android security basics, reversing and auditing applications, and finding and exploiting vulnerabilities. The deck warns attendees not to expect to become an Android hacking expert or ninja in a single day.

The fundamentals section covers history from Android Inc.’s 2003 founding, Google’s 2005 acquisition, and the first release on November 5, 2007, through 57 percent tablet share and 84.4 percent smartphone share (Gartner and IDC figures from 2014). The security architecture stacks Linux kernel protections (ASLR, PIE, process isolation) with Android measures (read-only /system, bootloader unlock wiping /data, device administrator capabilities). Permissions are requested in AndroidManifest.xml at install or update time and accepted all or none, with bypasses via third-party exposed intents and rooting. Application basics cover Activities, Intents, Services, the SDK/NDK toolchain, ADB, fastboot, and signing with keytool and jarsigner.

The afternoon pivots to Android Tamer, the VM environment focused on Android security first launched in December 2011 at Clubhack 2011. Based on Ubuntu 14.04 LTS with command line tools updatable via apt-get, it spans ROM modding, rooting, development, pentesting, reverse engineering and malware analysis, wireless capture, and forensics. The pentest methodology contrasts blackbox and whitebox, with partial source audit possible via reversing, and defines analysis as data at rest, in transit, entry points, and logic flaws. Reverse engineering exploits that an APK is a Jar and a Jar is a ZIP: unzip, apktool, dex2jar, then JD-GUI or jad. Traffic interception runs passively with tcpdump and Shark for Android, and actively through proxies plus Burp’s CA certificate for SSL interception.

The rooting section walks the historical exploit timeline from Exploid through towelroot, CVE-2014-7911, and CVE-2014-4322. The OWASP Mobile Top 10 is covered risk by risk, from weak server side controls and insecure data storage through unintended data leakage, broken cryptography, client side injection, and lack of binary protections. Exploitation demos include content provider querying, SQL injection through exposed intents, drive-by APK downloads (NotCompatible), tapjacking, local file inclusion, the WebView JavaScript interface below Android 4.1.1, Cordova attacks, and the LastPass backup issue.

Automation comes via Drozer, covering attack surface analysis and content provider exploitation, with YSO Mobile Security Framework and LinkedIn QARK as alternatives. Dynamic instrumentation uses the Xposed Framework, which changes system and app behavior without touching any APKs, with changes held in memory so a reboot restores the original system; useful modules are Just Trust Me, DroidMon, and RootCloak. The closing Being Secure section covers write and consume secure code, monitor and patch upstream, test before publishing, act on the results and repeat, plus adb glue automation and Smali Scanner and Find Security Bugs source auditing.

Key Themes

  • Android OS fundamentals: history from the 2003 founding through Google’s 2005 acquisition to 84.4 percent smartphone marketshare, plus the partition and directory map of the Android filesystem.
  • Layered security and permissions: kernel protections (ASLR, PIE, dmesg_restrict, kptr_restrict) stacked with Android controls (read-only system partition, bootloader wipe, device admin), over an install-time all-or-none permission model with bypasses through exposed intents and rooting.
  • Application building blocks: Activities, Intents, Services, AndroidManifest.xml, SDK/NDK tooling, ADB operations, and jar-based app signing.
  • Android Tamer as the lab: a Ubuntu 14.04 LTS VM first launched at Clubhack 2011, packing rooting, development, pentesting, reversing, wireless capture, and forensics tools, all apt-get updatable.
  • Pentest methodology and the RE chain: blackbox versus whitebox, the four-step analysis of data at rest, in transit, entry points, and logic flaws, and the unzip, apktool, dex2jar, JD-GUI chain treating the APK as a ZIP.
  • Rooting and exploitation: the historical root exploit timeline up to towelroot and CVE-2014-7911, plus content provider abuse, SQL injection, drive-by APKs, tapjacking, LFI, WebView bridges below 4.1.1, Cordova attacks, and backup tampering.
  • OWASP Mobile Top 10 in practice: all ten risks grounded in named cases such as Outlook, Google Authenticator, PureVPN, GetBase CRM, and Yahoo Weather.
  • Automation and instrumentation: Drozer for attack surface analysis and provider exploitation, Xposed for runtime hooking with Just Trust Me, DroidMon, and RootCloak, and a secure development close of write and consume secure code, test, act, repeat.

Notable Points

  • Android held 57 percent tablet marketshare (Gartner, October 2014) and 84.4 percent smartphone share (IDC, 2014 Q3); the developer license cost was 25 USD.
  • Key partitions: /boot, /system (read-only by default), /recovery, /data, /cache, /misc, /sdcard, /ext-sdcard; /system/xbin holds root or high privilege executables, and kernel protections include dmesg_restrict and kptr_restrict.
  • Permissions are stored at /data/system/packages.xml, with permission groups at /etc/permissions/platform.xml.
  • Signing uses keytool and jarsigner; signature artifacts are MANIFEST.MF, CERT.RSA, and CERT.SF, printable via keytool -printcert -file META-INF/CERT.RSA.
  • Android Tamer was first launched in December 2011 at Clubhack 2011; Version 4 beta was used in this training, with release planned around March 1, 2015.
  • Passive traffic capture: tcpdump -w /data/local/output.pcap tcp port 80, pulled over adb and analyzed in Wireshark, or streamed live through nc on port 31337.
  • SSL interception: download Burp’s cacert.cer via http://burp, rename to cacert.crt, and install through Settings, Security, Install Certificate.
  • Historical rooting exploits: Exploid (CVE 2009-1185, udev NETLINK), RageAgainstTheCage (RLIMIT_NPROC), KillingInTheNameOf (Ashmem, ro.secure=0), Zimperlich (Zygote setuid), GingerBreak (vold NETLINK), adb backup issues, and kernel exploits memprod, towelroot, CVE-2014-7911, CVE-2014-4322.
  • The WebView JavaScript interface on Android below 4.1.1 exposed java.lang.Runtime, with the demo payload writing to /mnt/sdcard/XAEL.txt; the backup exploitation chain used adb backup, abe unpack, edit, repack, and adb restore, as demonstrated on the LastPass vulnerability found by Chris John Riley and patched; NotCompatible malware detects the user agent containing the name Android.
  • Drozer commands demonstrated include run app.package.list, run app.package.attacksurface, run app.provider.finduri, run scanner.provider.finduris, run app.provider.read, and drozer_check com.app.org; content provider querying uses adb shell content query --uri, and source auditing tools are Smali Scanner and Find Security Bugs, with YSO Mobile Security Framework and LinkedIn QARK referenced as additional assessment tools.

Notable Quotes

“FastPaced Hands-On approach mixed with Theory”

“To be an Android Hacking Expert/Ninja in a matter of single day.”

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

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

“since apps are in java partial source audit is possible via reversing application.”

“Too easy to decompile.”

“As all changes are done in the memory, you just need to deactivate the module and reboot to get your original system back.”

Embed This Presentation

See Also