Security Issues in Android Custom ROM’s

c0c0n 2011

07 October 2011

Talk: Security Issues in Android Custom ROM’s

Abstract

Android is one of the fastest growing mobile operating system from google has caught large amount of developer attention due to its open nature. We see large amount of community developers working on Custom aftermarket ROM’s and various stats suggest people using the stock OS is far less then the custom ROM users. Some of the Major Custom ROM makers Include Cyanogen and MIUI. This talk will focus on generic approaches taken by custom rom developers and number of security issues arising due to this. Along with ways and means to make sure the user remains secured. we will also be launching a custom application checking all these settings and suggesting action you need to take to get back to secure state.

Slides

Whitepaper

This paper attempts to look behind the wheels of android and keeping special focus on custom rom’s and basically check for security misconfiguration’s which could yield to device compromise, which may result in malware infection or data theft.

https://anantshri.info/articles/android_cust_rom_security.html

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.

Security Issues in Android (Custom ROM’s) was presented at c0c0n 2011. The talk explains what a custom ROM is and where aftermarket firmware comes from, then walks through the security-weak defaults commonly found in cooked ROMs, from USB debugging and ADB root mode to permissive system permissions, before closing with a proof-of-concept data theft tool and protection advice.

Summary

The agenda promised six stops: an introduction to the custom ROM concept, why a security review is needed, the security issues themselves, a proof-of-concept data theft tool, protection tips, and a demo. The talk started with the definition: an Android ROM is the OS firmware layer of the phone, generally consisting of the /system partition and sometimes /data, containing the kernel, Dalvik, libraries, framework, and vendor-provided applications.

Android basically has two kinds of firmware. Stock ROMs come pre-installed by manufacturers; custom ROMs are aftermarket versions not supported by the manufacturer, with CyanogenMod claimed as aftermarket firmware, MIUI Chinese by origin and mimicking iPhone looks, and OMFGB as a Gingerbread enhancement. The advantages slide explained the pull: mixing hardware and UI preferences, updates after carriers stop providing them, bleeding edge versions like 2.3.7, pre-rooted images, builds targeted at speed, gaming, performance, or battery, and overclocking. Sources included cyanogenmod.com, miui.org, the XDA forums, modaco, modmymobile, and many underground forums, with ROM cookers described as being in it for fun, profit, or the “they can” attitude.

The security case came from two directions: designing malware and exploits for Android is the next in thing, and employee pressure pushes Android into corporate infrastructure, with aftermarket distributions like CyanogenMod considered viable alternatives and work underway to implement them safely in corporate environments. Against that backdrop, the talk put seven practices under scrutiny: USB debugging enabled, ADB shell root mode, system permissions, installation from unknown sources, ADB shell over WiFi, SU access and settings, and custom recoveries.

Each practice got its own treatment. USB debugging allows pushing and pulling files, remounting system partitions, installing software without prompts, and fastboot with different kernels. ADB shell root mode is a special setting making adb run as root, activated at boot time through build.prop inside the boot image ramdisk, with a pointed aside about who pays attention to the other end of a charging dock. ADB over WiFi exposes the same shell over the wireless network via service.adb.tcp.port, and combined with ro.secure it effectively hands over the device, though the deck noted this was hypothetical with no known usage found so far. System permissions matter because /system should be read-only as the phone’s critical section, yet cookers were observed keeping 777 settings, and the slide invoked rootkits, trojans, and malware. Unknown source installation gets enabled by aftermarket forum practice, bypassing Android Market restrictions. SU access marks a rooted device, and default protection from unauthorized execution is limited, with Superuser.apk the only known protection. Custom recovery software provides unrestricted root access by default, and putting a phone into recovery mode is as simple as rebooting and pressing backspace or volume-down until recovery starts.

The proof-of-concept demo showed a data theft tool built on these weaknesses, deliberately not developed to a large extent to avoid script kiddie misuse. Protection advice split by audience: developers should avoid settings not required for normal users and recommend closing the unknown source setting; users should take a closer look at the development process, ask questions, and run the “Are You Insecure” audit tool, which got its own demo.

Key Themes

Notable Points

  1. ROM definition: the OS firmware layer of the phone, generally the /system partition, possibly including /data, containing kernel, Dalvik, libraries, framework, and vendor-provided applications.
  2. Named examples: CyanogenMod (claimed as aftermarket firmware), MIUI (Chinese by origin, mimics iPhone looks), OMFGB (Gingerbread enhanced); sources included cyanogenmod.com, miui.org, forum.xda-developers.com, android.modaco.com, and modmymobile.com, plus underground forums.
  3. ROM cookers are described as being in it for fun, profit, or the “they can” attitude; advantages included updates after carrier support ends, bleeding edge 2.3.7, pre-rooted images, targeted builds, and overclocking or underclocking.
  4. Driver for the review: malware and exploit design for Android, employee pressure to integrate Android into corporate infrastructure, and ongoing work to implement CyanogenMod safely in corporate environments.
  5. USB debugging supports push/pull of files and folders, remounting system partitions, installation of software without prompts, and fastboot with different kernels.
  6. ADB shell root mode is a special boot-time setting: boot.img leads to ramdisk.cpio.gz and build.prop, with the deck asking whether anyone pays attention to the other end of a charging dock.
  7. ADB shell over WiFi runs at boot time or runtime via service.adb.tcp.port, and combined with ro.secure the user literally hands over the device; the deck flagged it as hypothetical with no known usage found so far.
  8. /system should be read-only as the critical section, but cookers were observed keeping 777 settings for /system, opening the door for rootkits, trojans, and malware.
  9. The SU binary is a direct indication of a rooted device; default protection from unauthorized execution is not available, and Superuser.apk is the only known protection; custom recovery software provides unrestricted root access by default, reachable by reboot then pressing backspace or volume-down until recovery starts.
  10. The demo data theft tool was intentionally not developed to a large extent to avoid a script kiddie approach; recommendations for users were to examine the development process, ask questions, and run the “Are You Insecure” tool, while organizations should audit ROM security settings before corporate approval.

Notable Quotes

“Do you pay attention to the other end of charging Dock. :)”

“Combine with our beloved ro.secure, you literally handover your device shouting : ”PLEASE OWN ME”.”

“Its observed at lots of places where Cooker’s keep 777 settings for /system”

“Remember ROOTKITS, TROJAN, MALWARE”

“With greater Power comes greater responsibility.”

“DEMO IS INTENTIONALLY NOT DEVELOPED TO A LARGE EXTEND TO AVOID SCRIPT KIDDIE APPROACH”