Information Technology Reference
In-Depth Information
Instrumenting Android and Java Applications
as Easy as abc
Steven Arzt, Siegfried Rasthofer, and Eric Bodden
Secure Software Engineering Group,
EuropeanCenterforSecurityandPrivacybyDesign(ECSPRIDE),
Technische Universitat Darmstadt, Germany
{ steven.arzt,siegfried.rasthofer,eric.bodden } @ec-spride.de
Abstract. Program instrumentation is a widely used mechanism in dif-
ferent software engineering areas. It can be used for creating profilers and
debuggers, for detecting programming errors at runtime, or for securing
programs through inline reference monitoring.
This paper presents a tutorial on instrumenting Android applications
using Soot and the AspectBench compiler (abc). We show how two well-
known monitoring languages -Tracematches and AspectJ- can be used
for instrumenting Android applications. Furthermore, we also describe
the more flexible approach of manual imperative instrumentation directly
using Soot's intermediate representation Jimple. In all three cases no
source code of the target application is required.
Keywords: Android, Java, Security, Dynamic Analysis, Runtime
Enforcement.
1 Introduction
According to a recent study [1], Android now has about 75% market share in
the mobile-phone market, with a 91.5% growth rate over the past year. With
Android phones being ubiquitous, they become a worthwhile target for security
and privacy violations. Attacks range from broad data collection for the purpose
of targeted advertisement, to targeted attacks, such as the case of industrial
espionage. Attacks are most likely to be motivated primarily by a social element:
a significant number of mobile-phone owners use their device both for private and
work-related communication [2]. Furthermore, the vast majority of users installs
apps containing code whose trustworthiness they cannot judge and which they
cannot effectively control.
One approach to combat such threats is to augment Android applications
obtained from arbitrary untrusted sources with additional instrumentation code.
This code alters the behaviour of the target application and can thus enforce
certain predefined security policies such as disallowing data leaks of confidential
information. Since the instrumentation code runs as an integrated part of the
target application, it has full access to the runtime state, thereby avoiding the
imprecisions that usually come with static analysis approaches [3-5]. It has full
 
Search WWH ::




Custom Search