Top Banner
INTRODUCING..... A S E F Android Security Evaluation Framework - Parth Patel
61

INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Aug 23, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

INTRODUCING..... A S E F

Android Security Evaluation Framework

- Parth Patel

Page 2: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

$ whoami_

Page 3: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Agenda

Manual Research

Automation - A S E F

Let’s solve problems

Conclusion

Page 4: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Android OS

Open Source

Page 5: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Security Evaluation of

Android Apps

Page 6: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Android APP Store

Attacker

User

Attacker

Developer

Developer

Developer

Page 7: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Android APP Store

?

Developer

Attacker

Bouncer

Developer

Developer

Attacker

Page 8: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Android APP Store

?

Developer

Attacker

Bouncer

Developer

Developer

Attacker

Page 9: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

A A

A

?

Developer Attacker

User

Page 10: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Permissions

Page 11: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Manual Research

Page 12: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

“Behavioral Analysis”of Apps

Page 13: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Android SDK - Emulator (Android Virtual Device - AVD) - Android Debug Bridge - adb - Android Asset Packaging Tool - aapt

Wireshark

dex2jar

IDE - eclipse

Utilities for Behavioral Analysis

Page 14: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Limitations of

‘Manual Research’

Page 15: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Introducing .....

A S E F

Page 16: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

A S E F

A S E F as a Black Box

MalwareAggressive Adware

Bandwidth

Vulnerabilities

Page 17: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Passive Active Interpret

Initialization

Normalization

Organization

Launch

Test Cycle

Parsing

Analyzing

Results

A S E F

Page 18: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Configurator adb refresh Device Detect(virtual/physical)

i/p A S E F Phase 1: Passive

Initialization Mode

Default Virtual Device =Google Safe Browsing API =Host IP = interface =

Creates Virtual Device

Session cleanup Enable USB debugging

Page 19: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Array of .apk path

Location of an APP

A S E F Phase 1: Passive

Normalization Mode

Extractor

Location of APPs

Extracted APPs

Page 20: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

A S E F Phase 1: Passive

Organization Mode

ConverterTest Result

Archive

%HAPK->{$apk} = ( { pkgnm => $PKGNM , launchact => $LAUNCHACT , vercode => $VERCODE , vername => $VERNAME , applable => $APPLABLE , adbstart => "" , adbstop => ""}, );

TEST_05_11_12-19:53:56

TEST_05_11_12-20:20:19

TEST_05_13_12-11:38:28

TEST_NIGHTLY_SCAN2

1.apk2.apk3.apk

adb_log.txtnetwork_traffic.txtadb_log.txtnetwork_traffic.txtadb_log.txtnetwork_traffic.txt

Page 21: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Virtual Device

Launcher

Boot Boot check

Running

Not Running

Display unlock

A S E F Phase II : Active

Launch Mode

Page 22: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Installation mode

Launch mode

Activity mode

Uninstallation mode

stop - adb logcat

stop - tcpdump

start-timestamp

stop-timestamp

kernel log memory dump services running

kernel log memory dump services running

kernel log memory dump services running

kernel log memory dump services running

Extensive mode

Tm

Tm

Tm

A S E F Phase II : Active

Test Cycle

start - adb log

start - tcpdump

Page 23: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

NetworkActivity

URLs/IPs

Google’s Safe Browsing API malware

aggressive adwareAccess rate of URL/IP

Traffic Analyzer

Data tx / BandWidthData usage

Bandwidth

Associated Permissions

Unique permissions of AppsPermission mapping

Unique APIs API mapping

Decompilation/ APIs used

Reconstructing source code

apk unzip dex2jar jar2class class2jad Source Code

Black listing Found/Add App to the blacklist Black listed

A S E F Phase III : Interpret

Parsing Mode Analyzing Mode Results

Vulnerability Detector

Signatures Vulnerabilities%HVULN

%HAPK

Page 24: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

A S E F

Demo

Page 25: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Statistics & Results

Page 26: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Apps leaking private information

Page 27: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Safe Apps- 74

Total Apps = 80

6 Apps - Leaking private data

Page 28: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

IMIE number

phone number

Page 29: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android
Page 30: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android
Page 31: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Bandwidth Usage

Page 32: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Data usage - 3 min Test Cycle

bytes

Page 33: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Aggressive Adware

Page 34: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

(No of Servers accessed) / App 3 min Test Cycle

Page 35: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

(Access-rate) / App 3 min Test Cycle

Threshold

Page 36: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Ad Requests @ 1.333 req/sec

Aggressive Adware

Page 37: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Permission mapping

Page 38: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Permission distribution - 1000 game apps

Internet

Vibrate

Send SMS

Write Contacts

Read Contacts

mount/unmount filesystem

Page 39: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Vulnerability Scanning

Page 40: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

0

20

40

60

80

No of Apps

No of total Apps No of Vulnerable Apps

75

Non-updated Android Apps

Page 41: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

0

20

40

60

80

No of Apps

No of total Apps No of Vulnerable Apps

75

12

A S E F Scan - Before updates

Adobe Flash PlayerMozilla Firefox

Page 42: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

0

20

40

60

80

No of Apps

No of total Apps No of Vulnerable Apps

75

Page 43: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

0

20

40

60

80

No of Apps

No of total Apps No of Vulnerable Apps

75

6

A S E F Scan - After updates

Page 44: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android
Page 45: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android
Page 46: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Extending the Framework

Page 47: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Installation mode

Launch mode

Activity mode

Uninstallation mode

stop - adb logcat

stop - tcpdump

start-timestamp

stop-timestamp

start - adb log

start - tcpdump

start - cmd line tool

stop - cmd line tool

Command line tools

Page 48: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Extending the Framework

Page 49: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Let’s solve problems....

Page 50: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

A S E F to scan an APP STORE

Protect & Promote

Page 51: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

A S E F in

Large Organizations

Page 52: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

THE NIGHT PHOENIX

Android APP

Page 53: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

ANDROID

NIGHT PHOENIX

apkzip

Extractor of A S E F

NIGHT PHOENIX & A S E F

A S E FServer

@ of .apk path

unzip

Package Manager

Page 54: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

NIGHT PHOENIX ??

Alarm Manager

Page 55: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Who watches THE WATCHMEN

Page 56: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Internet

Write externalstorage

THE NIGHT PHOENIX

Page 57: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

THE DARK PHOENIX

Page 58: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

It is just the beginning ........

Page 59: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Next Generation of A S E F

Scalability - Load balancer module

Offline scanning - Crawler module

A S E F in cloud

Automated/Custom signature generation

Distinguishing updates - Security Fixes

UI reporting with correlated results and statistics

Page 60: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

Conclusion ?

Page 61: INTRODUCING A S E F · - Parth Patel $ whoami_ Agenda Manual Research Automation - A S E F Let’s solve problems Conclusion. Android OS Open Source. Security Evaluation of Android

A S E F

Thank You

Twitter : @parth_84

email : [email protected]://code.google.com/p/asef/

https://community.qualys.com/blogs/securitylabs/2012/07/25/android-security-evaluation-framework--a-s-e-f