SlideShare a Scribd company logo
mwrinfosecurity.com | MWR InfoSecurity 1
mwrinfosecurity.com | MWR InfoSecurity
Android Penetration
Testing Workshop
31st March 2016
Hamla (Null – SG)
mwrinfosecurity.com | MWR InfoSecurity 2
About Me
• I am working with MWR Infosecurity as a security
consultant, offering professional penetration tests to
help clients improve their level of IT security.
• Double Masters (Research) in Information Security
• OSCP/CRT/OSCE Certified
mwrinfosecurity.com | MWR InfoSecurity 3
Disclaimer
No Android Architecture
No Android Permission Model
No Java Programming
No Zero-Day Vulnerability 
mwrinfosecurity.com | MWR InfoSecurity 4
Outline
Android Basics
Android Attack
Surface
Demo
Reverse
Engineering (.apk)
Static Analysis Demo
Dynamic Analysis Demo
mwrinfosecurity.com | MWR InfoSecurity 5
Environment Setup
• VMPlayer
• Ubuntu 14.04
• Genymotion (Android 4.1.1)
• Tools – apktool, jd-gui, dex2jar, android studio
• Vulnerable APKs
mwrinfosecurity.com | MWR InfoSecurity 6
Android Basic
• The communication between applications is performed
in a well-defined manner that is strictly facilitated by a
kernel module named binder, which is an Inter-Process
Communication (IPC) system.
• Android applications can make use of four standard
components that can be invoked via calls to binder –
Activities, Services, Broadcast Receivers, Content
Providers.
mwrinfosecurity.com | MWR InfoSecurity 7
Android Basic
• Activities represent visual screens of an application
with which users interact. For example, when you
launch an application, you see its main activity.
• Services are components that do not provide a
graphical interface. They provide the facility to
perform tasks that are long running in the background
and run even when user has opened another
application.
mwrinfosecurity.com | MWR InfoSecurity 8
Android Basic
• Broadcast receivers are non-graphical components that
allow an application to register for certain
systems or application events.
• Content providers are the data storehouses of an
application, that provide a standard way to retrieve,
modify, and delete data.
mwrinfosecurity.com | MWR InfoSecurity 9
Android Basic
• Each Android package contains a file named
AndroidManifest. xml in the root of the archive. This file
defines the package configuration, application
components, and security attributes.
• An intent is a defined object used for messaging which is
created and communicated to an intended application
component.
mwrinfosecurity.com | MWR InfoSecurity 10
Attacking Android Application
• Exploiting Activities
• Exploiting Insecure Content Providers
• Attacking Insecure Services
• Abusing Broadcast Receivers
mwrinfosecurity.com | MWR InfoSecurity 11
Drozer
• Drozer is an Android assessment tool.
• Drozer has two distinct use cases –
• Finding vulnerabilities in applications or devices
• Providing exploits and useful payloads for known
vulnerabilities.
• For more information –
https://labs.mwrinfosecurity.com/tools/drozer/
mwrinfosecurity.com | MWR InfoSecurity 12
How Drozer works
• Drozer is a distributed system that makes use of some key
components -
• Agent— A lightweight Android application that runs on the device
or emulator being used for testing.
• Console—A command-line interface running on your computer that
allows you to interact with the device through the agent
• Server—Provides a central point where consoles and agents can
route sessions between them.
mwrinfosecurity.com | MWR InfoSecurity 13
Demo
mwrinfosecurity.com | MWR InfoSecurity 14
Root Detection
• Default Files and Configurations
Check if release-keys tag is present on non-rooted device - /system/build.prop
• Installed Files & Packages
eu.chainfire.supersu, com.koushikdutta.superuser,/system/bin/su, /syste
m/xbin/su
• Directory Permissions
Check write permission on the directories – /system, /system/bin, /syste
m/sbin
• Commands
Execute commands - `id`, `busybox`
mwrinfosecurity.com | MWR InfoSecurity 15
Static Analysis
.apk .dex
.jar
unzip
dex2jar
jd-gui
.apk .smali
apktool
.java
mwrinfosecurity.com | MWR InfoSecurity 16
Demo
mwrinfosecurity.com | MWR InfoSecurity 17
Dynamic Analysis
Debug android application using Android Studio.
.apk .dex
.jar
unzip
dex2jar
jd-gui
.java
source package Android Studio
apktool
mwrinfosecurity.com | MWR InfoSecurity 18
Demo
mwrinfosecurity.com | MWR InfoSecurity 19
Recommended Books

More Related Content

PDF
Managing third party libraries
PPTX
Owasp A9 USING KNOWN VULNERABLE COMPONENTS IT 6873 presentation
PDF
CSW2017 chuanda ding_state of windows application security
PPTX
Advanced Threat Protection - Sandboxing 101
PPTX
Cerdant Security State of the Union
PPTX
Security testing fundamentals
PPTX
Open Source Security
PPTX
Web & Cloud Security in the real world
Managing third party libraries
Owasp A9 USING KNOWN VULNERABLE COMPONENTS IT 6873 presentation
CSW2017 chuanda ding_state of windows application security
Advanced Threat Protection - Sandboxing 101
Cerdant Security State of the Union
Security testing fundamentals
Open Source Security
Web & Cloud Security in the real world

What's hot (20)

PPTX
Make Every Spin Count: Putting the Security Odds in Your Favor
PDF
Stories from the Security Operations Center
PPT
Setup Your Personal Malware Lab
PDF
Security Implications of the Cloud - CSS Dallas Azure
PPTX
Thinking Differently About Security Protection and Prevention
PPTX
Cyber Security and Open Source
PDF
From Zero To Hero: Continuous Container Security in 4 Simple Steps- A WhiteSo...
PDF
Hacking IoT with EXPLIoT Framework
PDF
Realities of Security in the Cloud
PDF
Enterprise Vulnerability Management - ZeroNights16
PDF
Realities of Security in the Cloud
PPTX
Best Practices for Configuring Your OSSIM Installation
PPTX
How to Use Open Source Tools to Improve Network Security
PDF
Guy Podjarmy - Secure Node Code
PPTX
CSS 17: NYC - Stories from the SOC
PPTX
Automating Open Source Security: A SANS Review of WhiteSource
PPTX
Standards and methodology for application security assessment
PPS
Security testing
PDF
Introduction to Security Testing
PPSX
SonicWALL Advanced Features
Make Every Spin Count: Putting the Security Odds in Your Favor
Stories from the Security Operations Center
Setup Your Personal Malware Lab
Security Implications of the Cloud - CSS Dallas Azure
Thinking Differently About Security Protection and Prevention
Cyber Security and Open Source
From Zero To Hero: Continuous Container Security in 4 Simple Steps- A WhiteSo...
Hacking IoT with EXPLIoT Framework
Realities of Security in the Cloud
Enterprise Vulnerability Management - ZeroNights16
Realities of Security in the Cloud
Best Practices for Configuring Your OSSIM Installation
How to Use Open Source Tools to Improve Network Security
Guy Podjarmy - Secure Node Code
CSS 17: NYC - Stories from the SOC
Automating Open Source Security: A SANS Review of WhiteSource
Standards and methodology for application security assessment
Security testing
Introduction to Security Testing
SonicWALL Advanced Features
Ad

Viewers also liked (17)

PPTX
PPTX
DNS hijacking - null Singapore
PDF
Three things that rowhammer taught me by Halvar Flake
PPT
iOS Application Pentesting
PDF
Null Singapore - Can We secure the IoT - Chadi Hantouche
PPTX
Identifying XSS Vulnerabilities
PPTX
News Bytes - December 2015
PPTX
PDF
Stegano Secrets - Python
PPTX
INTELLIGENT FACE RECOGNITION TECHNIQUES
PPT
Firewall Penetration Testing
PDF
Pentesting RESTful WebServices v1.0
PPTX
Pentesting ReST API
PPTX
Getting Started with API Security Testing
DNS hijacking - null Singapore
Three things that rowhammer taught me by Halvar Flake
iOS Application Pentesting
Null Singapore - Can We secure the IoT - Chadi Hantouche
Identifying XSS Vulnerabilities
News Bytes - December 2015
Stegano Secrets - Python
INTELLIGENT FACE RECOGNITION TECHNIQUES
Firewall Penetration Testing
Pentesting RESTful WebServices v1.0
Pentesting ReST API
Getting Started with API Security Testing
Ad

Similar to Humla workshop on Android Security Testing - null Singapore (20)

PDF
Mwri security testing-android-with-mercury-2013-04-02
PPTX
Hacker Halted 2014 - Reverse Engineering the Android OS
PDF
Reading Group Presentation: Why Eve and Mallory Love Android
PDF
ToorCon 14 : Malandroid : The Crux of Android Infections
PDF
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
PDF
Testing Android Security Codemotion Amsterdam edition
PDF
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
PDF
Building Custom Android Malware BruCON 2013
PPT
Mobile code mining for discovery and exploits nullcongoa2013
PPTX
Android pentesting
PDF
Hacking your Android (slides)
PPTX
Android Hacking + Pentesting
PDF
Malware on Smartphones and Tablets: The Inconvenient Truth
PDF
Android_Malware_IOAsis_2014_Analysis.pdf
PDF
Android "Fight Club" : In pursuit of APPiness -- null Humla Delhi Chapter
PDF
CNIT 128 7. Attacking Android Applications (Part 2)
PDF
Droidcon2013 security genes_trendmicro
PPTX
I haz you and pwn your maal
PDF
CNIT 128 7. Attacking Android Applications (Part 2)
Mwri security testing-android-with-mercury-2013-04-02
Hacker Halted 2014 - Reverse Engineering the Android OS
Reading Group Presentation: Why Eve and Mallory Love Android
ToorCon 14 : Malandroid : The Crux of Android Infections
DEF CON 24 - Dinesh and Shetty - practical android application exploitation
Testing Android Security Codemotion Amsterdam edition
Testing Android Security - Jose Manuel Ortega Candel - Codemotion Amsterdam 2016
Building Custom Android Malware BruCON 2013
Mobile code mining for discovery and exploits nullcongoa2013
Android pentesting
Hacking your Android (slides)
Android Hacking + Pentesting
Malware on Smartphones and Tablets: The Inconvenient Truth
Android_Malware_IOAsis_2014_Analysis.pdf
Android "Fight Club" : In pursuit of APPiness -- null Humla Delhi Chapter
CNIT 128 7. Attacking Android Applications (Part 2)
Droidcon2013 security genes_trendmicro
I haz you and pwn your maal
CNIT 128 7. Attacking Android Applications (Part 2)

More from n|u - The Open Security Community (20)

PDF
Hardware security testing 101 (Null - Delhi Chapter)
PPTX
SSRF exploit the trust relationship
PDF
PDF
Api security-testing
PDF
Introduction to TLS 1.3
PDF
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
PDF
Talking About SSRF,CRLF
PPTX
Building active directory lab for red teaming
PPTX
Owning a company through their logs
PPTX
Introduction to shodan
PDF
Detecting persistence in windows
PPTX
Frida - Objection Tool Usage
PDF
OSQuery - Monitoring System Process
PDF
DevSecOps Jenkins Pipeline -Security
PDF
Extensible markup language attacks
PPTX
PDF
Hardware security testing 101 (Null - Delhi Chapter)
SSRF exploit the trust relationship
Api security-testing
Introduction to TLS 1.3
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Talking About SSRF,CRLF
Building active directory lab for red teaming
Owning a company through their logs
Introduction to shodan
Detecting persistence in windows
Frida - Objection Tool Usage
OSQuery - Monitoring System Process
DevSecOps Jenkins Pipeline -Security
Extensible markup language attacks

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
KodekX | Application Modernization Development
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation theory and applications.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Machine learning based COVID-19 study performance prediction
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Electronic commerce courselecture one. Pdf
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Big Data Technologies - Introduction.pptx
Teaching material agriculture food technology
Programs and apps: productivity, graphics, security and other tools
Mobile App Security Testing_ A Comprehensive Guide.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
“AI and Expert System Decision Support & Business Intelligence Systems”
The Rise and Fall of 3GPP – Time for a Sabbatical?
KodekX | Application Modernization Development
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation theory and applications.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Machine learning based COVID-19 study performance prediction
Network Security Unit 5.pdf for BCA BBA.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Electronic commerce courselecture one. Pdf
Spectroscopy.pptx food analysis technology
Big Data Technologies - Introduction.pptx

Humla workshop on Android Security Testing - null Singapore

  • 1. mwrinfosecurity.com | MWR InfoSecurity 1 mwrinfosecurity.com | MWR InfoSecurity Android Penetration Testing Workshop 31st March 2016 Hamla (Null – SG)
  • 2. mwrinfosecurity.com | MWR InfoSecurity 2 About Me • I am working with MWR Infosecurity as a security consultant, offering professional penetration tests to help clients improve their level of IT security. • Double Masters (Research) in Information Security • OSCP/CRT/OSCE Certified
  • 3. mwrinfosecurity.com | MWR InfoSecurity 3 Disclaimer No Android Architecture No Android Permission Model No Java Programming No Zero-Day Vulnerability 
  • 4. mwrinfosecurity.com | MWR InfoSecurity 4 Outline Android Basics Android Attack Surface Demo Reverse Engineering (.apk) Static Analysis Demo Dynamic Analysis Demo
  • 5. mwrinfosecurity.com | MWR InfoSecurity 5 Environment Setup • VMPlayer • Ubuntu 14.04 • Genymotion (Android 4.1.1) • Tools – apktool, jd-gui, dex2jar, android studio • Vulnerable APKs
  • 6. mwrinfosecurity.com | MWR InfoSecurity 6 Android Basic • The communication between applications is performed in a well-defined manner that is strictly facilitated by a kernel module named binder, which is an Inter-Process Communication (IPC) system. • Android applications can make use of four standard components that can be invoked via calls to binder – Activities, Services, Broadcast Receivers, Content Providers.
  • 7. mwrinfosecurity.com | MWR InfoSecurity 7 Android Basic • Activities represent visual screens of an application with which users interact. For example, when you launch an application, you see its main activity. • Services are components that do not provide a graphical interface. They provide the facility to perform tasks that are long running in the background and run even when user has opened another application.
  • 8. mwrinfosecurity.com | MWR InfoSecurity 8 Android Basic • Broadcast receivers are non-graphical components that allow an application to register for certain systems or application events. • Content providers are the data storehouses of an application, that provide a standard way to retrieve, modify, and delete data.
  • 9. mwrinfosecurity.com | MWR InfoSecurity 9 Android Basic • Each Android package contains a file named AndroidManifest. xml in the root of the archive. This file defines the package configuration, application components, and security attributes. • An intent is a defined object used for messaging which is created and communicated to an intended application component.
  • 10. mwrinfosecurity.com | MWR InfoSecurity 10 Attacking Android Application • Exploiting Activities • Exploiting Insecure Content Providers • Attacking Insecure Services • Abusing Broadcast Receivers
  • 11. mwrinfosecurity.com | MWR InfoSecurity 11 Drozer • Drozer is an Android assessment tool. • Drozer has two distinct use cases – • Finding vulnerabilities in applications or devices • Providing exploits and useful payloads for known vulnerabilities. • For more information – https://labs.mwrinfosecurity.com/tools/drozer/
  • 12. mwrinfosecurity.com | MWR InfoSecurity 12 How Drozer works • Drozer is a distributed system that makes use of some key components - • Agent— A lightweight Android application that runs on the device or emulator being used for testing. • Console—A command-line interface running on your computer that allows you to interact with the device through the agent • Server—Provides a central point where consoles and agents can route sessions between them.
  • 13. mwrinfosecurity.com | MWR InfoSecurity 13 Demo
  • 14. mwrinfosecurity.com | MWR InfoSecurity 14 Root Detection • Default Files and Configurations Check if release-keys tag is present on non-rooted device - /system/build.prop • Installed Files & Packages eu.chainfire.supersu, com.koushikdutta.superuser,/system/bin/su, /syste m/xbin/su • Directory Permissions Check write permission on the directories – /system, /system/bin, /syste m/sbin • Commands Execute commands - `id`, `busybox`
  • 15. mwrinfosecurity.com | MWR InfoSecurity 15 Static Analysis .apk .dex .jar unzip dex2jar jd-gui .apk .smali apktool .java
  • 16. mwrinfosecurity.com | MWR InfoSecurity 16 Demo
  • 17. mwrinfosecurity.com | MWR InfoSecurity 17 Dynamic Analysis Debug android application using Android Studio. .apk .dex .jar unzip dex2jar jd-gui .java source package Android Studio apktool
  • 18. mwrinfosecurity.com | MWR InfoSecurity 18 Demo
  • 19. mwrinfosecurity.com | MWR InfoSecurity 19 Recommended Books

Editor's Notes

  • #8: Services—Services are components that do not provide a graphical interface. They provide the facility to perform tasks that are long running in the background and continue to work even when the user has opened another application or has closed all activities of the application that contains the service. Two different modes of operation exist for services. They can be started or bound to. A service that is started is typically one that does not require the ability to communicate back to the application that started it. A bound service provides an interface to communicate back results to the calling application. A started service continues to function even if the calling application has been terminated. A bound service only stays alive for the time that an application is bound to it. Broadcast receivers—Broadcast receivers are non-graphical components that allow an application to register for certain system or application events. For instance, an application that requires a notification when receiving an SMS would register for this event using a broadcast receiver. This allows a piece of code from an application to be executed only when a certain event takes place. This avoids a situation where any polling needs to take place and provides a powerful event-driven model for applications. In contrast to other application components, a broadcast receiver can be created at runtime. Content providers—These are the data storehouses of an application that provide a standard way to retrieve, modify, and delete data. The terminology used to define and interact with a content provider is similar to SQL: query, insert, update, and delete. This component is responsible for delivering an application’s data to another in a structured and secure manner.
  • #11: In API version 17, which equates to Android 4.2 Jelly Bean, content providers are no longer exported by default. However, if the targetSdkVersion of an application is set to 16 or lower, the content provider will still be exported by default.