SlideShare a Scribd company logo
Cracking the Code of Mobile
Application
OWASP APPSEC USA 2012



                        - Sreenarayan A
                          Paladion Mobile Security Team
Take Away for the day

•   Why Mobile Security?
•   Purpose of Decompiling Mobile Applications?!
•   Methodology of Decompilation
•   Live Demo’s:
    –   Windows Phone App
    –   Android App
    –   iOS (iPhone / iPad App)
    –   Blackberry Apps / Nokia App [Jar Files]
    –   Blackberry Apps [COD Files]
Why is security relevant for Mobile Platform?
•   400% Increase in the number for Organizations Developing Mobile Platform
    based applications.
•   300% Increase in the no of Mobile Banking Applications.
•   500% Increase in the number of people using the Mobile Phones for their day to
    day transactions.
•   82% Chances of end users not using their Mobile Phones with proper caution.
•   79% Chances of Mobile Phone users Jail Breaking their Phones.
•   65% Chances of Mobile Phone users not installing Anti-virus on their Mobile
    Phones.

• 71% Chances of any application to get
  misused.
•   57% Chances of a user losing his sensitive credentials to a hacker.
Market Statistics of Mobile Users
Mobile Market Trends
Different Types of Mobile Applications

• Mobile Browser based Mobile Applications
• Native Mobile Applications
• Hybrid Mobile Applications
Different Types of Mobile Applications
Different Types of Mobile Architecture




Browser
                                      Hybrid App
App
Why did we learn the above types??

• Which applications can be Decompiled?
  – Browser based Mobile Applications ?
  – Native Mobile Applications ?
  – Hybrid Mobile Applications ?


• We have to get to know of the basics!
Cracking the Mobile Application Code
Cracking the Mobile Application Code

•What do you mean by Decompilation? -> What is Compilation?
•What do you mean by Reverse Engineering?

Questions to be answered ahead:
•What are the goals/purpose of Cracking the code?

•What is the methodology of Decompilation?
•What the tools which can be used to Decompile?

•Can Decompilation be done on all platforms?
    1. WINDOWS PHONE / WINDOWS MOBILE ?
    2. ANDROID ?
    3. iPHONE / iPAD ?
    4. BLACKBERRY ?
    5. NOKIA ?
Goal of Cracking the Mobile Application Code
Goals of Cracking the Source Code

•“UNDERSTAND THE WORKING OF THE APPLICATION AND TO FIGURE OUT
THE LOOPHOLES!”

•To find Treasure Key Words like: password , keys , sql, algo, AES, DES,
Base64, etc

•Figure out the Algorithms Used and their keys.

•By-passing the client side checks by rebuilding the app.

•E.g. Password in Banking Application (Sensitive Information)
•E.g. Angry Birds Malware (Stealing Data)
•E.g. Zitmo Malware (Sending SMS)

•We have understood the goals, how to achieve them? Methodology.
Methodology of Cracking
Methodology / Study

         • Gaining access to the executable (.apk / .xap / .jar / .cod / .jad .. )
Step 1

         • Understanding the Technology used to code the application.
Step 2

         • Finding out ways to derive the Object Code from the Executable.
Step 3

         • Figuring out a way to derive the Class Files from the Object Code.
Step 4

       • Figuring out a way to derive the Function Definitions from the Object
Step 5   Code
JUMP TO DEMO’s

Lets us understand the methodology in all platforms..
Demo - Reverse Engineer the Windows Phone
Application
•Tools used:
    -De-compresser (Winrar / Winzip / 7zip)
    -.Net Decompiler (ILSpy)
    -Visual Studio / Notepad

•Steps
    1.   . xap -> .dll
    2.   .dll -> .csproject

•   Demo

•   Mitigation
    1. Free Obfuscator (diff. to read): http://confuser.codeplex.com/
    2. Dotfuscator (program flow) : Link
Demo - Reverse Engineer the Android
Application
•Tools used:
    -De-compresser (Winrar / Winzip / 7zip)
    -Dex2jar Tool (Command Line)
    -Java Decompiler / Jar decompiler (JD-GUI, etc)

•Steps
    1.   .apk -> .dex
    2.   .dex -> .jar
    3.   .jar -> .java

•   Demo

•   Mitigation
    1. Obfuscation Free Tool: http://proguard.sourceforge.net/
Demo - Reverse Engineer the Blackberry
Application
•Tools used:
    -JD – GUI (Java Decompiler)
    -Notepad
•There are two types of Application files found in Blackberry:
    1. .Jar (.jad -> .jar)
    2. .Cod (.jad -> .cod (Blackberry Code Files)

•Steps
    1. .jar -> .java (JD-GUI) -> Notepad
    Or
    1. .cod -> codec Tool -> Notepad
• Demo
• Mitigation
    1. Obfuscation Free Tool: http://proguard.sourceforge.net/
Demo - Reverse Engineer the iOS Application

•Tools used:
    -iExplorer
    -Windows Explorer
    -oTool
    -Class-dump-z

•Steps
    1.   .app -> Garbage (Object Code) (DVM)
    2.   Object Code -> Class definitions

•   Demo
•   Limitations: Apple changes the IDE every release leading to challenges.
•   Mitigation
    1. Obfuscation Free Tool: http://proguard.sourceforge.net/
Palisade Articles

•   iOS vs Android Testing
•   Mobile Data Encryption
•   Mobile Application Security Testing
•   Demystifying the Android Malware
•   And …


• Website link: palizine.plynt.com
• Questions and Answers
• Quiz
• Feedback
Thank You
Sreenarayan.a@paladion.net

Twitter: Ace_Sree

More Related Content

PDF
Enfilade: Tool to Detect Infections in MongoDB Instances
PDF
Detecting Ransomware/Bot Infections in Elasticsearch
PDF
Understanding ransomware
PPTX
Reduce the Risk of Open Source Security Vulnerabilities
PPT
Brucon presentation
PDF
Android Malware Detection Mechanisms
PPTX
Android malware analysis
PPTX
The difference between Penetration Testing and Red Team
Enfilade: Tool to Detect Infections in MongoDB Instances
Detecting Ransomware/Bot Infections in Elasticsearch
Understanding ransomware
Reduce the Risk of Open Source Security Vulnerabilities
Brucon presentation
Android Malware Detection Mechanisms
Android malware analysis
The difference between Penetration Testing and Red Team

What's hot (20)

PPTX
Vulnerability and Exploit Trends: Combining behavioral analysis and OS defens...
PDF
Android malware overview, status and dilemmas
DOCX
Ian Powers Resume
PDF
Malware Detection in Android Applications
PDF
Penetration testing tools and phases
PDF
Android malware presentation
PPTX
PPTX
DLL Preloading Attack
PDF
20171106 - Privacy Design Lab - LINDDUN
PDF
Mobile Application Pentest [Fast-Track]
PDF
Owasp Mobile Risk M2 : Insecure Data Storage : null/OWASP/G4H Bangalore Aug 2014
PPTX
Pentesting Android Apps
PDF
Malware detection-using-machine-learning
PPTX
Getting started with android
PPTX
Mmw mac malware-mac
PDF
Slide jul apcert agm 2016
PPTX
Continuous security testing - sharing responsibility
PDF
CVE-2021-44228 Log4j (and Log4Shell) Executive Explainer by cje@bugcrowd
PPTX
Cyber espionage nation state-apt_attacks_on_the_rise
PPTX
Android security
Vulnerability and Exploit Trends: Combining behavioral analysis and OS defens...
Android malware overview, status and dilemmas
Ian Powers Resume
Malware Detection in Android Applications
Penetration testing tools and phases
Android malware presentation
DLL Preloading Attack
20171106 - Privacy Design Lab - LINDDUN
Mobile Application Pentest [Fast-Track]
Owasp Mobile Risk M2 : Insecure Data Storage : null/OWASP/G4H Bangalore Aug 2014
Pentesting Android Apps
Malware detection-using-machine-learning
Getting started with android
Mmw mac malware-mac
Slide jul apcert agm 2016
Continuous security testing - sharing responsibility
CVE-2021-44228 Log4j (and Log4Shell) Executive Explainer by cje@bugcrowd
Cyber espionage nation state-apt_attacks_on_the_rise
Android security
Ad

Similar to Cracking the mobile application code (20)

PPTX
PPTX
I haz you and pwn your maal
PDF
михаил дударев
PDF
Owasp advanced mobile-application-code-review-techniques-v0.2
PPTX
Android Penetration testing - Day 2
PPTX
Barcode scanning on Android
PPTX
Android village @nullcon 2012
PPT
Outsmarting SmartPhones
PPTX
How to Test Security and Vulnerability of Your Android and iOS Apps
PDF
Pentesting Mobile Applications (Prashant Verma)
PPT
Software quality and mobile apps
PDF
SmartDevCon - Katowice - 2013
PDF
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
PPTX
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)
PDF
Android Seminar BY Suleman Khan.pdf
PPT
PPT
Android Applications
PPT
PPTX
Android Security Humla Part 1
I haz you and pwn your maal
михаил дударев
Owasp advanced mobile-application-code-review-techniques-v0.2
Android Penetration testing - Day 2
Barcode scanning on Android
Android village @nullcon 2012
Outsmarting SmartPhones
How to Test Security and Vulnerability of Your Android and iOS Apps
Pentesting Mobile Applications (Prashant Verma)
Software quality and mobile apps
SmartDevCon - Katowice - 2013
2013 Toorcon San Diego Building Custom Android Malware for Penetration Testing
Security Vulnerabilities in Mobile Applications (Kristaps Felzenbergs)
Android Seminar BY Suleman Khan.pdf
Android Applications
Android Security Humla Part 1
Ad

Recently uploaded (20)

PDF
Classroom Observation Tools for Teachers
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Pharma ospi slides which help in ospi learning
PDF
01-Introduction-to-Information-Management.pdf
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Cell Types and Its function , kingdom of life
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
Lesson notes of climatology university.
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Computing-Curriculum for Schools in Ghana
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Institutional Correction lecture only . . .
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
Classroom Observation Tools for Teachers
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Microbial disease of the cardiovascular and lymphatic systems
Pharma ospi slides which help in ospi learning
01-Introduction-to-Information-Management.pdf
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Cell Types and Its function , kingdom of life
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Renaissance Architecture: A Journey from Faith to Humanism
Lesson notes of climatology university.
Microbial diseases, their pathogenesis and prophylaxis
Computing-Curriculum for Schools in Ghana
human mycosis Human fungal infections are called human mycosis..pptx
O5-L3 Freight Transport Ops (International) V1.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Basic Mud Logging Guide for educational purpose
Institutional Correction lecture only . . .
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf

Cracking the mobile application code

  • 1. Cracking the Code of Mobile Application OWASP APPSEC USA 2012 - Sreenarayan A Paladion Mobile Security Team
  • 2. Take Away for the day • Why Mobile Security? • Purpose of Decompiling Mobile Applications?! • Methodology of Decompilation • Live Demo’s: – Windows Phone App – Android App – iOS (iPhone / iPad App) – Blackberry Apps / Nokia App [Jar Files] – Blackberry Apps [COD Files]
  • 3. Why is security relevant for Mobile Platform? • 400% Increase in the number for Organizations Developing Mobile Platform based applications. • 300% Increase in the no of Mobile Banking Applications. • 500% Increase in the number of people using the Mobile Phones for their day to day transactions. • 82% Chances of end users not using their Mobile Phones with proper caution. • 79% Chances of Mobile Phone users Jail Breaking their Phones. • 65% Chances of Mobile Phone users not installing Anti-virus on their Mobile Phones. • 71% Chances of any application to get misused. • 57% Chances of a user losing his sensitive credentials to a hacker.
  • 4. Market Statistics of Mobile Users
  • 6. Different Types of Mobile Applications • Mobile Browser based Mobile Applications • Native Mobile Applications • Hybrid Mobile Applications
  • 7. Different Types of Mobile Applications
  • 8. Different Types of Mobile Architecture Browser Hybrid App App
  • 9. Why did we learn the above types?? • Which applications can be Decompiled? – Browser based Mobile Applications ? – Native Mobile Applications ? – Hybrid Mobile Applications ? • We have to get to know of the basics!
  • 10. Cracking the Mobile Application Code
  • 11. Cracking the Mobile Application Code •What do you mean by Decompilation? -> What is Compilation? •What do you mean by Reverse Engineering? Questions to be answered ahead: •What are the goals/purpose of Cracking the code? •What is the methodology of Decompilation? •What the tools which can be used to Decompile? •Can Decompilation be done on all platforms? 1. WINDOWS PHONE / WINDOWS MOBILE ? 2. ANDROID ? 3. iPHONE / iPAD ? 4. BLACKBERRY ? 5. NOKIA ?
  • 12. Goal of Cracking the Mobile Application Code
  • 13. Goals of Cracking the Source Code •“UNDERSTAND THE WORKING OF THE APPLICATION AND TO FIGURE OUT THE LOOPHOLES!” •To find Treasure Key Words like: password , keys , sql, algo, AES, DES, Base64, etc •Figure out the Algorithms Used and their keys. •By-passing the client side checks by rebuilding the app. •E.g. Password in Banking Application (Sensitive Information) •E.g. Angry Birds Malware (Stealing Data) •E.g. Zitmo Malware (Sending SMS) •We have understood the goals, how to achieve them? Methodology.
  • 15. Methodology / Study • Gaining access to the executable (.apk / .xap / .jar / .cod / .jad .. ) Step 1 • Understanding the Technology used to code the application. Step 2 • Finding out ways to derive the Object Code from the Executable. Step 3 • Figuring out a way to derive the Class Files from the Object Code. Step 4 • Figuring out a way to derive the Function Definitions from the Object Step 5 Code
  • 16. JUMP TO DEMO’s Lets us understand the methodology in all platforms..
  • 17. Demo - Reverse Engineer the Windows Phone Application •Tools used: -De-compresser (Winrar / Winzip / 7zip) -.Net Decompiler (ILSpy) -Visual Studio / Notepad •Steps 1. . xap -> .dll 2. .dll -> .csproject • Demo • Mitigation 1. Free Obfuscator (diff. to read): http://confuser.codeplex.com/ 2. Dotfuscator (program flow) : Link
  • 18. Demo - Reverse Engineer the Android Application •Tools used: -De-compresser (Winrar / Winzip / 7zip) -Dex2jar Tool (Command Line) -Java Decompiler / Jar decompiler (JD-GUI, etc) •Steps 1. .apk -> .dex 2. .dex -> .jar 3. .jar -> .java • Demo • Mitigation 1. Obfuscation Free Tool: http://proguard.sourceforge.net/
  • 19. Demo - Reverse Engineer the Blackberry Application •Tools used: -JD – GUI (Java Decompiler) -Notepad •There are two types of Application files found in Blackberry: 1. .Jar (.jad -> .jar) 2. .Cod (.jad -> .cod (Blackberry Code Files) •Steps 1. .jar -> .java (JD-GUI) -> Notepad Or 1. .cod -> codec Tool -> Notepad • Demo • Mitigation 1. Obfuscation Free Tool: http://proguard.sourceforge.net/
  • 20. Demo - Reverse Engineer the iOS Application •Tools used: -iExplorer -Windows Explorer -oTool -Class-dump-z •Steps 1. .app -> Garbage (Object Code) (DVM) 2. Object Code -> Class definitions • Demo • Limitations: Apple changes the IDE every release leading to challenges. • Mitigation 1. Obfuscation Free Tool: http://proguard.sourceforge.net/
  • 21. Palisade Articles • iOS vs Android Testing • Mobile Data Encryption • Mobile Application Security Testing • Demystifying the Android Malware • And … • Website link: palizine.plynt.com
  • 22. • Questions and Answers • Quiz • Feedback