Shelving it rather than Ditching it: Dynamically Debloating DEX and Native Methods of Android Applications without APK Modification

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Zhang, Zicheng, Liu, Jiakun, Thung, Ferdian, Ma, Haoyu, Li, Rui, Tun, Yan Naing, Minn, Wei, Shar, Lwin Khin, Maoz, Shahar, Toch, Eran, Lo, David, Wong, Joshua, Gao, Debin
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910777958465536
author Zhang, Zicheng
Liu, Jiakun
Thung, Ferdian
Ma, Haoyu
Li, Rui
Tun, Yan Naing
Minn, Wei
Shar, Lwin Khin
Maoz, Shahar
Toch, Eran
Lo, David
Wong, Joshua
Gao, Debin
author_facet Zhang, Zicheng
Liu, Jiakun
Thung, Ferdian
Ma, Haoyu
Li, Rui
Tun, Yan Naing
Minn, Wei
Shar, Lwin Khin
Maoz, Shahar
Toch, Eran
Lo, David
Wong, Joshua
Gao, Debin
contents Today's Android developers tend to include numerous features to accommodate diverse user requirements, which inevitably leads to bloated apps. Yet more often than not, only a fraction of these features are frequently utilized by users, thus a bloated app costs dearly in potential vulnerabilities, expanded attack surfaces, and additional resource consumption. Especially in the event of severe security incidents, users have the need to block vulnerable functionalities immediately. Existing works have proposed various code debloating approaches for identifying and removing features of executable components. However, they typically involve static modification of files (and, for Android apps, repackaging of APKs, too), which lacks user convenience let alone undermining the security model of Android due to the compromising of public key verification and code integrity checks. This paper introduces 3DNDroid, a Dynamic Debloating approach targeting both DEX and Native methods in AnDroid apps. Using an unprivileged management app in tandem with a customized Android OS, 3DNDroid dynamically reduces unnecessary code loading during app execution based on a pre-generated debloating schema from static or dynamic analyses. It intercepts invocations of debloated bytecode methods to prevent their interpretation, compilation, and execution, while zero-filling memory spaces of debloated native methods during code loading. Evaluation demonstrates 3DNDroid's ability to debloat 187 DEX methods and 30 native methods across 55 real-world apps, removing over 10K Return-Oriented Programming (ROP) gadgets. Case studies confirm its effectiveness in mitigating vulnerabilities, and performance assessments highlight its resource-saving advantages over non-debloated apps.
format Preprint
id arxiv_https___arxiv_org_abs_2501_04963
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Shelving it rather than Ditching it: Dynamically Debloating DEX and Native Methods of Android Applications without APK Modification
Zhang, Zicheng
Liu, Jiakun
Thung, Ferdian
Ma, Haoyu
Li, Rui
Tun, Yan Naing
Minn, Wei
Shar, Lwin Khin
Maoz, Shahar
Toch, Eran
Lo, David
Wong, Joshua
Gao, Debin
Cryptography and Security
Today's Android developers tend to include numerous features to accommodate diverse user requirements, which inevitably leads to bloated apps. Yet more often than not, only a fraction of these features are frequently utilized by users, thus a bloated app costs dearly in potential vulnerabilities, expanded attack surfaces, and additional resource consumption. Especially in the event of severe security incidents, users have the need to block vulnerable functionalities immediately. Existing works have proposed various code debloating approaches for identifying and removing features of executable components. However, they typically involve static modification of files (and, for Android apps, repackaging of APKs, too), which lacks user convenience let alone undermining the security model of Android due to the compromising of public key verification and code integrity checks. This paper introduces 3DNDroid, a Dynamic Debloating approach targeting both DEX and Native methods in AnDroid apps. Using an unprivileged management app in tandem with a customized Android OS, 3DNDroid dynamically reduces unnecessary code loading during app execution based on a pre-generated debloating schema from static or dynamic analyses. It intercepts invocations of debloated bytecode methods to prevent their interpretation, compilation, and execution, while zero-filling memory spaces of debloated native methods during code loading. Evaluation demonstrates 3DNDroid's ability to debloat 187 DEX methods and 30 native methods across 55 real-world apps, removing over 10K Return-Oriented Programming (ROP) gadgets. Case studies confirm its effectiveness in mitigating vulnerabilities, and performance assessments highlight its resource-saving advantages over non-debloated apps.
title Shelving it rather than Ditching it: Dynamically Debloating DEX and Native Methods of Android Applications without APK Modification
topic Cryptography and Security
url https://arxiv.org/abs/2501.04963