Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Hello folks, today we’ll be discussing Android security from a Red Team perspective. Android, an open-source operating system based on the Linux kernel, started in 2003 under Android Inc., a company later acquired by Google in 2005. Originally intended as a smartphone operating system by 2004, Android has now become the most widely used OS globally. According to Business of Apps, Android is operational in over 190 countries with more than one billion active users. By 2023, the Google Play Store hosted over 2.6 million apps, leading to 113 billion downloads. With such a vast user base, Android security has become a critical area of focus.
Google reported a 50% increase in zero-day exploits in 2023 compared to the previous year, identifying 97 vulnerabilities—48 related to espionage actors and 49 attributed to financially motivated hackers. This surge in vulnerabilities highlights the need for deeper security insights, especially for Red Teamers. Android is based on an ARM Linux kernel, responsible for core functions like memory management and hardware-driver interaction. Its kernel also implements critical security mechanisms such as the permission system, integral to Android’s sandboxing model, which isolates apps from each other for enhanced security.
Android’s ecosystem includes native libraries written in C or C++, providing low-level functionality across various system components. Initially, Android app development relied heavily on Java, but in recent years, Kotlin has become the preferred language. Both languages remain interoperable, allowing developers to write apps using either.
The Hardware Abstraction Layer (HAL) provides a vital security boundary by enabling the operating system to interface with hardware components (e.g., cameras, sensors) without direct driver access. Meanwhile, the Android Runtime (ART), which replaced the older Dalvik VM, enhances performance and security by converting bytecode into native machine code using Ahead-of-Time (AOT) compilation.
Finally, the Application Framework delivers essential APIs for developers, offering structured access to Android’s core features. Components like the Activity Manager (app lifecycle management), Content Providers (data sharing), and the Resource Manager (handling UI layouts) streamline app development. Critical system services like the Location Manager and Notification Manager ensure efficient resource handling while maintaining modularity and security.
With this architecture in mind, Android’s security landscape presents both challenges and opportunities for those involved in vulnerability research and Red Team activities.
Figure 1 Android system architecture
VMware has made its Workstation Desktop Hypervisor products free for non-commercial personal use. These tools, widely used for creating virtual environments on Windows, Linux, and macOS, are essential for learning, testing software, and understanding virtualization.
VMware has announced changes to their product lineup following their integration with Broadcom, aiming to continue providing value to their community and customers. The free versions allow individuals to explore virtualization without cost, while commercial users can leverage them for development, testing, and vSphere integration.
Figure 2 VMware provide option for personal use.
While it’s not typically necessary to install Android on a physical computer, there are instances where running Android on a virtual machine (VM) can be useful, such as for app development and testing. We’ll setup the android on VMware, enable android debug bridge ADB with root access, then install Burp Suite certificates to intercept and manipulate the requests coming from the machine.
There are many aliases for ruining android like Android-x86 project or Bliss OS but for simplicity we’ll create Android x86 image on VMware.
File
and select New Virtual Machine
.Typical
then click Next
.Linux
and version of Other Linux 3.x kernel
.Customize Harware ...
kernel /android-9.0-r2/kernel nomodeset xforcevesa root=/dev/ram0 androidboot.selinux=permissive SRC=/android-9.0-r2
CD/DVD (IDE)
and chose the folder where you’ve the android .iso
file, close the wizard and start the machine.Installation
.C
to begin with partitions creation.ext4
as a filesystem./system
directory as read and write.Android Pi 9.0 R2
, then click e
to edit the booting command and change quiet to nomodeset xforcevesa then click b
to boot from it.VirtWifi
will appears and you can access the internet to enter a Google account to install apps.Previously, we modified the GRUB configuration to boot the Android VM in VMware, but those changes were not saved after a reboot. To make the changes permanent, we need to edit the GRUB configuration file.
mkdir /mnt/sda
mount /dev/block/sda1 /mnt/sda
vi
text editor: vi /mnt/sda/grub/menu.lst
quiet
with nomodeset xforcevesa
, so it looks like this: kernel /android-9.0-r2/kernel nomodeset xforcevesa root=/dev/ram0 androidboot.selinux=permissive SRC=/android-9.0-r2
:wq
to save the changes and exit the editor.Your changes will now be permanent after rebooting the Android VM.
Edit Virtual Machine Settins
shell adb connect 192.168.0.112:5555 adb devices
Now we’ve completed configuring the android machine. It’s playing the role of real victims, let’s configure the attacker machine. We’ll be using the Mobexler OS that’s a powerful and versatile mobile security testing framework designed to help penetration testers and security researchers perform comprehensive assessments of mobile applications. It offers a wide range of tools and features tailored for both Android and iOS platforms.
Key capabilities of Mobexler include:
Let’s start to make our machine ready for hacking:
File
menu on VMware chose Open
, then select the OVF file of the MobexlerIn today’s session, we’ve delved into Android security from a Red Team perspective, understanding both Android’s extensive architecture and the security mechanisms within. With over one billion active users globally, Android’s popularity makes it a prime target for vulnerabilities and exploitation. However, its layered architecture—complete with a sandboxing model, permission systems, and the Android Runtime (ART)—adds substantial security measures to protect users. Setting up an Android VM, configuring Wireless ADB, adding Burp Suite for network interception, and using Mobexler enhances our toolkit for rigorous security testing.
For Red Teamers, these tools are invaluable for identifying and addressing weaknesses before they can be exploited by malicious actors. By continuously adapting to new security developments, we can improve our defense strategies, making Android a safer OS for everyone.