KEMBAR78
The art of android hacking | PDF
The Art Of
Android Hacking
by, Abhinav Mishra (0ctac0der)
Who is this weird tall guy??
Abhinav Mishra | @0ctac0der
Senior Security Consultant @ TOTHENEW Digital
Top 5 Mobile Security Researcher | Synack Red Team (@SynackRedTeam)
Web and Mobile Application Security Researcher
Bug Bounty Hunter, Speaker, Trainer, Traveler, Movie buff
Have you seen “Mr. Robot” ? Any comments? Link
What is he talking about??
â—Ź Android application security
â—‹ Android architecture
â—‹ Application structure
â—‹ Cool tools and distributions
○ Emulators, Devices, Attacks, Vulnerabilities …..
â—Ź What (& How) to look for in an android application
â—Ź Some interesting findings
â—Ź (Random talks)
â—Ź Cool demonstrations
â—Ź Next steps to learn android appsec
Que le jeu commence…..
Quick Questions
● What all you know about android…
â—Ź Application structure
â—Ź Vulnerability ?
Okay, my turn now
â—Ź What you want to know/learn?
â—Ź What you want me to demo?
● Any tool you love? We can talk….
Quick Android Walkthrough
â—Ź Linux Kernel
â—Ź Privilege separation Model
(UID & GID)
â—Ź Android Permission model
(android manifest)
â—Ź APK components:
â—‹ AndroidManifest.xml
â—‹ Classes.dex
â—‹ META-INF
â—‹ Resources.arsc
â—‹ Assets
â—‹ Res
â—‹ Lib
Reversing a cute APK
Things I am going to do in next 10-15 minutes:
â—Ź Choose any apk
â—Ź Decompile with apktool | $apktool d package_name.apk
â—Ź Read and understand the AndroidManifest.xml
â—Ź Showing components in the code:
○ Activities, Broadcast receivers, Content providers ….
â—Ź Extract the apk with any extractor
â—Ź Change the classes.dex to jar | $dex2jar classes.dex
â—Ź Show multiple java classes
â—Ź Possible issues to be discovered
â—Ź SMALI files and converting to JAR
Tools & Demos
â—Ź Emulators???
â—‹ Genymotion
â—‹ Android Studio | AVD
â—Ź ADB (Android Debug Bridge)
â—‹ $adb install
â—‹ $ adb pull / push
â—Ź AppUse Virtual Machine
â—Ź Android Monitor / Logcat
â—Ź Application Local files
Drozer Basics
â—Ź Drozer client and server
â—Ź Setting up the console
â—Ź Basic commands:
â—‹ $ run app.packer.list
â—‹ $run app.package.info
â—‹ $run app.package.attacksurface
â—‹ $ run app.activity.start
15 min checks
1. Debuggable | Backup : True ???
2. AndroidManifest: Permissions
3. Hardcoded stuff
4. SSL Pinning ??
5. Drozer: attack surface | exported components
6. Local storage encryption
7. Sdcard storage | public folder usage
8. TLS protection check
Because Money matters
Vulnerability 1
Date: Mar-2014
Issue: Debuggable = True
Bounty: $500
How to check:
APK AndroidManifest.xml “debuggable=true”
Because Money matters
Vulnerability 2
Date: May-2015
Issue: App fragment injection
Bounty: $250
How to check:
Anyone?
Because Money matters
Vulnerability 3
Date: May-2015
Issue: Hardcoded Account Credentials
Bounty: $200
How to check:
Anyone?
Because Money matters
Vulnerability 4
Date: June-2015
Issue: Exported component malicious usage
Bounty: $1000
How to check:
Anyone?
Because Money matters
Vulnerability 5
Date: Oct-2015
Issue: Parameter manipulation
Bounty: $1000
How to check:
Let me explain this one to you.
My virtual machine (Droider)
Prerequisites
â—Ź 16 GB RAM
â—Ź Intel COREi7 processor
â—Ź 500 GB free hard disk space
â—Ź Minimum internet speed required 50 MBPS
â—Ź Google Nexus 7 device, rooted
What Next ….
â—Ź Learn more
â—Ź Read online
â—Ź Use tools: Drozer, QARK etc.
â—Ź Start practising

The art of android hacking

  • 1.
    The Art Of AndroidHacking by, Abhinav Mishra (0ctac0der)
  • 2.
    Who is thisweird tall guy?? Abhinav Mishra | @0ctac0der Senior Security Consultant @ TOTHENEW Digital Top 5 Mobile Security Researcher | Synack Red Team (@SynackRedTeam) Web and Mobile Application Security Researcher Bug Bounty Hunter, Speaker, Trainer, Traveler, Movie buff Have you seen “Mr. Robot” ? Any comments? Link
  • 3.
    What is hetalking about?? ● Android application security ○ Android architecture ○ Application structure ○ Cool tools and distributions ○ Emulators, Devices, Attacks, Vulnerabilities ….. ● What (& How) to look for in an android application ● Some interesting findings ● (Random talks) ● Cool demonstrations ● Next steps to learn android appsec
  • 4.
    Que le jeucommence….. Quick Questions ● What all you know about android… ● Application structure ● Vulnerability ? Okay, my turn now ● What you want to know/learn? ● What you want me to demo? ● Any tool you love? We can talk….
  • 5.
    Quick Android Walkthrough â—ŹLinux Kernel â—Ź Privilege separation Model (UID & GID) â—Ź Android Permission model (android manifest) â—Ź APK components: â—‹ AndroidManifest.xml â—‹ Classes.dex â—‹ META-INF â—‹ Resources.arsc â—‹ Assets â—‹ Res â—‹ Lib
  • 6.
    Reversing a cuteAPK Things I am going to do in next 10-15 minutes: ● Choose any apk ● Decompile with apktool | $apktool d package_name.apk ● Read and understand the AndroidManifest.xml ● Showing components in the code: ○ Activities, Broadcast receivers, Content providers …. ● Extract the apk with any extractor ● Change the classes.dex to jar | $dex2jar classes.dex ● Show multiple java classes ● Possible issues to be discovered ● SMALI files and converting to JAR
  • 7.
    Tools & Demos â—ŹEmulators??? â—‹ Genymotion â—‹ Android Studio | AVD â—Ź ADB (Android Debug Bridge) â—‹ $adb install â—‹ $ adb pull / push â—Ź AppUse Virtual Machine â—Ź Android Monitor / Logcat â—Ź Application Local files
  • 8.
    Drozer Basics â—Ź Drozerclient and server â—Ź Setting up the console â—Ź Basic commands: â—‹ $ run app.packer.list â—‹ $run app.package.info â—‹ $run app.package.attacksurface â—‹ $ run app.activity.start
  • 9.
    15 min checks 1.Debuggable | Backup : True ??? 2. AndroidManifest: Permissions 3. Hardcoded stuff 4. SSL Pinning ?? 5. Drozer: attack surface | exported components 6. Local storage encryption 7. Sdcard storage | public folder usage 8. TLS protection check
  • 10.
    Because Money matters Vulnerability1 Date: Mar-2014 Issue: Debuggable = True Bounty: $500 How to check: APK AndroidManifest.xml “debuggable=true”
  • 11.
    Because Money matters Vulnerability2 Date: May-2015 Issue: App fragment injection Bounty: $250 How to check: Anyone?
  • 12.
    Because Money matters Vulnerability3 Date: May-2015 Issue: Hardcoded Account Credentials Bounty: $200 How to check: Anyone?
  • 13.
    Because Money matters Vulnerability4 Date: June-2015 Issue: Exported component malicious usage Bounty: $1000 How to check: Anyone?
  • 14.
    Because Money matters Vulnerability5 Date: Oct-2015 Issue: Parameter manipulation Bounty: $1000 How to check: Let me explain this one to you.
  • 15.
    My virtual machine(Droider) Prerequisites â—Ź 16 GB RAM â—Ź Intel COREi7 processor â—Ź 500 GB free hard disk space â—Ź Minimum internet speed required 50 MBPS â—Ź Google Nexus 7 device, rooted
  • 16.
    What Next …. ●Learn more ● Read online ● Use tools: Drozer, QARK etc. ● Start practising