• No results found

7. Permissions Based Android Security Framework

N/A
N/A
Protected

Academic year: 2020

Share "7. Permissions Based Android Security Framework"

Copied!
9
0
0

Loading.... (view fulltext now)

Full text

(1)

53

Permissions Based Android Security Framework

Shifa Behal

1

, Tarun Bagga

2 1CSE & Kurukshetra University, India

2CSE & Kurukshetra University, India

Abstract: Android is a popular platform for mobile devices. To grant permission to apps for installation is a challenging task. Most of us take those permissions like terms and conditions, blindly tapping our way through. But if we actually do, we would be aware of their reach. Some of your apps can make phone calls some can track your location some can read your browsing record, contacts, SMS, photos, calendar. Even share this personal information with third parties without your knowledge. We have no granular control over what data apps can access. Android’s privacy and security settings are a bit lacking. However, even with these issues, it’s still entirely possible to stay on top of things and guarantee the security of your data by being attentive about the apps you install and the permissions that these apps need. After all, it’s your data on your phone – you have control. So the only way is to not install the app in the first place to prevent an app from seeing your location, accessing contacts, revoking face book login or Google plus login. A more technical standpoint, a wrapper that will grant a permission management interface is being injected into the APK installer file for the selected apps.

Keywords: Android platform framework, Android Boot Process,

Android Communication, Application Components

1.INTRODUCTION

Android is a popular platform for mobile devices. Applications for Android are written mainly in Java and referred to as ‘apps.’[1]. The operating system, programmed with Java and enhanced with its own security mechanisms adjusted for a mobile environment, quickly became popular amongst the developer community for its open source nature and espousal by telecommunications providers world-wide [2]. Android finish most kinds of different functions through the various applications, therefore Android applications is undoubtedly the most critical factor in the rapid development of Android equipment platform. Projections indicate that: the next generation of open operating system platform is no longer a PC or a mainframe, but the small mobile devices [3].

1.1 Characteristics of Android system:

1) Open: Android is developed by more than 30 companies in Open Handset Alliance, thus the cooperation among Google, operators, equipment manufacturers and developers try to establish a standardized and open mobile phone software platform, and form an open ecosystem in the mobile field.

2) There are no boundaries among applications on Android platform, thus they access the core mobile device functionality via the standard API. Applications can also declare their functions to make them available for other applications.

3) Applications on the mobile devices are equal, so they can be replaced or extended, even as the core components such as dialing program or main screen [5].

1.2 Android platform framework:

The entire Android platform framework is shown in Figure 1. [4]

Figure 1 Android System Structure [4]

1.3 Android Layered Architecture:

As shown in Figure 2 the Android architecture consists of four layers: Linux kernel, Libraries and Android execute time, Application framework and Applications.

(2)

54 1.4 Technical Details on Android:

1.4.1 Android Boot Process:

The first program to run on the device is the boot loader which provides support for loading, recovering or updating system images. The prior startup code for loading the Linux kernel is very hardware dependent: it former initializes the environment and only then starts the construction-independent Linux Kernel C rules by jumping to the start_kernel() function. Then, high-level kernel subsystems are initialized, the root file system is mounted and the init process is started.

1.4.2 Android Communication:

Components communicate with one another through the binder, the Android-specific inter process communication machinery, and (RMI) remote method invocation system. Components do not communicate with the binder directly but instead lean on three high-level abstractions of communication called intent, query and proxy. Fig. 3 stresses on those communications at the Java level of the Android framework [7].

Figure. 3 Android communication overview [7].

1.5 Android application framework:

1.5.1 Application Components: Components are basic rational building blocks of Android applications. Each component can be run individually, either by its embodying application or by system upon allowable requests from other applications [8].

Figure 4 Application Components Relationship [8]

2. LITERATURESURVEY

The research work performed in this field by different researchers is presented as follows:

Shashank Holavanalli et al. in (2013) [1] In this paper presentedan extension to the Android permission mechanism. Notlike the presented permission mechanism our permission mechanism includes semantic information based on information flows. Flow Permissions permit users to examine and award explicit information flows within an application (e.g., a permission for reading the phone number and transfer it over the network) as well as implicit information moves crossways multiple applications (e.g., a agreement for reading the phone number and transport it to another application already installed on the user’s phone). The aim with Flow Permissions is to supplies visibility into the holistic behavior of the applications installed on a user’s phone.

(3)

55 integration and management method. This article elevates a

solution on Android platform after a study to Android security mechanisms and system components. Different from Android's bulid-in synchronization system, ASIMS exposes an interface, which allows the other applications to store settings in one place, and allows users to select which application to sync.

Danyang Jiang et al. in (2012)[3] Permission-based security model of Android limits applications to access specific resources, but malicious applications can assault more easily in such user-centric outline. Through the analysis of the Android Permission-based defense model and the permission features of Android applications, author establish the permission model to compute the functional characteristics of the application, and then supplies an assessment method in which author use the network visualization strategies and clustering algorithm to determine whether the testing application is implicitly malicious application or not so as to help users selects applications before installation. The assessment method is a nondeterministic technique and to a definite extent, the accuracy of the assessment method is on the influence of the Sample Set S. Simultaneously, The applications in the third-party Android market are not classified directly according to the functionality of applications, for example, The applications in Category E-book and Category Humanity have a great deal of similarity in fundamental functionality.

Lin Sun et al. in 2012[4] this article describes the basic formation of the Android and mobile devices on the application environment. A preliminary analysis of the Android protection control structure and sandbox model are presented. Author describes the features of Java security model. Mobile code safety enhancements in Java are also discussed briefly. The policy-based sandbox code access security is intended to affect special policy on application individually in runtime.

SHAO Guo-hong et al. in 2014[5] Android is an open and open operating system based on Linux, which is mainly used for mobile terminals, like as smart phones and panel computer. It is implemented by Open Handset Alliance composed of more than 30 mobile phone companies and technology companies. Android tries to permit users experience the best service quality, and permit developers get a more open level for more suitable software developing. Thus mobile applications with more suitable functions can be developed via Android. This paper firstly proposed the architecture of

Android platform, consisting the classes and methods in developing. Then author takes audio/video file procurement as an example to commence the Android program design and development, consisting classes’ application, program design, development and analysis. Based on the architecture introduction of Android platform, this paper shows the Android program design and development for audio/video file procurement. It mainly applies OpenCORE and Media Recorder class. After the test, our program can successfully realize the procurement and playing of the audio/video files with fast execution speed and good user experience.

Li Ma et al. In 2014[6] As the Android operating system is getting more admired, the application based on Android SDK attracts much more awareness. But now, a few of the Android application interface is too cumbersome, pop-up ads is excessive and the function is too single, these origin some inconvenience to the users. This article suggests the application by eliminating the duplicity. Three types of applications are developed rely on Java and Android SDK --- video player, Weibo client and audio player. The audio player uses the Content Resolver and Curor to achieve music files and plays the music by with the Service Components to call the Media Player class in the backstage. The video player uses the Media Player class supplied by Android SDK. This class loads the file through URL; grasp the multimedia file parsing by using the Open Core Library, which is at the bottom of Android, during JNI and by calling the Surface Flinger interface to recognize the video files’ playback. The users’ data is collected through the Sina open platform named by Sina client and the data will be submitted under the layout of JSON by the Sina server. The scheme uses the OAuth authentication method for user authorization to accomplish the login process. The precise functions of this system are urbanized relayed on Android Weibo SDK. The interfaces of these Android apps are pretty and the operation is downy. What’s more, the cumbersome interface and extreme advertising are eliminated, so that users are able to influence these apps more conveniently and smoothly.

(4)

56 fixed analysis fails miserably when functional with

off-the-shelf components on the Android framework. Author then present an advanced class-hierarchy and field-sensitive group of analyses to extract this mapping. Those static analyses are capable of analyzing the Android structure. They use fresh domain specific optimizations dedicated to Android. Presented a general approach to reduce the attack surface of permission-based software. Author have extensively discussed the problematic consequences of having more permissions than essential and showed that the problem can be mitigated using static analysis. The approach has been fully implemented for Android, permission- based platform for mobile devices. For end-user applications, our evaluation revealed that 94/742 and 35/ 679 applications crawled from Android application stores indeed suffer from permission gaps.

Shuen-Wen Hsiao et al. in 2014[8] as the number of Android devices amplified dramatically in current years, the number of malware targeted for Android also has spiked up. With the safety risks brought by or the consequences caused by Android malware, the seepage of sensitive information becomes the mainstream. Current Android system only offers users a permission yielding mechanism in the application installation time. though some vendors place further mechanisms to let users grant or retract the permissions at any time, the users still cannot differentiate if any data have been normally transmitted or deliberately leaked by the applications. Based on TaintDroid, author created a real-time safety scheme on Android, called PasDroid, to trace dubious data flow and to aware the users with information for judging if a transmission should be permitted or not. PasDroid can effectively inform user about the data type, propagation time and tainted degree when a potential leakage is about to happen. With an affordable overhead, PasDroid can be deployed into real environment, like malware-testing flow or application review procedure for app market operators.

3. PROPOSED WORK

When it comes to restricting app permissions android takes an nothing or all technique.

We have no granular control over what data apps can access. So the only way is to not install the app in the first place to prevent an app from seeing your location, accessing contacts, revoking face book login or Google plus login. Using mods we can revoke individual permissions for installed apps, but these all had one thing in common they requisite root access. Granular permission control system that does not require root.

Existing apps can take any of your apps, then inject a wrapper into their coding that allows you to disable definite permissions. It's a relatively ingenious solution, since its only prerequisite is that you've enabled Unknown sources in your phone's Security settings.

A more technical standpoint, a wrapper that will provide a permission management interface is being injected into the APK installer file for the selected apps.

4.RESULTSANDANALYSIS

Patcher

Apatchis ofsoftwaredesigned to update a computer programor its supporting data, to fix or improve it. This includes fixing security risk and other bugs, with suchpatches usually called bug fixes, and improving the usability or performance of program. A patch is a software update comprised code inserted (or patched) into the code of an executable program. A patch is installed into an existing software program.

Patches may do any of the following:

Address new security risk

Address software stability issues

Upgrade the software

Figure 4.1

(5)

57 Figure 4.3

Figure 4.4

We considered Notes.apk downloaded from Google play store. We have removed google play services dependencies and advertising banners from the apk file as shown in figure 5.2. Then these two apks Notes.apk and Notes-patched.apk are used further by Androgaurd for analysis purpose.

Androguard :

Androguard is a python based tool, which can run on Linux/Windows/OSX, provided python is installed in the system. It is powerful tool to disassemble and to decompile android apps. It can be used for the Static Analysis of an application.Using any reverse engineering tool we can converts Android xml files to readable format.

To enter in androguard, simply run the following command: cd androguard

Figure 4.5

To view all apk and patched apk files that are saved in androguard folder, simply run the following command: ls –l *.apk

Figure 4.6

And output of this command is displayed in the following figure..

Figure 4.7

Decompiling the app

First simply run this command: ./androlyze.py -s

Figure 4.8

And output of this command is displayed in the following figure.

Figure 4.9

Then run the following command:

a,d,dx=AnalyzeAPK(“apk file”,decompiler=”dad”)

Figure 4.10

Then run the following command to get all activities of apk file..

(6)

58 Figure 4.11

And output of this command is displayed in the following figure..

Figure 4.12

Then run the following command to get all permissions of apk file..

Command: a.get_permissions()

Figure 4.13

And output of this command is displayed in the following figure..

Figure 4.14

Then run the following command to get all classes names of apk file..

Command: d.get_classes_names()

Figure 4.15

And output of this command is displayed in the following figure.

Figure4.16

Figure 4.17

Then run the following command to get all methods of apk file..

Command: d.get_methods()

Figure 4.18

(7)

59 Figure 4.19

Figure 4.20

Androaxml

Viewing AndroidManifest.xml is most important part of reverse engineering. Using Androaxml tool of Androguard, we can easily obtain the AndroidManifest.xml file. It actually converts android’s binary XML (i.e. AndroidManifest.xml file) into the usual XML file, that is human readable.

Simply run this command: ./andoaxml.py –I input.apk –o output.xml

Figure 4.21

Then use the following command to get the output of xml file..

Command: gedit output.xml

Figure 4.22

And output of this command is displayed in the following figure..

Figure 4.23

Figure 4.24

Androrisk

This command is used to find the risk of the apk file and results the security of the apk file. Simply run this command: ./androrisk.py –I input.apk -m

Figure 4.25

(8)

60 Figure 4.26

Figure 4.27

Figure 4.28

Androsim

This command is used to find the similarities of apk file and patched apk file.. and for this simply run the command: ./androsim.py –I input.apk input-patched.apk –c ZLIB –n

Figure 4.29

And output of this command is displayed in the following figure

Figure 4.30

Figure 5.30 shows there is difference of 0.02% in Notes.apk and Notes-patched.apk file. One Element is also deleted. In this way we can analyze an apk file and can observe whether the apks taken from another bash store have been modified or not

5.CONCLUSIONANDFUTURESCOPE

The Android Market is one application that is installed on the device that enables a user to browse and download numerous paid and free applications. It is similar to the AppStore for iPhone. Developers will have to sign their code and test it systematically to make sure it is functioning properly without causing any kind of harm to the user and they then liberate it on Android Market. It is however probable for attackers to release malwares on Android Market. Google is presently doing a great job at cleaning the market and making it free from malwares. However attackers can create malwares or patches for presented applications that once installed make the application behave as a malware or they can merely take an existing application and disassemble it, alter the code to make it function abnormally, and repackage the submission. Malwares on Android have been massive in number and attackers are constantly discovering newer methods to break into the devices. The main reason for this is since smart phones like Android are not just used as a moveable telephone these days. Android devices can contact the internet, make online bank transmissions, handle social networks, etc. All these functionalities of a mobile phone appear very tempting for an attacker to gain information of the user and use it to his/her benefit. With the help of Androgaurd we can find the risk of the apk file and similarities of apk file and patched apk file.

REFERENCES

[1] Shashank Holavanalli, Don Manuel, Vishwas

(9)

61 [3] Danyang Jiang, Xiangling Fu, Maoqiang Song, Yidong

Cui,”A Security Assessment Method for Android Applications Based On Permission Model: 2012.

[4] Lin Sun, ShuTao Huang, YunWu Wang, MeiMei Huo,”Application Policy Security Mechanisms of Android System”, 2012.

[5] Shao Guo-hong,” Application Development Research Based on Android Platform”, 2014.

[6] Li Ma, Lei Gu and Jin Wang,” Research and Development of Mobile Application for Android Platform”, Vol.9, No.4 (2014), pp.187-198.

[7] Alexandre Bartel, Jacques Klein, Martin Monperrus and Yves Le Traon,”Static Analysis for Extracting Permission Checks of a Large Scale Framework: The Challenges and Solutions for Analyzing Android”, VOL. 40, NO. 6, JUNE 2014.

Figure

Figure 1 Android System Structure [4]
Figure. 3 Android communication overview [7].
Figure 4.11
Figure 4.23
+2

References

Related documents

Drug-Free Workplace Certification: By accepting a contract or purchase order, the Contractor certifies under penalty of perjury under the laws of the State of California that

The FDA is aware of the concern of the Fetus and Newborn Committee of the American Academy of Pedi- attics regarding the daily use of 3% hexachiorophene for bathing of newborns..

Rollover gains/losses are calculated for the whole sample period, as well as during two roughly equal subperiods. This span is apt because it runs from close to futures

An Analogy Information Warfare Field Agents HQ Analysts Decision Makers.. Framework Framework Data Collection Data Storage Data Decision

Treat fruit with an appropriate chemical from the Problem solver handy guide.... White eggs around

Whereas in developing countries, such as Saudi Arabia there is a lack or nonexistence of Child Nutrition Programs collaborated with public or private schools to provide

Thus, the aim of this clinical trial was to evaluate the clinical performance of a packable composite in class I and II restorations compared with a low-shrinkage