SlideShare a Scribd company logo
Tools and Techniques Related To




                                  1
   RIT Alum
   Intrepidus Group
   Interlock Rochester
   Rochester 2600
   TOOOL
   BSidesROC

@antitree
antitree.com
                          2
   Android Introduction
   Tools For Hackers
   Analysis Techniques
   Examples
   How to be “secure”




                           3
Other,              Honeycomb
                                                Cupcake
                                                  1%    Donut
               6%                    1%
                                                         2%
    Blackberry,
        9%                                               Eclair
                                                          15%
                                  Gingerbread
                                      25%




iOS, 28%               Android,
                        56%
                                                   Froyo
                                                    56%


                                                                  4
Android Hacking
   Linux 2.6
   Dalvik Virtual Machine – new instance for
    each app
   DEX – Dalvik byte code
   APK - zip
   AndroidManifest.xml
                       Dalvik
          Java                      APK
                     Byte Code


                                                6
Linux




                      Angry Birds app_42
Dalvik VM Instances
   Intents – inter process communication
   Activities - screen
   Content Providers – sqlite3 database
   Services – background processes
   Broadcasts – send and receive info to other
    apps



                                                  8
•   Dynamic Network Analysis
•   Static Code Review
•   File System Auditing



                               9
   Android SDK
     ADB
     DDMS
     Emulator
   Apktool
   Smali/Baksmali
   Dex2jar
   Java Decompiler (e.g. JAD or JD-GUI)
   Mallory
   Burpsuite
   Wireshark

                                           10
   Java source code vs Smali files vs DEX vs jar
    vs pseudocode
   Android development
   Java
   Linux




                                                    11
12
   Watch Traffic flow through a MITM
   Things to look for:
     Information being passed in the clear
     SSL usage and whether it’s done correctly
     Results of modifying requests and responses
     Authentication process




                                                    13
Wireless Router             Emulator                     PPTP server
DDWRT/TOMATOE               Android SDK                  PPTPD


Usually need a clunky device Sometimes doesn’t act the   Dedicated server
                             way you want it




                                                                            14
#!/bin/bash
# firewall script to intercept all traffic from ppp0 and redirect to local port
# all credit to the great algorythm
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -j REDIRECT -i ppp0 -p tcp --dport 80 -m tcp --to-ports
8080
iptables -t nat -A PREROUTING -j REDIRECT -i ppp0 -p tcp --dport 443 -m tcp --to-
ports 8080



                                                                                        15
   Wireshark
     Initial traffic fingerprinting
   Burpsuite
     Great for HTTP/S traffic
   Mallory
     Great for nonspecific protocols




                                        16
17
   Audit how data is stored
   Things to look for:
     Incorrect permissions
     Storage location (data, sdcard, asec)
   Tools
     Adb shell
     Standard linux commands
     [Root exploit and busybox]

                                              18
19
20
   See how the app works through pseudocode
   Things to look for:
     Overall understanding of the app
     Cryptographic functions
     Debug/Testing functions
     Client side authentication




                                               21
   Tools:
     Apktool d com.antitree.app
     Smali path/to/smali/files/
     Dex2jar out.dex
     Jd-gui out_dex2jar.jar

    APK            DEX             Jar   Pseudocode



                  Smali
                                                  22
Reverse engineering is neat
24
25
But what does it mean?




                         26
   Skype: 4/11
     Permissions error allowed a malicious app to
     access contacts and personal information
   Google: 6/11
     Session information passed in the clear made it
     susceptible to hijacking
   Dropbox: 8/11
     An attempt to share data granted any app to the
     ability to make file public
                                                        27
   HTC: 10/11
     Spyware Logging app found to be accessible to
     any app with the network connection permission
      ▪   GPS coordinates
      ▪   MEID, MDN
      ▪   phone logs
      ▪   MUCH more
     *#*#HTCLOG#*#*


                                                      28
100,000 installations




                        29
   File System Permissions Set to 777
     Access saved sessions
     Modify included binaries
   Why: Lazy permissions
   How discovered: file system permission
    review



                                             30
SSHUNTUNNEL
   Shares information
   Controls permissions


   Tool: Android Manifest Auditor
    Code Name: The Jaku



                                     32
33
1.    Insecure Data Storage
2.    Weak Server Side Controls
3.    Insufficient Transport Layer Protection
4.    Client Side Injection
5.    Poor Authorization and Authentication
6.    Improper Session Handling
7.    Security Decisions Via Untrusted Inputs
8.    Side Channel Data Leakage
9.    Broken Cryptography
10.   Sensitive Information Disclosure
                                                34
   Deploy mobile device management solution
     Zenprise, MobileIron, (Google?)
   Train your users – don’t give in
   Audit your devices
     Are users following best practices?
     What apps are installed?
   Require mobile security solution
     Lookout, WaveSecure, NetQin

                                               35
   Audit your apps!
     Check permissions
     Check source code
     Analyze your traffic
   Think before you Root
   Security Software
     Remote wipe
     Malware detection

                             36
Coincidence?
               37
Slides and app available at
    www.antitree.com




                              38
   http://www.intrepidusgroup.com/insight/
   http://code.google.com/p/android-apktool/
   http://code.google.com/p/smali/
   http://code.google.com/p/dex2jar/
   http://java.decompiler.free.fr/?q=jdgui
   http://developer.android.com/sdk



                                                39
40

More Related Content

PDF
Android Security & Penetration Testing
PPTX
OSI Layer Security
PDF
Android Security
PPTX
Xss attack
PPT
Types of attacks and threads
PPTX
Android Application Penetration Testing - Mohammed Adam
PDF
Mobile Application Security
PPTX
Cyber security presentation
Android Security & Penetration Testing
OSI Layer Security
Android Security
Xss attack
Types of attacks and threads
Android Application Penetration Testing - Mohammed Adam
Mobile Application Security
Cyber security presentation

What's hot (20)

PPT
Javascript
PPTX
Cyber Security
PPTX
Mobile Application Security
PPT
Port scanning
PPTX
Presentation on Core java
PPTX
Virus and malware presentation
PPTX
Hacking and securing ios applications
PPTX
Social Networking Security
PDF
Mobile Security
PPT
Hacking web applications
PPT
Introduction To OWASP
PPTX
User authentication
 
PDF
Web Application Security 101
PPTX
Vulnerabilities in modern web applications
PPTX
A5: Security Misconfiguration
PPTX
Owasp mobile top 10
PDF
Web Application Security and Awareness
PPTX
Different types of attacks in internet
PPTX
QSpiders - Jdk Jvm Jre and Jit
Javascript
Cyber Security
Mobile Application Security
Port scanning
Presentation on Core java
Virus and malware presentation
Hacking and securing ios applications
Social Networking Security
Mobile Security
Hacking web applications
Introduction To OWASP
User authentication
 
Web Application Security 101
Vulnerabilities in modern web applications
A5: Security Misconfiguration
Owasp mobile top 10
Web Application Security and Awareness
Different types of attacks in internet
QSpiders - Jdk Jvm Jre and Jit

Viewers also liked (20)

PDF
Mobile Hacking
PPTX
Hacking ppt
PPT
Mobile phone Data Hacking
PDF
Hacking Android OS
PDF
Growth Hacking For Mobile - Hack 2 Validate & Hack 2 Grow
PPTX
Android Hacking + Pentesting
PPTX
Android– forensics and security testing
PDF
The art of android hacking
PDF
Android Forensics: Exploring Android Internals and Android Apps
PDF
Stealing sensitive data from android phones the hacker way
PPT
WhatsApp Forensic
PPTX
Hacking Mobile Apps
PDF
Learning by hacking - android application hacking tutorial
PPTX
ethical hacking in the modern times
PPTX
Introduction To Ethical Hacking
PPTX
Ethical hacking presentation
PDF
Booting Android: bootloaders, fastboot and boot images
PPTX
Hacking & its types
PDF
ZaCon 4 (2012) - Game Hacking
PPT
Viruses
 
Mobile Hacking
Hacking ppt
Mobile phone Data Hacking
Hacking Android OS
Growth Hacking For Mobile - Hack 2 Validate & Hack 2 Grow
Android Hacking + Pentesting
Android– forensics and security testing
The art of android hacking
Android Forensics: Exploring Android Internals and Android Apps
Stealing sensitive data from android phones the hacker way
WhatsApp Forensic
Hacking Mobile Apps
Learning by hacking - android application hacking tutorial
ethical hacking in the modern times
Introduction To Ethical Hacking
Ethical hacking presentation
Booting Android: bootloaders, fastboot and boot images
Hacking & its types
ZaCon 4 (2012) - Game Hacking
Viruses
 

Similar to Android Hacking (20)

PPTX
Mobile application security
PDF
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...
PPTX
Android Penetration Testing - Day 3
PPTX
Android village @nullcon 2012
PPTX
Manish Chasta - Securing Android Applications
PDF
Smart Bombs: Mobile Vulnerability and Exploitation
PPTX
Hacker Halted 2014 - Reverse Engineering the Android OS
PPT
Securely Deploying Android Device - ISSA (Ireland)
PPTX
Pentesting Android Apps
PDF
Introduction to Android Development and Security
PDF
Pentesting Mobile Applications (Prashant Verma)
PPT
Mobile code mining for discovery and exploits nullcongoa2013
PDF
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
PDF
Wtf is happening_inside_my_android_phone_public
PDF
Hacking your Android (slides)
PDF
Smart Bombs: Mobile Vulnerability and Exploitation
PDF
Hacking your Droid (Aditya Gupta)
PDF
Info security - mobile approach
PPTX
In app search 1
PDF
Mobile application security
hashdays 2011: Tobias Ospelt - Reversing Android Apps - Hacking and cracking ...
Android Penetration Testing - Day 3
Android village @nullcon 2012
Manish Chasta - Securing Android Applications
Smart Bombs: Mobile Vulnerability and Exploitation
Hacker Halted 2014 - Reverse Engineering the Android OS
Securely Deploying Android Device - ISSA (Ireland)
Pentesting Android Apps
Introduction to Android Development and Security
Pentesting Mobile Applications (Prashant Verma)
Mobile code mining for discovery and exploits nullcongoa2013
Jaime Blasco & Pablo Rincón - Lost in translation: WTF is happening inside m...
Wtf is happening_inside_my_android_phone_public
Hacking your Android (slides)
Smart Bombs: Mobile Vulnerability and Exploitation
Hacking your Droid (Aditya Gupta)
Info security - mobile approach
In app search 1

More from antitree (20)

ODP
Hardening ssh configurations
ODP
State of wifi_2016
PDF
Just Mouse Jack Init
ODP
Introduction to ethereum_public
PPTX
Docker Security
PPTX
Reinventing anon email
PPTX
0x20 hack
PPTX
Laverna vs etherpad
PPTX
Meek and domain fronting public
PPTX
Nsa and vpn
PPTX
Salander v bond 2600
PPTX
Salander v bond b sides detroit final v3
PPTX
Pentesting embedded
PPTX
PPTX
Corporate Intelligence: Bridging the security and intelligence community
PPTX
28c3 in 15
PPTX
Lock picking barcamp
PPTX
Lock picking 2600
PPTX
Anti tree firesheep
PPTX
Image based automation
Hardening ssh configurations
State of wifi_2016
Just Mouse Jack Init
Introduction to ethereum_public
Docker Security
Reinventing anon email
0x20 hack
Laverna vs etherpad
Meek and domain fronting public
Nsa and vpn
Salander v bond 2600
Salander v bond b sides detroit final v3
Pentesting embedded
Corporate Intelligence: Bridging the security and intelligence community
28c3 in 15
Lock picking barcamp
Lock picking 2600
Anti tree firesheep
Image based automation

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Cloud computing and distributed systems.
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
Empathic Computing: Creating Shared Understanding
PPT
Teaching material agriculture food technology
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
MYSQL Presentation for SQL database connectivity
Diabetes mellitus diagnosis method based random forest with bat algorithm
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
The AUB Centre for AI in Media Proposal.docx
Dropbox Q2 2025 Financial Results & Investor Presentation
Cloud computing and distributed systems.
Mobile App Security Testing_ A Comprehensive Guide.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectral efficient network and resource selection model in 5G networks
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction
Empathic Computing: Creating Shared Understanding
Teaching material agriculture food technology
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development

Android Hacking

  • 1. Tools and Techniques Related To 1
  • 2. RIT Alum  Intrepidus Group  Interlock Rochester  Rochester 2600  TOOOL  BSidesROC @antitree antitree.com 2
  • 3. Android Introduction  Tools For Hackers  Analysis Techniques  Examples  How to be “secure” 3
  • 4. Other, Honeycomb Cupcake 1% Donut 6% 1% 2% Blackberry, 9% Eclair 15% Gingerbread 25% iOS, 28% Android, 56% Froyo 56% 4
  • 6. Linux 2.6  Dalvik Virtual Machine – new instance for each app  DEX – Dalvik byte code  APK - zip  AndroidManifest.xml Dalvik Java APK Byte Code 6
  • 7. Linux Angry Birds app_42 Dalvik VM Instances
  • 8. Intents – inter process communication  Activities - screen  Content Providers – sqlite3 database  Services – background processes  Broadcasts – send and receive info to other apps 8
  • 9. Dynamic Network Analysis • Static Code Review • File System Auditing 9
  • 10. Android SDK  ADB  DDMS  Emulator  Apktool  Smali/Baksmali  Dex2jar  Java Decompiler (e.g. JAD or JD-GUI)  Mallory  Burpsuite  Wireshark 10
  • 11. Java source code vs Smali files vs DEX vs jar vs pseudocode  Android development  Java  Linux 11
  • 12. 12
  • 13. Watch Traffic flow through a MITM  Things to look for:  Information being passed in the clear  SSL usage and whether it’s done correctly  Results of modifying requests and responses  Authentication process 13
  • 14. Wireless Router Emulator PPTP server DDWRT/TOMATOE Android SDK PPTPD Usually need a clunky device Sometimes doesn’t act the Dedicated server way you want it 14
  • 15. #!/bin/bash # firewall script to intercept all traffic from ppp0 and redirect to local port # all credit to the great algorythm echo 1 > /proc/sys/net/ipv4/ip_forward iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -t nat -A PREROUTING -j REDIRECT -i ppp0 -p tcp --dport 80 -m tcp --to-ports 8080 iptables -t nat -A PREROUTING -j REDIRECT -i ppp0 -p tcp --dport 443 -m tcp --to- ports 8080 15
  • 16. Wireshark  Initial traffic fingerprinting  Burpsuite  Great for HTTP/S traffic  Mallory  Great for nonspecific protocols 16
  • 17. 17
  • 18. Audit how data is stored  Things to look for:  Incorrect permissions  Storage location (data, sdcard, asec)  Tools  Adb shell  Standard linux commands  [Root exploit and busybox] 18
  • 19. 19
  • 20. 20
  • 21. See how the app works through pseudocode  Things to look for:  Overall understanding of the app  Cryptographic functions  Debug/Testing functions  Client side authentication 21
  • 22. Tools:  Apktool d com.antitree.app  Smali path/to/smali/files/  Dex2jar out.dex  Jd-gui out_dex2jar.jar APK DEX Jar Pseudocode Smali 22
  • 24. 24
  • 25. 25
  • 26. But what does it mean? 26
  • 27. Skype: 4/11  Permissions error allowed a malicious app to access contacts and personal information  Google: 6/11  Session information passed in the clear made it susceptible to hijacking  Dropbox: 8/11  An attempt to share data granted any app to the ability to make file public 27
  • 28. HTC: 10/11  Spyware Logging app found to be accessible to any app with the network connection permission ▪ GPS coordinates ▪ MEID, MDN ▪ phone logs ▪ MUCH more  *#*#HTCLOG#*#* 28
  • 30. File System Permissions Set to 777  Access saved sessions  Modify included binaries  Why: Lazy permissions  How discovered: file system permission review 30
  • 32. Shares information  Controls permissions  Tool: Android Manifest Auditor Code Name: The Jaku 32
  • 33. 33
  • 34. 1. Insecure Data Storage 2. Weak Server Side Controls 3. Insufficient Transport Layer Protection 4. Client Side Injection 5. Poor Authorization and Authentication 6. Improper Session Handling 7. Security Decisions Via Untrusted Inputs 8. Side Channel Data Leakage 9. Broken Cryptography 10. Sensitive Information Disclosure 34
  • 35. Deploy mobile device management solution  Zenprise, MobileIron, (Google?)  Train your users – don’t give in  Audit your devices  Are users following best practices?  What apps are installed?  Require mobile security solution  Lookout, WaveSecure, NetQin 35
  • 36. Audit your apps!  Check permissions  Check source code  Analyze your traffic  Think before you Root  Security Software  Remote wipe  Malware detection 36
  • 38. Slides and app available at www.antitree.com 38
  • 39. http://www.intrepidusgroup.com/insight/  http://code.google.com/p/android-apktool/  http://code.google.com/p/smali/  http://code.google.com/p/dex2jar/  http://java.decompiler.free.fr/?q=jdgui  http://developer.android.com/sdk 39
  • 40. 40