SlideShare a Scribd company logo
Android System Architecture
And
Pen-testing of Android applications

Yavuz Han
What is Android ?
• A software platform and operating system for
mobile devices
• Based on the Linux kernel(Kernel 2.6)
• Developed by Google and later Open Handset
Aliance(OHA)
• Also writing managed code in the Java
Language
• C/C++ also but not supported
Android Architecture
Applications
• First layer in system architecture
• These include the applications shipped with
android like the email client, SMS client, maps,
browsers and also the applications developed
and distributed through the Android market.
Application Framework
• Second layer in system architecture
• These include the programs that manage the
basic functions of the phone like resource
allocation, voice call management, etc
Libraries
• The layer above to the Linux kernel is the
Android’s native libraries.
• These libraries are written in C/C++ languages.
• These libraries also run as processes within the
underlying Linux kernel.
• The libraries are nothing but a set of instructions
that tell the device how to handle different kinds
of data (e.g. The media libraries support playing
or recording various audio/video formats)
Some of the key libraries are listed
below:
• SQLite:This is a lightweight yet powerful
relational database engine available for all
applications to store data.
• Webkit:This is a browser engine providing
tools for browsing web pages.
• Surface Manager: This is responsible for the
graphics on the device screens
• OpenGL: Used to render 2D or 3D graphics to
the screen
Android Runtime
• This is located on the same layer as the libraries
layer.
• It consists of the core JAVA libraries and the
Dalvik virtual machine.
• The core Java libraries are used for developing
Android based applications.
• Dalvik VMs help in achieving the following:
- better memory management
-an application cannot interfere with other
applications without permissions
- threading support
• The diagram below is a pictorial
representation of the Android environment.
• It can be observed that each Android
application runs under a separate virtual
instance and each application has a unique
user-id assigned to it.
Linux Kernel
• This is last layer in system architecture
• Device drivers, power management, process
management and networking services depend
on the layer
• Android using Linux kernel 2.6 and android
developed over time have been harmonized.
• Android is not exactly Linux.
Penetration testing of Android apps
• The applications in Android can be mainly
classified into two categories:
-Android browser-based applications
-Android-based applications (Android
application package files – .apk extension files)
Android Filesystem Access
We want to analyze files within the device,so
how do we do this ?

ADB
(windows,linux,mac)
Android FileSystem Access
• Android Debug Bridge (adb) command
-Access a shell
-Pull/push files
-Many more
Example of ADB
Quick look at some apps
• We’re going to use Android’s default mail client
(Note – this is for a rooted device)
•Navigate to the shared_prefs directory of the
application
Quick look at some apps
• •cat (read) the file
Data Storage

SQLite
-Single file relational database
-Supportet by Android & iPhone APIs to store
Application settings/data
• Using the ADB shell, we can browse to the
database folder and access the data as shown
below:
Logging
• Applications may leak data through gratuitous
logging
• In older versions of Android, the browser
would log URLs visited
-This also logged session Ids for websites
that put it in the GET request
Viewing Android Logs
• We can use ‘adb logcat’ command
Android Client Analysis
• Android Application Layout
-Apps are packaged in an APK file (zip archive)
-What is in it ?
-Dalvik class files(.dex)
-Assets and Resources
-Android Manifest.xml
-APKs stored at /data/app on a device
Can extract this
Android Application Layout
Android Application Layout
Android Manifest.xml
• Enumerates permissions
• We are most interested in permissions and
metadata
Analyzing an APK
• The files inside an APK are not directly useful
-Need to unpack the XML,disassemble the
dex class files

We are using some tool for reverse engineering
Android apk files
Decompilation
• This way eassier than other ways
• You may be familiar with jad or jdgui
-Use dex2jar to get a (JVM) jar from an apk
*Perform “source review” on decompiled app
Does not work for all apks
Decompilation
Protection
•
•
•
•

We must treat the mobile device as hostile
Don’t store sensitive data unencrypted!
Doing encryption well is HARD
Best practice: don’t store any sensitive data on
device
QUESTİONS
THANK YOU

More Related Content

What's hot (7)

PPTX
Dot net assembly
Dr.Neeraj Kumar Pandey
 
PPTX
Asp folders and web configurations
baabtra.com - No. 1 supplier of quality freshers
 
PDF
Android Architecture
Pietro Alberto Rossi
 
PPT
Apex ace update
Ayesha Fayyaz
 
PDF
SQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&Running
Polish SQL Server User Group
 
PPTX
Android Handheld Systems
Vyakhya Shrivastava
 
Dot net assembly
Dr.Neeraj Kumar Pandey
 
Asp folders and web configurations
baabtra.com - No. 1 supplier of quality freshers
 
Android Architecture
Pietro Alberto Rossi
 
Apex ace update
Ayesha Fayyaz
 
SQLDay2013_DennyCherry_GettingSQLServiceBrokerUp&Running
Polish SQL Server User Group
 
Android Handheld Systems
Vyakhya Shrivastava
 

Viewers also liked (20)

PPTX
Penetrating Android Aapplications
Roshan Thomas
 
PPTX
Pentesting Android Applications
Cláudio André
 
PDF
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Ajin Abraham
 
PDF
SSL Pinning and Bypasses: Android and iOS
Anant Shrivastava
 
PPTX
Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...
Lviv Startup Club
 
PDF
CocoaConf Austin 2014 | Demystifying Security Best Practices
Mutual Mobile
 
PDF
Pentesting iOS Apps
Herman Duarte
 
PDF
Andriod Pentesting and Malware Analysis
n|u - The Open Security Community
 
PDF
HIJACKING ATTACKS ON ANDROID DEVICES
Positive Hack Days
 
PDF
Certificate Pinning in Mobile Applications
Luca Bongiorni
 
PPTX
How to Test Security and Vulnerability of Your Android and iOS Apps
Bitbar
 
PDF
Security testing in mobile applications
Jose Manuel Ortega Candel
 
PDF
[2014/10/06] HITCON Freetalk - App Security on Android
DEVCORE
 
PPTX
Rapid Android Application Security Testing
Nutan Kumar Panda
 
PPTX
Android pen test basics
OWASPKerala
 
PPT
Mobile app testing services
Richard_S
 
PDF
Mobile application security – effective methodology, efficient testing! hem...
owaspindia
 
PDF
Security Testing Mobile Applications
Denim Group
 
PPTX
[Wroclaw #1] Android Security Workshop
OWASP
 
PDF
Mobile Application Security Testing, Testing for Mobility App | www.idexcel.com
Idexcel Technologies
 
Penetrating Android Aapplications
Roshan Thomas
 
Pentesting Android Applications
Cláudio André
 
Nullcon Goa 2016 - Automated Mobile Application Security Testing with Mobile ...
Ajin Abraham
 
SSL Pinning and Bypasses: Android and iOS
Anant Shrivastava
 
Lviv MDDay 2014. Ігор Коробка “забезпечення базової безпеки в андроїд аплікац...
Lviv Startup Club
 
CocoaConf Austin 2014 | Demystifying Security Best Practices
Mutual Mobile
 
Pentesting iOS Apps
Herman Duarte
 
Andriod Pentesting and Malware Analysis
n|u - The Open Security Community
 
HIJACKING ATTACKS ON ANDROID DEVICES
Positive Hack Days
 
Certificate Pinning in Mobile Applications
Luca Bongiorni
 
How to Test Security and Vulnerability of Your Android and iOS Apps
Bitbar
 
Security testing in mobile applications
Jose Manuel Ortega Candel
 
[2014/10/06] HITCON Freetalk - App Security on Android
DEVCORE
 
Rapid Android Application Security Testing
Nutan Kumar Panda
 
Android pen test basics
OWASPKerala
 
Mobile app testing services
Richard_S
 
Mobile application security – effective methodology, efficient testing! hem...
owaspindia
 
Security Testing Mobile Applications
Denim Group
 
[Wroclaw #1] Android Security Workshop
OWASP
 
Mobile Application Security Testing, Testing for Mobility App | www.idexcel.com
Idexcel Technologies
 
Ad

Similar to Android System Architecture And  Pen-testing of Android applications (20)

PPT
Chapter 1 Introduction to android.ppt pl
ENBAKOMZAWUGA
 
PPT
My androidpresentation
niteshnarayanlal
 
PDF
Introduction to android
Aravindharamanan S
 
PPT
Android General information
Prashant Gosai
 
PPTX
Presentation for Android OS
Mukul Cool
 
PPTX
Androidoverview 100405150711-phpapp01
Santosh Sh
 
PDF
01 02 - introduction - adroid stack
Siva Kumar reddy Vasipally
 
PDF
Introduction to android
krishnastudent88
 
PPT
Android OS
Nitin Ramchandani
 
PPTX
Bluestacks ANDROID
SUNIL KUMAR MAURYA
 
PPTX
Android Architecture design programming with java
ssuser471dfb
 
PPTX
Unit 1 to android Introduction to Android.pptx
ssuser471dfb
 
PPT
Introduction to android sessions new
Joe Jacob
 
PDF
Android fundamentals and tutorial for beginners
Boom Shukla
 
PPTX
Android architecture
poojapainter
 
ODP
Enhancing and modifying_the_core_android_os
Arnav Gupta
 
PPTX
Android programming
k.surya kumar
 
PPT
Android App Developement
Aayush Gupta
 
PPTX
Android Architecture.pptx
priya Nithya
 
PDF
Introduction to Android Development and Security
Kelwin Yang
 
Chapter 1 Introduction to android.ppt pl
ENBAKOMZAWUGA
 
My androidpresentation
niteshnarayanlal
 
Introduction to android
Aravindharamanan S
 
Android General information
Prashant Gosai
 
Presentation for Android OS
Mukul Cool
 
Androidoverview 100405150711-phpapp01
Santosh Sh
 
01 02 - introduction - adroid stack
Siva Kumar reddy Vasipally
 
Introduction to android
krishnastudent88
 
Android OS
Nitin Ramchandani
 
Bluestacks ANDROID
SUNIL KUMAR MAURYA
 
Android Architecture design programming with java
ssuser471dfb
 
Unit 1 to android Introduction to Android.pptx
ssuser471dfb
 
Introduction to android sessions new
Joe Jacob
 
Android fundamentals and tutorial for beginners
Boom Shukla
 
Android architecture
poojapainter
 
Enhancing and modifying_the_core_android_os
Arnav Gupta
 
Android programming
k.surya kumar
 
Android App Developement
Aayush Gupta
 
Android Architecture.pptx
priya Nithya
 
Introduction to Android Development and Security
Kelwin Yang
 
Ad

Recently uploaded (20)

PPTX
YSPH VMOC Special Report - Measles Outbreak Southwest US 7-20-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
PDF
John Keats introduction and list of his important works
vatsalacpr
 
PPTX
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
PPTX
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
PPTX
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PDF
My Thoughts On Q&A- A Novel By Vikas Swarup
Niharika
 
PPTX
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PPTX
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PPTX
Electrophysiology_of_Heart. Electrophysiology studies in Cardiovascular syste...
Rajshri Ghogare
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PDF
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
PPTX
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
PPTX
Introduction to Probability(basic) .pptx
purohitanuj034
 
PPTX
ENGLISH 8 WEEK 3 Q1 - Analyzing the linguistic, historical, andor biographica...
OliverOllet
 
PDF
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
PPTX
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 7-20-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
John Keats introduction and list of his important works
vatsalacpr
 
Cybersecurity: How to Protect your Digital World from Hackers
vaidikpanda4
 
Unlock the Power of Cursor AI: MuleSoft Integrations
Veera Pallapu
 
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
My Thoughts On Q&A- A Novel By Vikas Swarup
Niharika
 
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
I INCLUDED THIS TOPIC IS INTELLIGENCE DEFINITION, MEANING, INDIVIDUAL DIFFERE...
parmarjuli1412
 
Virus sequence retrieval from NCBI database
yamunaK13
 
Electrophysiology_of_Heart. Electrophysiology studies in Cardiovascular syste...
Rajshri Ghogare
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
Module 2: Public Health History [Tutorial Slides]
JonathanHallett4
 
Sonnet 130_ My Mistress’ Eyes Are Nothing Like the Sun By William Shakespear...
DhatriParmar
 
Introduction to Probability(basic) .pptx
purohitanuj034
 
ENGLISH 8 WEEK 3 Q1 - Analyzing the linguistic, historical, andor biographica...
OliverOllet
 
TOP 10 AI TOOLS YOU MUST LEARN TO SURVIVE IN 2025 AND ABOVE
digilearnings.com
 
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 

Android System Architecture And  Pen-testing of Android applications

  • 1. Android System Architecture And Pen-testing of Android applications Yavuz Han
  • 2. What is Android ? • A software platform and operating system for mobile devices • Based on the Linux kernel(Kernel 2.6) • Developed by Google and later Open Handset Aliance(OHA) • Also writing managed code in the Java Language • C/C++ also but not supported
  • 4. Applications • First layer in system architecture • These include the applications shipped with android like the email client, SMS client, maps, browsers and also the applications developed and distributed through the Android market.
  • 5. Application Framework • Second layer in system architecture • These include the programs that manage the basic functions of the phone like resource allocation, voice call management, etc
  • 6. Libraries • The layer above to the Linux kernel is the Android’s native libraries. • These libraries are written in C/C++ languages. • These libraries also run as processes within the underlying Linux kernel. • The libraries are nothing but a set of instructions that tell the device how to handle different kinds of data (e.g. The media libraries support playing or recording various audio/video formats)
  • 7. Some of the key libraries are listed below: • SQLite:This is a lightweight yet powerful relational database engine available for all applications to store data. • Webkit:This is a browser engine providing tools for browsing web pages. • Surface Manager: This is responsible for the graphics on the device screens • OpenGL: Used to render 2D or 3D graphics to the screen
  • 8. Android Runtime • This is located on the same layer as the libraries layer. • It consists of the core JAVA libraries and the Dalvik virtual machine. • The core Java libraries are used for developing Android based applications. • Dalvik VMs help in achieving the following: - better memory management -an application cannot interfere with other applications without permissions - threading support
  • 9. • The diagram below is a pictorial representation of the Android environment. • It can be observed that each Android application runs under a separate virtual instance and each application has a unique user-id assigned to it.
  • 10. Linux Kernel • This is last layer in system architecture • Device drivers, power management, process management and networking services depend on the layer • Android using Linux kernel 2.6 and android developed over time have been harmonized. • Android is not exactly Linux.
  • 11. Penetration testing of Android apps • The applications in Android can be mainly classified into two categories: -Android browser-based applications -Android-based applications (Android application package files – .apk extension files)
  • 12. Android Filesystem Access We want to analyze files within the device,so how do we do this ? ADB (windows,linux,mac)
  • 13. Android FileSystem Access • Android Debug Bridge (adb) command -Access a shell -Pull/push files -Many more
  • 15. Quick look at some apps • We’re going to use Android’s default mail client (Note – this is for a rooted device) •Navigate to the shared_prefs directory of the application
  • 16. Quick look at some apps • •cat (read) the file
  • 17. Data Storage SQLite -Single file relational database -Supportet by Android & iPhone APIs to store Application settings/data
  • 18. • Using the ADB shell, we can browse to the database folder and access the data as shown below:
  • 19. Logging • Applications may leak data through gratuitous logging • In older versions of Android, the browser would log URLs visited -This also logged session Ids for websites that put it in the GET request
  • 20. Viewing Android Logs • We can use ‘adb logcat’ command
  • 21. Android Client Analysis • Android Application Layout -Apps are packaged in an APK file (zip archive) -What is in it ? -Dalvik class files(.dex) -Assets and Resources -Android Manifest.xml -APKs stored at /data/app on a device Can extract this
  • 24. Android Manifest.xml • Enumerates permissions • We are most interested in permissions and metadata
  • 25. Analyzing an APK • The files inside an APK are not directly useful -Need to unpack the XML,disassemble the dex class files We are using some tool for reverse engineering Android apk files
  • 26. Decompilation • This way eassier than other ways • You may be familiar with jad or jdgui -Use dex2jar to get a (JVM) jar from an apk *Perform “source review” on decompiled app Does not work for all apks
  • 28. Protection • • • • We must treat the mobile device as hostile Don’t store sensitive data unencrypted! Doing encryption well is HARD Best practice: don’t store any sensitive data on device