SlideShare a Scribd company logo
2
Most read
5
Most read
11
Most read
Android Application
Penetration Testing
ETHICAL HACKING
All tutorials are for informational and educational purposes only. If you plan to use the
information for illegal purposes, I request you to please leave this training now. We cannot be
held responsible for any misuse of the given information.
About Host
Roshan Gami
Penetration Tester | Bug Bounty Hunter
Environment Setup
Android Device
192.168.0.247
Kali Machine:
192.168.0.149
Installation !!
● Install VirtuaBox
○ How to Install VirtualBox on Windows 10
● Install kali linux on VirtualBox
○ How to Install Kali linux on VirtualBox
○ Download Kali Linux ISO file: Kali Linux ISO
● Install Android Emulator on VirtualBox
○ How to Install Android on Virtualbox
○ Download Android ISO file: Android 9 ISO
What is DIVA ?
● DIVA (Damn insecure and vulnerable App) is an App
intentionally designed to be insecure.
● The aim of the App is to teach developers/QA/security
professionals, flaws that are generally present in the Apps
due poor or insecure coding practices.
● You want to either learn App pentesting or secure coding and
I sincerely hope that DIVA solves your purpose.
DIVA Installation
1. Download file:
a. http://www.payatu.com/wp-content/uploads/2016/01/diva-beta.tar.gz
b. tar zxcf diva-beta.tar.gz
c. tar zxcf diva-beta.tar
d. Please refer to adb page to install the APK
i. Adb install diva-beta.apk
Tools used in this session
1. Adb
2. Apktool
3. unzip
4. Dex2jar
5. JD-GUI
6. sqlitebrowser
7. Drozer
8. Cutter
Android Components
● Activity
● Content Providers
● Services
● BroadCast Receivers
Activity
Content Providers
ADB command basics - 1
1. Adb connect <IP>:<port>
1. E.g. adb connect 193.168.31.102
2. Adb devices
3. Adb shell: To access the shell of the android machine
4. To automate we can use command adb shell <command>
1. e.g. adb shell ps -ef
2. e.g. adb shell ls /data/data
5. Adb logcat: A centralized repository for logging android application logs.
ADB command basics - 2
1. Adb pull <file-name> : Get a file from the phone to local machine
1. Adb pull /data/app/ssto-pb.apk
2. Adb push <file-name> <mobile location> : To push a file from local machine to
mobile phone.
1. Adb push virus.apk /data/app/
3. Application Installation command:
1. adb install <app name.apk>
2. adb install -r <app name.apk> [The -r option allows you to re-install or update an existing app
on your device]
3. adb install -s <app name.apk> [The -s option lets you install app to SD card if the app supports
move to SD card feature]
ADB command basics - 3
1. Uninstall android application:
1. adb uninstall <app name.apk>
2. Run any command with root level privileges.
1. Adb root
3. Stop adb server:
1. Adb kill-server
4. Start adb server:
1. Adb start-server
Drozer
Setup Drozer
Drozer contains two parts:
1. Agent Installation
a. Download the apk file or install it from the play store: drozer-agent
b. Abd install drozer-agent*.apk
c. Start the application and press ON button.
d. The agent by default will be running on 31415 port number.
2. Server installation
a. This will be installed and run on the Attackers machine(Kali Linux)
b. Download python whl file
https://github.com/mwrlabs/drozer/releases/download/2.4.4/drozer-2.4.4-py2-none-any.whl
c. Run this file: python -m pip install drozer-2.4.4-py2-none-any.whl
d. Check drozer:
i. Adb connect <ip-of-Android-device>
ii. Adb forward tcp:31415 tcp:31415
iii. Drozer console connect
Drozer Approach:
1. Identify the target package name
a. Run app.package.list
2. Gather information
a. Run app.package.info -a <package-name>
3. Look at the Attack surfaces
a. run app.package.attacksurface <package-name>
4. Exploit Activities | Content Providers | Services
a. Next slide
Exploit Activities | Content Providers | Services
1. For Activities
a. Get information about exported activities
i. Run app.activity.info <package-name>
b. Start the Activity
i. Run app.activity.start --component <PACKAGE-NAME> <ACTIVITY-NAME>
2. For Providers
a. Get information about exported content providers
i. Run app.provider.info -a <PACKAGE-NAME>
b. Find referenced content URIs in a package
i. Run app.provider.finduri <PACKAGE-NAME>
c. Query a content provider
i. Run app.provider.query <CONTENT-URL>
Questions ???

More Related Content

PPTX
Android pentesting
PPTX
Pentesting Android Apps
PDF
Android pentesting
PDF
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
PDF
Getting started with Android pentesting
PDF
Android application security testing
PPTX
Mobile Application Security Testing (Static Code Analysis) of Android App
PPTX
Mobile security part 1(Android Apps Pentesting)- Romansh yadav
Android pentesting
Pentesting Android Apps
Android pentesting
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
Getting started with Android pentesting
Android application security testing
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile security part 1(Android Apps Pentesting)- Romansh yadav

What's hot (20)

PPTX
Android Application Penetration Testing - Mohammed Adam
PDF
PPTX
Android pentesting the hackers-meetup
PDF
Android Security & Penetration Testing
PPTX
Owasp mobile top 10
PPTX
Phone Hacking: A lucrative, but largely hidden history
PDF
Android reverse engineering: understanding third-party applications. OWASP EU...
PDF
Mobile Application Security
PPTX
Pentesting Android Applications
PDF
Security Testing Mobile Applications
PPTX
Android Hacking + Pentesting
PPTX
Mobile Application Security
PPTX
Mobile Application Testing Training Presentation
PPTX
Mobile security
PPTX
Mobile security
PPTX
Mobile Application Testing by Javed Ansari
PDF
Mobile Malware
PPTX
Dynamic Security Analysis & Static Security Analysis for Android Apps.
PDF
Mobile Security
Android Application Penetration Testing - Mohammed Adam
Android pentesting the hackers-meetup
Android Security & Penetration Testing
Owasp mobile top 10
Phone Hacking: A lucrative, but largely hidden history
Android reverse engineering: understanding third-party applications. OWASP EU...
Mobile Application Security
Pentesting Android Applications
Security Testing Mobile Applications
Android Hacking + Pentesting
Mobile Application Security
Mobile Application Testing Training Presentation
Mobile security
Mobile security
Mobile Application Testing by Javed Ansari
Mobile Malware
Dynamic Security Analysis & Static Security Analysis for Android Apps.
Mobile Security
Ad

Similar to Android application penetration testing (20)

PDF
Null Dubai Humla_Romansh_Yadav_Android_app_pentesting
PDF
Unit 1 Kali Nethunter Android: OS, Debub Bridge
PDF
Unit Kali NetHunter is the official Kali Linux penetration testing platform f...
PPTX
Making it Rain Android Shells - How 30,000+ Android devices are exposed to th...
PPTX
Android - ADB
PPTX
Developing a Simple Python Tool for Website Vulnerability Scanning
PDF
CNIT 128 6. Analyzing Android Applications (Part 1)
PDF
Building Custom Android Malware BruCON 2013
PPTX
Mastering the Android Shell: A Comprehensive Project Report
PDF
Android_Malware_IOAsis_2014_Analysis.pdf
PPT
ethical hacking-mobile hacking methods.ppt
PDF
Hacking your Android (slides)
PDF
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
PPTX
Hacker Halted 2014 - Reverse Engineering the Android OS
PPTX
Mobile application security
PDF
3 getting to know the android tools - en-us
PPTX
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)
PDF
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
PPT
Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...
PDF
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...
Null Dubai Humla_Romansh_Yadav_Android_app_pentesting
Unit 1 Kali Nethunter Android: OS, Debub Bridge
Unit Kali NetHunter is the official Kali Linux penetration testing platform f...
Making it Rain Android Shells - How 30,000+ Android devices are exposed to th...
Android - ADB
Developing a Simple Python Tool for Website Vulnerability Scanning
CNIT 128 6. Analyzing Android Applications (Part 1)
Building Custom Android Malware BruCON 2013
Mastering the Android Shell: A Comprehensive Project Report
Android_Malware_IOAsis_2014_Analysis.pdf
ethical hacking-mobile hacking methods.ppt
Hacking your Android (slides)
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
Hacker Halted 2014 - Reverse Engineering the Android OS
Mobile application security
3 getting to know the android tools - en-us
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
Android basics – Key Codes – ADB – Rooting Android – Boot Process – File Syst...
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...
Ad

Recently uploaded (20)

PDF
Structs to JSON How Go Powers REST APIs.pdf
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Well-logging-methods_new................
PDF
Digital Logic Computer Design lecture notes
DOCX
573137875-Attendance-Management-System-original
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPT
Project quality management in manufacturing
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Sustainable Sites - Green Building Construction
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Welding lecture in detail for understanding
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
Structs to JSON How Go Powers REST APIs.pdf
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Well-logging-methods_new................
Digital Logic Computer Design lecture notes
573137875-Attendance-Management-System-original
CYBER-CRIMES AND SECURITY A guide to understanding
bas. eng. economics group 4 presentation 1.pptx
Project quality management in manufacturing
UNIT-1 - COAL BASED THERMAL POWER PLANTS
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
OOP with Java - Java Introduction (Basics)
Foundation to blockchain - A guide to Blockchain Tech
Sustainable Sites - Green Building Construction
UNIT 4 Total Quality Management .pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Welding lecture in detail for understanding
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx

Android application penetration testing

  • 1. Android Application Penetration Testing ETHICAL HACKING All tutorials are for informational and educational purposes only. If you plan to use the information for illegal purposes, I request you to please leave this training now. We cannot be held responsible for any misuse of the given information.
  • 2. About Host Roshan Gami Penetration Tester | Bug Bounty Hunter
  • 4. Installation !! ● Install VirtuaBox ○ How to Install VirtualBox on Windows 10 ● Install kali linux on VirtualBox ○ How to Install Kali linux on VirtualBox ○ Download Kali Linux ISO file: Kali Linux ISO ● Install Android Emulator on VirtualBox ○ How to Install Android on Virtualbox ○ Download Android ISO file: Android 9 ISO
  • 5. What is DIVA ? ● DIVA (Damn insecure and vulnerable App) is an App intentionally designed to be insecure. ● The aim of the App is to teach developers/QA/security professionals, flaws that are generally present in the Apps due poor or insecure coding practices. ● You want to either learn App pentesting or secure coding and I sincerely hope that DIVA solves your purpose.
  • 6. DIVA Installation 1. Download file: a. http://www.payatu.com/wp-content/uploads/2016/01/diva-beta.tar.gz b. tar zxcf diva-beta.tar.gz c. tar zxcf diva-beta.tar d. Please refer to adb page to install the APK i. Adb install diva-beta.apk
  • 7. Tools used in this session 1. Adb 2. Apktool 3. unzip 4. Dex2jar 5. JD-GUI 6. sqlitebrowser 7. Drozer 8. Cutter
  • 8. Android Components ● Activity ● Content Providers ● Services ● BroadCast Receivers
  • 11. ADB command basics - 1 1. Adb connect <IP>:<port> 1. E.g. adb connect 193.168.31.102 2. Adb devices 3. Adb shell: To access the shell of the android machine 4. To automate we can use command adb shell <command> 1. e.g. adb shell ps -ef 2. e.g. adb shell ls /data/data 5. Adb logcat: A centralized repository for logging android application logs.
  • 12. ADB command basics - 2 1. Adb pull <file-name> : Get a file from the phone to local machine 1. Adb pull /data/app/ssto-pb.apk 2. Adb push <file-name> <mobile location> : To push a file from local machine to mobile phone. 1. Adb push virus.apk /data/app/ 3. Application Installation command: 1. adb install <app name.apk> 2. adb install -r <app name.apk> [The -r option allows you to re-install or update an existing app on your device] 3. adb install -s <app name.apk> [The -s option lets you install app to SD card if the app supports move to SD card feature]
  • 13. ADB command basics - 3 1. Uninstall android application: 1. adb uninstall <app name.apk> 2. Run any command with root level privileges. 1. Adb root 3. Stop adb server: 1. Adb kill-server 4. Start adb server: 1. Adb start-server
  • 15. Setup Drozer Drozer contains two parts: 1. Agent Installation a. Download the apk file or install it from the play store: drozer-agent b. Abd install drozer-agent*.apk c. Start the application and press ON button. d. The agent by default will be running on 31415 port number. 2. Server installation a. This will be installed and run on the Attackers machine(Kali Linux) b. Download python whl file https://github.com/mwrlabs/drozer/releases/download/2.4.4/drozer-2.4.4-py2-none-any.whl c. Run this file: python -m pip install drozer-2.4.4-py2-none-any.whl d. Check drozer: i. Adb connect <ip-of-Android-device> ii. Adb forward tcp:31415 tcp:31415 iii. Drozer console connect
  • 16. Drozer Approach: 1. Identify the target package name a. Run app.package.list 2. Gather information a. Run app.package.info -a <package-name> 3. Look at the Attack surfaces a. run app.package.attacksurface <package-name> 4. Exploit Activities | Content Providers | Services a. Next slide
  • 17. Exploit Activities | Content Providers | Services 1. For Activities a. Get information about exported activities i. Run app.activity.info <package-name> b. Start the Activity i. Run app.activity.start --component <PACKAGE-NAME> <ACTIVITY-NAME> 2. For Providers a. Get information about exported content providers i. Run app.provider.info -a <PACKAGE-NAME> b. Find referenced content URIs in a package i. Run app.provider.finduri <PACKAGE-NAME> c. Query a content provider i. Run app.provider.query <CONTENT-URL>