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
Malware detection-using-machine-learning
PPTX
Mobile security
PPT
Malware Detection using Machine Learning
PPTX
Android security
PDF
Android Security & Penetration Testing
PPTX
Malware Classification and Analysis
PPTX
Android Security
PDF
Android Malware Detection Mechanisms
Malware detection-using-machine-learning
Mobile security
Malware Detection using Machine Learning
Android security
Android Security & Penetration Testing
Malware Classification and Analysis
Android Security
Android Malware Detection Mechanisms

What's hot (20)

PPTX
Malware- Types, Detection and Future
PPTX
OWASP Top 10 2021 Presentation (Jul 2022)
PPTX
OWASP Top 10 2021 What's New
PPTX
Basics of Denial of Service Attacks
PPTX
Cyber Security Introduction.pptx
PPTX
Vulnerability assessment and penetration testing
PPTX
Network Forensics Intro
PPTX
Mobile Application Security
PDF
Android Security
PPTX
Cybersecurity 2 cyber attacks
PDF
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
PPTX
Mobile Application Security Testing (Static Code Analysis) of Android App
PPTX
Ethical Hacking
PPTX
Computer Security 101
PDF
Penetration Testing Tutorial | Penetration Testing Tools | Cyber Security Tra...
PPTX
Ransomware Attack.pptx
PDF
Application Security | Application Security Tutorial | Cyber Security Certifi...
PDF
Benefits of Web Application Firewall
PPTX
Computer Security
PPT
Application Threat Modeling
Malware- Types, Detection and Future
OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 What's New
Basics of Denial of Service Attacks
Cyber Security Introduction.pptx
Vulnerability assessment and penetration testing
Network Forensics Intro
Mobile Application Security
Android Security
Cybersecurity 2 cyber attacks
APIsecure 2023 - Android Applications and API Hacking, Gabrielle Botbol
Mobile Application Security Testing (Static Code Analysis) of Android App
Ethical Hacking
Computer Security 101
Penetration Testing Tutorial | Penetration Testing Tools | Cyber Security Tra...
Ransomware Attack.pptx
Application Security | Application Security Tutorial | Cyber Security Certifi...
Benefits of Web Application Firewall
Computer Security
Application Threat Modeling

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)

PDF
DEF CON 27 - D4KRM4TTER MIKE SPICER - I know what you did last summer
PDF
Droidcon it-2014-marco-grassi-viaforensics
PPTX
SecTor '09 - When Web 2.0 Attacks!
PDF
Luiz eduardo. introduction to mobile snitch
PPTX
Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!
PDF
Android malware presentation
PDF
Deep Dive Into Android Security
PDF
BSidesLV 2018 - Katie Nickels and John Wunder - ATT&CKing the Status Quo
PDF
Android : How Do I Code Thee?
PDF
Smart Bombs: Mobile Vulnerability and Exploitation
PDF
PRO TALK - Kubernetes Security Workshop.pdf
PDF
Kubernetes Security Workshop
PPTX
2022 APIsecure_Are your APIs Rugged Enough?
PPT
Toward a Mobile Data Commons
PDF
Insider Threat Visualization - HITB 2007, Kuala Lumpur
PDF
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
PDF
Insider Threat Visualization - HackInTheBox 2007
PPTX
Mobile security
PDF
Pennington - Defending Against Targeted Ransomware with MITRE ATT&CK
PPT
Securely Deploying Android Device - ISSA (Ireland)
DEF CON 27 - D4KRM4TTER MIKE SPICER - I know what you did last summer
Droidcon it-2014-marco-grassi-viaforensics
SecTor '09 - When Web 2.0 Attacks!
Luiz eduardo. introduction to mobile snitch
Hacker Halted 2014 - Why Botnet Takedowns Never Work, Unless It’s a SmackDown!
Android malware presentation
Deep Dive Into Android Security
BSidesLV 2018 - Katie Nickels and John Wunder - ATT&CKing the Status Quo
Android : How Do I Code Thee?
Smart Bombs: Mobile Vulnerability and Exploitation
PRO TALK - Kubernetes Security Workshop.pdf
Kubernetes Security Workshop
2022 APIsecure_Are your APIs Rugged Enough?
Toward a Mobile Data Commons
Insider Threat Visualization - HITB 2007, Kuala Lumpur
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
Insider Threat Visualization - HackInTheBox 2007
Mobile security
Pennington - Defending Against Targeted Ransomware with MITRE ATT&CK
Securely Deploying Android Device - ISSA (Ireland)

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)

PDF
Empathic Computing: Creating Shared Understanding
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Cloud computing and distributed systems.
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...
PPTX
Big Data Technologies - Introduction.pptx
PPT
Teaching material agriculture food technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
A Presentation on Artificial Intelligence
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
Machine Learning_overview_presentation.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
MIND Revenue Release Quarter 2 2025 Press Release
Empathic Computing: Creating Shared Understanding
sap open course for s4hana steps from ECC to s4
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Big Data Technologies - Introduction.pptx
Teaching material agriculture food technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
A Presentation on Artificial Intelligence
Programs and apps: productivity, graphics, security and other tools
Machine Learning_overview_presentation.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Dropbox Q2 2025 Financial Results & Investor Presentation
gpt5_lecture_notes_comprehensive_20250812015547.pdf
The AUB Centre for AI in Media Proposal.docx
Assigned Numbers - 2025 - Bluetooth® Document
Review of recent advances in non-invasive hemoglobin estimation
Spectral efficient network and resource selection model in 5G networks
MIND Revenue Release Quarter 2 2025 Press Release

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