Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Offensive Analysis of Android Application OWASP DKTE

8af9592190302948f7a16a2df2e0026d?s=47 Owasp
December 26, 2021

Offensive Analysis of Android Application OWASP DKTE

8af9592190302948f7a16a2df2e0026d?s=128

Owasp

December 26, 2021
Tweet

More Decks by Owasp

Other Decks in Education

Transcript

  1. ANDROID APPLICATION PENETRATION TESTING Raja Nagori

  2. $WHOAMI • Senior Information Security Engineer at FIS Global. •

    Cyber Crime Intervention Officer from ISAC (NSD). • Synack Red Team Member. • Actively contributing to OWASP Community.
  3. TODAY’S DISCUSSION • Some Kick off Resources for Mobile VA

    and PT • Device Requirements and Tools Requirements for starting a Android Application VA and PT • Concept about Android Architecture • Practical implementation for Android Application VA and PT
  4. • MOBILE SECURITY TESTING GUIDE • https://mobile-security.gitbook.io/mobile-security-testing-guide/ • OWASP Mobile

    Top 10 • https://owasp.org/www-project-mobile-top-10/ • HACKTRICKs • https://book.hacktricks.xyz/mobile-apps-pentesting/android-app-pentesting RESOURCES
  5. DEVICE REQUIREMENTS • Android Penetration Testing • Windows, Kali linux,

    Parrot OS or MacBook • Preferable with 8-16GB of RAM or more and greater than 250GB of drive storage. • For Android interface • You can use emulator like ( Android Studio (My fav) Memu, nox, bluestacks, Genymotion) • You can use rooted a physical device.
  6. TOOLS REQUIREMENTS • JDAX-GUI • APKTOOL • MobSF • Frida

    • Objection • BurpSuite
  7. ANDROID ARCHITECTURE Ref: OWASP Mobile Security Testing (Link)

  8. LET’S TALK ABOUT PENETRATION TESTING PROCESS Reconnaissance (Active/Passive) Gathering Information

    or evidence about the target application. Scanning and Enumeration Scanning is the phase before the attack takes in action. Gaining Access Attackers use vulnerabilities identified during the detection and scanning stages to gain access to the identified system and network. Maintaining Access Maintaining access refers to the phase when the attacker tries to retain his or her ownership of the system. Covering Tracks For obvious reasons, such as avoiding legal problems and maintaining access, attackers often try to erase all evidence of their actions. P E N E T R A T I O N T E S T I N G
  9. LET’S TALK ABOUT MOBILE APPLICATION PENETRATION TESTING PROCESS M O

    B I L E P E N E T R A T I O N T E S T I N G Reconnaissance (Active/Passive) Gathering Information or evidence about the target application. Static Analysis Scanning and go through the code Dynamic Analysis Make changes and manipulating at the runtime of the application. Reporting Report the findings.
  10. SEE, WHO CAME “THE ANDROID”

  11. STATIC ANALYSIS

  12. ANDROID MANIFEST FILE • Extension is .xml • You’ll get

    basic information about the application • SDK version • Permission • Activities • Content Providers • Intent
  13. PERMISSION • Doesn’t have any extension unfortunately • It defines

    what data and hardware component can be need at the runtime • Camera • Internet • Access external storage • Bluetooth • ETC.
  14. ACTIVITIES • It also do not have any extension too

    • UI element of the application or different screen in the application. (take example of Gpay) • First screen will show you Gpay Logo. • Second will ask you the Fingerprint. • Third will display all the payment you did in past. NOTE: Here INTENT is changing from one screen to other.
  15. FINDING HARDCODED STRINGS • Usually find in resources/strings.xml • Threat

    Vector • Login Bypass • URL’s Exposed • API Keys Exposed • Firebase URL’s
  16. DYNAMIC ANALYSIS

  17. ANDROID DYNAMIC ANALYSIS • Intro to SSL Pinning • Bypassing

    with BurpSuite • Intro Frida/Objection • Inject Frida Manually /Automatically • Dumping Memory and Sensitive Data • Runtime analysis of Local Storage
  18. SSL PINNING • It’s a methodology which ensure no traffic

    will intercept from the application. • Some application VERIFY the receiving traffic into the phone as KNOWN CERTIFICATE. • App may crash when we try to intercept the network.
  19. ROOT DETECTION • An adversary will use an automated tool

    to reverse engineer the code and modify it using malware to perform some hidden functionality. • Root detection are related to binaries • /system/bin/su • /system/xbin/su • /sbin/su • /system/su • /system/bin/.ext/.su
  20. EXTRA RESOURCES AND USEFUL COMMAND • https://manifestsecurity.com/android-application-security/ • https://www.xmind.net/m/K7LmY7/# •

    https://www.kitploit.com/2020/10/awesome-android-security- curated-list.html?amp=0 • Some useful commands • Get the package list pm list packages | grep injured pm path <package_name> • To pull the base APK adb pull <path> name.apk • Start the activity from outside the apk am start b3nac.injuredandroid/.<activityname>