SlideShare a Scribd company logo
Dissecting Android APK
Reversing Android applications
/> self.me
- Final year undergraduate student at Amrita University, Amritapuri
- Love Android !
- Currently researching on Android security
- Play CTFs as a part of team bi0s
bi0s
Index
- Why Android ?
- Android security implementations and issues
- Real world Android malwares
- Reversing Android apps
- Structure of an APK
- Analyzing the contents
Why Android ?
The Tale of Triumph
Open source - power to you!
User-friendly
Most used - more developers
Mobile OS Global Market Share 2016
Android security
- Sandboxing
- Permissions
- ASLR since Android 4.0 ICS
- ARM TrustZone
Implementations
Permissions
ARM TrustZone
Are we at risk ?
Issues - Malwares
- Ransomwares
- Exploits
Real world Android malwares
AccuTrack :
Turns an Android device into a GPS tracker
AckPost :
Steals contact information from the device and sends it to a remote server
BackFlash / Crosate :
Installs as a fake Flash plugin, registers as a Device administrator, and steals sensitive data
BankBot :
Particularly aims at stealing bank account information from dedicated apps
DroidDeluxe :
Exploits the device to gain root privilege and then modifies access permission of database files
and collects account information
APK
Android package : APK
Zip file with .apk extension
Playstore, Amazon Appstore, F-Droid
Java + res + XML + Libs
Android PacKage
Making of an APK
Reversing Android apps
Tools and Methodologies
APKTOOL
Reversing APKs
- Compile/decompile apps
- Smali code
- To modify apps
Structure of an APK
assets - all the unmodified app contents
AndroidManifest.xml - Generic; The app-map
classes.dex - Java files’ package. The Dalvik executable [ yeah! the source ]
res - All the resources ( drawables, icons, values )
lib - External/custom native libraries
Resources.asrc - Compiled resources / binaries
META-INF - Certificates
Dalvik / ART
→ JVM redefined
→ Dalvik until 4.4.4 Kitkat. ART from 5.0 Lollipop
→ Executes dex
→ Dalvik - JIT, ART - AOT
DEX
Dalvik Executable
> Dalvik’s bytecode
> java classes
> Easy to debug
Tools
ADB
Android Debug Bridge
- Android tool
- Drop shells, files
- Access partitions
- Install applications
Dex2Jar
The source
- Small in size
- Any platform
- Extracts compiled classes out of the dex
- Easy to use
Demo
Workaround ? → Check permissions
→ Trusted app sources
→ Use ‘ anti-malware ’ apps
Glossary
- aapt : Android Asset Packaging Tool.
- dex : Dalvik executable.
- dx : Tool within the Android SDK used to convert the jar files into dex files.
- R.java : A class with static methods to reference all the resources.
In-depth Introduction to Android Permission Model
Android Internals by Karim Yaghmour
Logcat Security Issue
Dalvik and ART
Dex2jar, ADB, APK Tool
DexGuard obfuscator
Dalvik opcodes
OWASP Seraphimdroid
References
Thank You

More Related Content

PDF
Buffer Overflow Attacks
PPTX
Reversing malware analysis training part11 exploit development advanced
PPTX
Reversing malware analysis training part6 practical reversing
PPTX
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
PPTX
Reversing malware analysis training part10 exploit development basics
PPTX
Reversing malware analysis training part1 lab setup guide
PPTX
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysis
PPTX
Advanced Malware Analysis Training Session 5 - Reversing Automation
Buffer Overflow Attacks
Reversing malware analysis training part11 exploit development advanced
Reversing malware analysis training part6 practical reversing
Advanced Malware Analysis Training Session 2 - Botnet Analysis Part 1
Reversing malware analysis training part10 exploit development basics
Reversing malware analysis training part1 lab setup guide
Advanced Malware Analysis Training Session 6 - Malware Sandbox Analysis
Advanced Malware Analysis Training Session 5 - Reversing Automation

What's hot (20)

PPTX
Dll preloading-attack
PPTX
Advanced malware analysis training session8 introduction to android
PPTX
Hunting Rootkit From the Dark Corners Of Memory
PPTX
Reversing & malware analysis training part 1 lab setup guide
PPTX
Reversing malware analysis training part7 unpackingupx
PPTX
Reversing malware analysis training part2 introduction to windows internals
PPTX
Reversing & malware analysis training part 2 introduction to windows internals
PPTX
Reversing malware analysis trainingpart9 advanced malware analysis
PPTX
Reversing & malware analysis training part 3 windows pe file format basics
PPTX
Advanced Malware Analysis Training Session 7 - Malware Memory Forensics
PPTX
Anti-Virus Evasion Techniques and Countermeasures
PPTX
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
PPTX
Advanced Malware Analysis Training Session 3 - Botnet Analysis Part 2
PDF
PPTX
Reversing & Malware Analysis Training Part 13 - Future Roadmap
PDF
Introduction to iOS Penetration Testing
PPTX
Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis
PPTX
Advanced Malware Analysis Training Session 11 - (Part 2) Dissecting the Heart...
PPTX
Advanced Malware Analysis Training Session 1 - Detection and Removal of Malwares
PPTX
Basic Malware Analysis
Dll preloading-attack
Advanced malware analysis training session8 introduction to android
Hunting Rootkit From the Dark Corners Of Memory
Reversing & malware analysis training part 1 lab setup guide
Reversing malware analysis training part7 unpackingupx
Reversing malware analysis training part2 introduction to windows internals
Reversing & malware analysis training part 2 introduction to windows internals
Reversing malware analysis trainingpart9 advanced malware analysis
Reversing & malware analysis training part 3 windows pe file format basics
Advanced Malware Analysis Training Session 7 - Malware Memory Forensics
Anti-Virus Evasion Techniques and Countermeasures
Reversing & Malware Analysis Training Part 11 - Exploit Development [Advanced]
Advanced Malware Analysis Training Session 3 - Botnet Analysis Part 2
Reversing & Malware Analysis Training Part 13 - Future Roadmap
Introduction to iOS Penetration Testing
Reversing & Malware Analysis Training Part 9 - Advanced Malware Analysis
Advanced Malware Analysis Training Session 11 - (Part 2) Dissecting the Heart...
Advanced Malware Analysis Training Session 1 - Detection and Removal of Malwares
Basic Malware Analysis
Ad

Viewers also liked (20)

PDF
Investigating Malicious Office Documents: Analyzing Macros Malwares used in C...
PDF
Buffer overflow Attacks
PPTX
Watering hole attacks case study analysis
PDF
Dynamic Binary Instrumentation
PDF
Format string vunerability
PPTX
Homomorphic encryption
PPTX
Advanced malware analysis training session11 part2 dissecting the heart beat ...
PPTX
Investigating Malware using Memory Forensics
ODP
Introduction to Binary Exploitation
PPTX
Advanced malwareanalysis training session2 botnet analysis part1
PPTX
Advanced malware analysis training session3 botnet analysis part2
PPTX
Exploits & Mitigations - Memory Corruption Techniques
PDF
POS Malware: Is your Debit/Credit Transcations Secure?
PPTX
Introduction to ICS/SCADA security
PPTX
Hunting rootkit from dark corners of memory
PDF
Understanding APT1 malware techniques using malware analysis and reverse engi...
PPTX
XXE - XML External Entity Attack
PDF
Linux Malware Analysis
PDF
ATM Malware: Understanding the threat
Investigating Malicious Office Documents: Analyzing Macros Malwares used in C...
Buffer overflow Attacks
Watering hole attacks case study analysis
Dynamic Binary Instrumentation
Format string vunerability
Homomorphic encryption
Advanced malware analysis training session11 part2 dissecting the heart beat ...
Investigating Malware using Memory Forensics
Introduction to Binary Exploitation
Advanced malwareanalysis training session2 botnet analysis part1
Advanced malware analysis training session3 botnet analysis part2
Exploits & Mitigations - Memory Corruption Techniques
POS Malware: Is your Debit/Credit Transcations Secure?
Introduction to ICS/SCADA security
Hunting rootkit from dark corners of memory
Understanding APT1 malware techniques using malware analysis and reverse engi...
XXE - XML External Entity Attack
Linux Malware Analysis
ATM Malware: Understanding the threat
Ad

Similar to Dissecting Android APK (20)

PDF
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
PDF
Hacking your Droid (Aditya Gupta)
PDF
Getting started with Android pentesting
PDF
Andriod Pentesting and Malware Analysis
PDF
Droidcon Greece '15 - Reverse Engineering in Android: Countermeasures and Tools
PPTX
Mobile Application Penetration Testing - Android
PPTX
Getting started with android
PDF
Building Custom Android Malware BruCON 2013
PPTX
Introduction to Android Development Part 1
PDF
Android_Malware_IOAsis_2014_Analysis.pdf
PPTX
Manish Chasta - Securing Android Applications
PPTX
Pentesting iOS Applications
PPTX
3. Android Architecture.pptx
PPTX
Android Penetration testing - Day 2
PPTX
Android security by ravi-rai
PPT
Android For Java Developers
PDF
Reading Group Presentation: Why Eve and Mallory Love Android
PPTX
Null mumbai-Android-Insecure-Data-Storage-Exploitation
PDF
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
PPTX
Notes Unit2.pptx
Null Mumbai Meet_Android Reverse Engineering by Samrat Das
Hacking your Droid (Aditya Gupta)
Getting started with Android pentesting
Andriod Pentesting and Malware Analysis
Droidcon Greece '15 - Reverse Engineering in Android: Countermeasures and Tools
Mobile Application Penetration Testing - Android
Getting started with android
Building Custom Android Malware BruCON 2013
Introduction to Android Development Part 1
Android_Malware_IOAsis_2014_Analysis.pdf
Manish Chasta - Securing Android Applications
Pentesting iOS Applications
3. Android Architecture.pptx
Android Penetration testing - Day 2
Android security by ravi-rai
Android For Java Developers
Reading Group Presentation: Why Eve and Mallory Love Android
Null mumbai-Android-Insecure-Data-Storage-Exploitation
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
Notes Unit2.pptx

More from Cysinfo Cyber Security Community (20)

PDF
Understanding Malware Persistence Techniques by Monnappa K A
PDF
Understanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
PDF
Getting started with cybersecurity through CTFs by Shruti Dixit & Geethna TK
PPTX
Emerging Trends in Cybersecurity by Amar Prusty
PDF
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
PDF
Closer look at PHP Unserialization by Ashwin Shenoi
PDF
Unicorn: The Ultimate CPU Emulator by Akshay Ajayan
PDF
The Art of Executing JavaScript by Akhil Mahendra
PDF
Reversing and Decrypting Malware Communications by Monnappa
PPTX
DeViL - Detect Virtual Machine in Linux by Sreelakshmi
PPTX
Analysis of android apk using adhrit by Abhishek J.M
PDF
Understanding evasive hollow process injection techniques monnappa k a
PPTX
Security challenges in d2d communication by ajithkumar vyasarao
PPTX
S2 e (selective symbolic execution) -shivkrishna a
PPTX
Dynamic binary analysis using angr siddharth muralee
PPTX
Bit flipping attack on aes cbc - ashutosh ahelleya
PDF
Security Analytics using ELK stack
PPT
Image (PNG) Forensic Analysis
PPT
Malware Detection using Machine Learning
PPTX
Deep Web - what to do and what not to do
Understanding Malware Persistence Techniques by Monnappa K A
Understanding & analyzing obfuscated malicious web scripts by Vikram Kharvi
Getting started with cybersecurity through CTFs by Shruti Dixit & Geethna TK
Emerging Trends in Cybersecurity by Amar Prusty
A look into the sanitizer family (ASAN & UBSAN) by Akul Pillai
Closer look at PHP Unserialization by Ashwin Shenoi
Unicorn: The Ultimate CPU Emulator by Akshay Ajayan
The Art of Executing JavaScript by Akhil Mahendra
Reversing and Decrypting Malware Communications by Monnappa
DeViL - Detect Virtual Machine in Linux by Sreelakshmi
Analysis of android apk using adhrit by Abhishek J.M
Understanding evasive hollow process injection techniques monnappa k a
Security challenges in d2d communication by ajithkumar vyasarao
S2 e (selective symbolic execution) -shivkrishna a
Dynamic binary analysis using angr siddharth muralee
Bit flipping attack on aes cbc - ashutosh ahelleya
Security Analytics using ELK stack
Image (PNG) Forensic Analysis
Malware Detection using Machine Learning
Deep Web - what to do and what not to do

Recently uploaded (20)

PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
history of c programming in notes for students .pptx
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Introduction to Artificial Intelligence
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Nekopoi APK 2025 free lastest update
PPTX
Transform Your Business with a Software ERP System
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Upgrade and Innovation Strategies for SAP ERP Customers
Softaken Excel to vCard Converter Software.pdf
Design an Analysis of Algorithms I-SECS-1021-03
Wondershare Filmora 15 Crack With Activation Key [2025
Odoo POS Development Services by CandidRoot Solutions
Odoo Companies in India – Driving Business Transformation.pdf
PTS Company Brochure 2025 (1).pdf.......
history of c programming in notes for students .pptx
VVF-Customer-Presentation2025-Ver1.9.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Introduction to Artificial Intelligence
Which alternative to Crystal Reports is best for small or large businesses.pdf
ai tools demonstartion for schools and inter college
Nekopoi APK 2025 free lastest update
Transform Your Business with a Software ERP System
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx

Dissecting Android APK

  • 1. Dissecting Android APK Reversing Android applications
  • 2. /> self.me - Final year undergraduate student at Amrita University, Amritapuri - Love Android ! - Currently researching on Android security - Play CTFs as a part of team bi0s
  • 4. Index - Why Android ? - Android security implementations and issues - Real world Android malwares - Reversing Android apps - Structure of an APK - Analyzing the contents
  • 5. Why Android ? The Tale of Triumph Open source - power to you! User-friendly Most used - more developers
  • 6. Mobile OS Global Market Share 2016
  • 7. Android security - Sandboxing - Permissions - ASLR since Android 4.0 ICS - ARM TrustZone Implementations
  • 10. Are we at risk ?
  • 11. Issues - Malwares - Ransomwares - Exploits
  • 12. Real world Android malwares
  • 13. AccuTrack : Turns an Android device into a GPS tracker AckPost : Steals contact information from the device and sends it to a remote server BackFlash / Crosate : Installs as a fake Flash plugin, registers as a Device administrator, and steals sensitive data BankBot : Particularly aims at stealing bank account information from dedicated apps DroidDeluxe : Exploits the device to gain root privilege and then modifies access permission of database files and collects account information
  • 14. APK Android package : APK Zip file with .apk extension Playstore, Amazon Appstore, F-Droid Java + res + XML + Libs Android PacKage
  • 16. Reversing Android apps Tools and Methodologies
  • 17. APKTOOL Reversing APKs - Compile/decompile apps - Smali code - To modify apps
  • 19. assets - all the unmodified app contents AndroidManifest.xml - Generic; The app-map classes.dex - Java files’ package. The Dalvik executable [ yeah! the source ] res - All the resources ( drawables, icons, values ) lib - External/custom native libraries Resources.asrc - Compiled resources / binaries META-INF - Certificates
  • 20. Dalvik / ART → JVM redefined → Dalvik until 4.4.4 Kitkat. ART from 5.0 Lollipop → Executes dex → Dalvik - JIT, ART - AOT
  • 21. DEX Dalvik Executable > Dalvik’s bytecode > java classes > Easy to debug
  • 22. Tools
  • 23. ADB Android Debug Bridge - Android tool - Drop shells, files - Access partitions - Install applications
  • 24. Dex2Jar The source - Small in size - Any platform - Extracts compiled classes out of the dex - Easy to use
  • 25. Demo
  • 26. Workaround ? → Check permissions → Trusted app sources → Use ‘ anti-malware ’ apps
  • 27. Glossary - aapt : Android Asset Packaging Tool. - dex : Dalvik executable. - dx : Tool within the Android SDK used to convert the jar files into dex files. - R.java : A class with static methods to reference all the resources.
  • 28. In-depth Introduction to Android Permission Model Android Internals by Karim Yaghmour Logcat Security Issue Dalvik and ART Dex2jar, ADB, APK Tool DexGuard obfuscator Dalvik opcodes OWASP Seraphimdroid References