SlideShare a Scribd company logo
Mobile Application Security Testing
3 Angles to perform a successful security
testing
1. Client Side Checks;
2. Dynamic / Runtime / Local Storage / DB /
SD Checks &
3. Static Code Analysis (a.k.a Reverse Engg.)
By : Abhilash @ IBM
Static Code Analysis
Why Static Code Analysis is required ?
In Lay-man terms  Code analysis
of ApK file….
M1, M4, M5,
 M1 : Improper Platform Usage : Android Intents,
permissions
 M4 : Insecure Authorization : Identifying Session keys,
session mgmt. logic
 M5 – Insufficient Cryptography : covering cryptographic
keys (like Md5, SHA keys) and encryption logic
M7, M8, M9,M10
 M7 – Client Code Quality : like buffer overflows, format string
vulnerabilities, and various other code-level mistakes
 M8 – Code Tampering : covers binary patching, local resource
modification, method hooking and dynamic memory
modification.
 M9 – Reverse Engineering : analysis of libraries, algorithms,
and other assets.
 M10 – Extraneous Functionality : Hidden backdoor
functionalities , commented code (accidently left by
developer)
7/10 M’s are covered in Static Code
Analysis
Which is >50%
Fetching APK
 For enterprise / intranet Applications  Product Team
 Via Online
 https://apkpure.com/
 http://apps.evozi.com/apk-
downloader/?id=com.vng.g6.a.zombie
https://play.google.com/store/apps/details?id=com
.vng.g6.a.zombie&hl=en
Conversion of APK to Source Code
 Manual via dex2jar/Apktool
 http://stackoverflow.com/questions/12732882/reverse-engineering-from-an-apk-
file-to-a-project
 Via Online
 http://www.javadecompilers.com/apk
 Apk files are nothing but zip files.
 Zip files contains resources and assembled java code
 But unzip will miss classes.dex and resources.arsc files
ANDROID APP STRUCTURE
Methods to perform Code Analysis
 Manual
 Automated
Manual Code Analysis
Installing and Configuring Text Editors
 Android Studio (or)
 Sublime Text
Why Sublime Text ?
Goto Anything functionality
Search of Key strokes
Quick File Switching
 Demo
Mobile Application Security Testing (Static Code Analysis) of Android App
What needs to be looked :
Samples - hardcoded passwords
Mobile Application Security Testing (Static Code Analysis) of Android App
Samples - Encryption
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android App
Automated Code Analysis
 MobSF (Mobile Security Framework)
 QARK (Quick Android Review Kit)
 ApkTool
 & Many more…… both commercial and open source tools
available…
*These are open source tools
Installing and Configuring MobSF
 Demo
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android App
Installing and Configuring QARK
 Demo
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android App
Installing and Configuring ApkTool
 Demo
Mobile Application Security Testing (Static Code Analysis) of Android App
Mobile Application Security Testing (Static Code Analysis) of Android App
Android Intents
 An intent is a Messaging
Object
 which can be used to
request an Action from
an another App
Component.
 App Components can be
 Activities ; Services ;
 Broadcast Receivers ;
 Content Providers
 2 types of Intents
 Explicit
 Implicit
Some of the uses of Intents are
 Start a Service
 Launch an Activity
 Display a web page
 Display List of Contacts
 Broadcast a Message and
 Many More …………………………….
Doubt !!!
Y intents are used Y not APIs ?
API Intent
API calls are Synchronous Intent based calls are
Asynchronous
API calls are compile-time
binding
Intent based calls are run-
time binding
BUT …. Intents can similarly be
used as APIs  Explicit
Implicit Intents
 Implicit intents
are often used
to activate
components in
other
applications.
 Doesn’t Specify
the
Component…
Common Flaws
 Dangerous to send/broadcast sensitive information / data
across implicit intents
 Since unprivileged implicit intent can use the same
data
 Intercept your data
 Malicious Injection at
 Broadcast Level
 Activity Level
 Service Launch
Explicit Intents
 An explicit intent is most
commonly used when
launching an activity (from
another one) within the
same application.
 Specifies the component
Example
Next Time 
 Playing around Intents
 Deep-drive in Intent Filters
 Malicious Intents
 Intent Spoofing and intent traffic analysis
 Prevention techniques
 Self signing of Android app for reverse engg.
Thankyou….

More Related Content

What's hot (20)

PPTX
Android Application Penetration Testing - Mohammed Adam
Mohammed Adam
 
PDF
OWASP Top 10 for Mobile
Appvigil - Mobile App Security Scanner
 
PDF
Hacking and Defending APIs - Red and Blue make Purple.pdf
Matt Tesauro
 
PDF
Android pentesting
Mykhailo Antonishyn
 
PDF
Burp suite
hamdi_sevben
 
PPTX
Bsides 2019 - Intelligent Threat Hunting
Dhruv Majumdar
 
PPTX
OWASP Top 10 2021 What's New
Michael Furman
 
PDF
IDOR Know-How.pdf
Bhashit Pandya
 
PDF
API Vulnerabilties and What to Do About Them
Eoin Woods
 
PDF
Secure Code Review 101
Narudom Roongsiriwong, CISSP
 
PDF
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
apidays
 
PPTX
Practical Application of the API Security Top Ten: A Tester's Perspective
RajniHatti
 
PDF
Peeling the Onion: Making Sense of the Layers of API Security
Matt Tesauro
 
PPTX
Security Testing Training With Examples
Alwin Thayyil
 
PDF
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
Frans Rosén
 
PDF
API Security Best Practices & Guidelines
Prabath Siriwardena
 
PPTX
mobile application security
-jyothish kumar sirigidi
 
PPTX
Android security
Midhun P Gopi
 
PDF
Owasp zap
ColdFusionConference
 
PPTX
OWASP Top Ten 2017
Michael Furman
 
Android Application Penetration Testing - Mohammed Adam
Mohammed Adam
 
Hacking and Defending APIs - Red and Blue make Purple.pdf
Matt Tesauro
 
Android pentesting
Mykhailo Antonishyn
 
Burp suite
hamdi_sevben
 
Bsides 2019 - Intelligent Threat Hunting
Dhruv Majumdar
 
OWASP Top 10 2021 What's New
Michael Furman
 
IDOR Know-How.pdf
Bhashit Pandya
 
API Vulnerabilties and What to Do About Them
Eoin Woods
 
Secure Code Review 101
Narudom Roongsiriwong, CISSP
 
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
apidays
 
Practical Application of the API Security Top Ten: A Tester's Perspective
RajniHatti
 
Peeling the Onion: Making Sense of the Layers of API Security
Matt Tesauro
 
Security Testing Training With Examples
Alwin Thayyil
 
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
Frans Rosén
 
API Security Best Practices & Guidelines
Prabath Siriwardena
 
mobile application security
-jyothish kumar sirigidi
 
Android security
Midhun P Gopi
 
OWASP Top Ten 2017
Michael Furman
 

Viewers also liked (20)

PDF
Gursev kalra _mobile_application_security_testing - ClubHack2009
ClubHack
 
PPTX
Anonymous Security Scanning and Browsing
Abhilash Venkata
 
PDF
Mobile application security – effective methodology, efficient testing! hem...
owaspindia
 
PPT
IBM AppScan Standard - The Web Application Security Solution
hearme limited company
 
PPT
Mathematics ppt on trigonometry
niks957
 
PDF
How to scale mobile application security testing
NowSecure
 
PPTX
Cybersecurity Best Practices in Financial Services
John Rapa
 
ODP
Mobile Apps Security Testing -1
Krisshhna Daasaarii
 
PPTX
Static Application Security Testing Strategies for Automation and Continuous ...
Kevin Fealey
 
PPTX
Web and Mobile Application Security
Prateek Jain
 
PPTX
Basic Guide For Mobile Application Testing
Sourabh Kasliwal
 
PDF
Security Testing Mobile Applications
Denim Group
 
PPTX
The curious case of mobile app security.pptx
Ankit Giri
 
PDF
Mobile Application Security Testing, Testing for Mobility App | www.idexcel.com
Idexcel Technologies
 
PDF
Mobile Application Security
cclark_isec
 
PPTX
Some application of trignometry
shivujagga
 
PPTX
SMAC
Mphasis
 
PPT
Martin Peat and Dawn Jordan, Strategic Projects Team - Open Forum Events' NHS...
Alexis May
 
PDF
Encuentro de directores: Acoso escolar
Educación Innovación
 
PDF
HOMO SAPIENS or HOMO BRUTUS: HUMAN ONTOLOGY: On the Essence of Human Beings
Azamat Abdoullaev
 
Gursev kalra _mobile_application_security_testing - ClubHack2009
ClubHack
 
Anonymous Security Scanning and Browsing
Abhilash Venkata
 
Mobile application security – effective methodology, efficient testing! hem...
owaspindia
 
IBM AppScan Standard - The Web Application Security Solution
hearme limited company
 
Mathematics ppt on trigonometry
niks957
 
How to scale mobile application security testing
NowSecure
 
Cybersecurity Best Practices in Financial Services
John Rapa
 
Mobile Apps Security Testing -1
Krisshhna Daasaarii
 
Static Application Security Testing Strategies for Automation and Continuous ...
Kevin Fealey
 
Web and Mobile Application Security
Prateek Jain
 
Basic Guide For Mobile Application Testing
Sourabh Kasliwal
 
Security Testing Mobile Applications
Denim Group
 
The curious case of mobile app security.pptx
Ankit Giri
 
Mobile Application Security Testing, Testing for Mobility App | www.idexcel.com
Idexcel Technologies
 
Mobile Application Security
cclark_isec
 
Some application of trignometry
shivujagga
 
SMAC
Mphasis
 
Martin Peat and Dawn Jordan, Strategic Projects Team - Open Forum Events' NHS...
Alexis May
 
Encuentro de directores: Acoso escolar
Educación Innovación
 
HOMO SAPIENS or HOMO BRUTUS: HUMAN ONTOLOGY: On the Essence of Human Beings
Azamat Abdoullaev
 
Ad

Similar to Mobile Application Security Testing (Static Code Analysis) of Android App (20)

PPTX
Android Penetration testing - Day 2
Mohammed Adam
 
PPTX
Droidcon mobile security
Judy Ngure
 
PPTX
Mobile application security
Shubhneet Goel
 
PPTX
Mobile Application Security
Ishan Girdhar
 
PDF
mobsf.pdf
Taseen Ali
 
PPTX
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
Ajin Abraham
 
PPTX
COVERT app
itba9
 
PDF
Reading Group Presentation: Why Eve and Mallory Love Android
Michael Rushanan
 
PPTX
Untitled 1
Sergey Kochergan
 
PPTX
Dynamic Analysis of Windows Phone 7 Apps
SensePost
 
PPTX
How to Test Security and Vulnerability of Your Android and iOS Apps
Bitbar
 
DOC
Internet security evaluation system documentation nikitha
Susmitha Reddy
 
PPTX
Security testing of mobile applications
GTestClub
 
PDF
Owasp m7-m8-shivang nullmeetblr 21june2015
n|u - The Open Security Community
 
PDF
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays
 
PDF
API SECURITY
Tubagus Rizky Dharmawan
 
PDF
Software Analytics: Data Analytics for Software Engineering and Security
Tao Xie
 
PPTX
Finding Zero-Days Before The Attackers: A Fortune 500 Red Team Case Study
DevOps.com
 
PPTX
Security of LLM APIs by Ankita Gupta, Akto.io
Nordic APIs
 
PPTX
Top 10 static code analysis tool
scmGalaxy Inc
 
Android Penetration testing - Day 2
Mohammed Adam
 
Droidcon mobile security
Judy Ngure
 
Mobile application security
Shubhneet Goel
 
Mobile Application Security
Ishan Girdhar
 
mobsf.pdf
Taseen Ali
 
AppSec EU 2016: Automated Mobile Application Security Assessment with MobSF
Ajin Abraham
 
COVERT app
itba9
 
Reading Group Presentation: Why Eve and Mallory Love Android
Michael Rushanan
 
Untitled 1
Sergey Kochergan
 
Dynamic Analysis of Windows Phone 7 Apps
SensePost
 
How to Test Security and Vulnerability of Your Android and iOS Apps
Bitbar
 
Internet security evaluation system documentation nikitha
Susmitha Reddy
 
Security testing of mobile applications
GTestClub
 
Owasp m7-m8-shivang nullmeetblr 21june2015
n|u - The Open Security Community
 
apidays Hong Kong - Attack API Architecture, Alvin Tam, Hong Kong Computer So...
apidays
 
Software Analytics: Data Analytics for Software Engineering and Security
Tao Xie
 
Finding Zero-Days Before The Attackers: A Fortune 500 Red Team Case Study
DevOps.com
 
Security of LLM APIs by Ankita Gupta, Akto.io
Nordic APIs
 
Top 10 static code analysis tool
scmGalaxy Inc
 
Ad

Recently uploaded (8)

PDF
INTERLINGUAL SYNTACTIC PARSING: AN OPTIMIZED HEAD-DRIVEN PARSING FOR ENGLISH ...
kevig
 
PPTX
Mobile Apps Helping Business Grow in 2025
Infylo Techsolutions
 
PDF
Call For Papers - International Journal on Natural Language Computing (IJNLC)
kevig
 
PDF
💡 Digital Marketing Decoded: Mastering Online Growth Strategies for 2025 🚀
marketingaura24
 
PPT
lect 1 Introduction.ppt11112222333344455
212231
 
PPTX
The Intersection of Emoji and NFT. What can be the Consequences?
Refit Global
 
PPT
lec2 wireless transmission exlaining.ppt
212231
 
PDF
Building Smart, Scalable Solutions with Android App Development
Brancosoft Private Limited
 
INTERLINGUAL SYNTACTIC PARSING: AN OPTIMIZED HEAD-DRIVEN PARSING FOR ENGLISH ...
kevig
 
Mobile Apps Helping Business Grow in 2025
Infylo Techsolutions
 
Call For Papers - International Journal on Natural Language Computing (IJNLC)
kevig
 
💡 Digital Marketing Decoded: Mastering Online Growth Strategies for 2025 🚀
marketingaura24
 
lect 1 Introduction.ppt11112222333344455
212231
 
The Intersection of Emoji and NFT. What can be the Consequences?
Refit Global
 
lec2 wireless transmission exlaining.ppt
212231
 
Building Smart, Scalable Solutions with Android App Development
Brancosoft Private Limited
 

Mobile Application Security Testing (Static Code Analysis) of Android App

  • 1. Mobile Application Security Testing 3 Angles to perform a successful security testing 1. Client Side Checks; 2. Dynamic / Runtime / Local Storage / DB / SD Checks & 3. Static Code Analysis (a.k.a Reverse Engg.) By : Abhilash @ IBM
  • 2. Static Code Analysis Why Static Code Analysis is required ? In Lay-man terms  Code analysis of ApK file….
  • 3. M1, M4, M5,  M1 : Improper Platform Usage : Android Intents, permissions  M4 : Insecure Authorization : Identifying Session keys, session mgmt. logic  M5 – Insufficient Cryptography : covering cryptographic keys (like Md5, SHA keys) and encryption logic
  • 4. M7, M8, M9,M10  M7 – Client Code Quality : like buffer overflows, format string vulnerabilities, and various other code-level mistakes  M8 – Code Tampering : covers binary patching, local resource modification, method hooking and dynamic memory modification.  M9 – Reverse Engineering : analysis of libraries, algorithms, and other assets.  M10 – Extraneous Functionality : Hidden backdoor functionalities , commented code (accidently left by developer)
  • 5. 7/10 M’s are covered in Static Code Analysis Which is >50%
  • 6. Fetching APK  For enterprise / intranet Applications  Product Team  Via Online  https://apkpure.com/  http://apps.evozi.com/apk- downloader/?id=com.vng.g6.a.zombie https://play.google.com/store/apps/details?id=com .vng.g6.a.zombie&hl=en
  • 7. Conversion of APK to Source Code  Manual via dex2jar/Apktool  http://stackoverflow.com/questions/12732882/reverse-engineering-from-an-apk- file-to-a-project  Via Online  http://www.javadecompilers.com/apk  Apk files are nothing but zip files.  Zip files contains resources and assembled java code  But unzip will miss classes.dex and resources.arsc files
  • 9. Methods to perform Code Analysis  Manual  Automated
  • 11. Installing and Configuring Text Editors  Android Studio (or)  Sublime Text Why Sublime Text ? Goto Anything functionality Search of Key strokes Quick File Switching  Demo
  • 13. What needs to be looked :
  • 14. Samples - hardcoded passwords
  • 21.  MobSF (Mobile Security Framework)  QARK (Quick Android Review Kit)  ApkTool  & Many more…… both commercial and open source tools available… *These are open source tools
  • 22. Installing and Configuring MobSF  Demo
  • 25. Installing and Configuring QARK  Demo
  • 28. Installing and Configuring ApkTool  Demo
  • 31. Android Intents  An intent is a Messaging Object  which can be used to request an Action from an another App Component.  App Components can be  Activities ; Services ;  Broadcast Receivers ;  Content Providers  2 types of Intents  Explicit  Implicit
  • 32. Some of the uses of Intents are  Start a Service  Launch an Activity  Display a web page  Display List of Contacts  Broadcast a Message and  Many More …………………………….
  • 33. Doubt !!! Y intents are used Y not APIs ? API Intent API calls are Synchronous Intent based calls are Asynchronous API calls are compile-time binding Intent based calls are run- time binding BUT …. Intents can similarly be used as APIs  Explicit
  • 34. Implicit Intents  Implicit intents are often used to activate components in other applications.  Doesn’t Specify the Component…
  • 35. Common Flaws  Dangerous to send/broadcast sensitive information / data across implicit intents  Since unprivileged implicit intent can use the same data  Intercept your data  Malicious Injection at  Broadcast Level  Activity Level  Service Launch
  • 36. Explicit Intents  An explicit intent is most commonly used when launching an activity (from another one) within the same application.  Specifies the component
  • 38. Next Time   Playing around Intents  Deep-drive in Intent Filters  Malicious Intents  Intent Spoofing and intent traffic analysis  Prevention techniques  Self signing of Android app for reverse engg.

Editor's Notes

  • #4: side-channel data leakage - vulnerabilities from the OS, frameworks, compiler environment, new hardware, etc
  • #8: https://github.com/androguard/androguard
  • #39: https://www.appvigil.co/blog/2015/04/intent-spoofing-vulnerability-in-android-apps/ https://github.com/pwntester/OWASP-GoatDroid-Dolphis