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

"Part 4: Android RE or How I became a Master in clumsy_bird.apk", Александр Антух, Daniel Ramirez

"Part 4: Android RE or How I became a Master in clumsy_bird.apk", Александр Антух, Daniel Ramirez

OWASP Russia Meetup #4

OWASP Moscow

March 17, 2016
Tweet

More Decks by OWASP Moscow

Other Decks in Programming

Transcript

  1. Part 4: Android RE or How I became a Master

    in clumsy_bird.apk OWASP Russia 17.03.2016
  2. Getting our apk file • From the phone – APKOptic

    – Astro File Manager • Using ADB • Use APKpure
  3. Decompiling || Disassembling • Decompiling: – High Level – Java

    Code • Disassembling: – Low Level – Assembly Code • Why Disassembling and not Decompiling?
  4. Decompiling-Dex2Jar • dex2jar – Converts Dalvik bytecode (DEX) to java

    bytecode (JAR) – Allows to use any existing Java decompiler with the resulting JAR file
  5. Decompiling – Java Decompilers • JD-GUI || Luyten – Closed

    source Java decompiler – Combined with dex2jar, you can use JD-GUI or Luyten to decompile Android applications • Both are Java decompilers but have different OUTPUT!
  6. Disassembling • Apktool – Open source Java tool for reverse-engineering

    Android app – Transform binary Dalvik byte code(dex) into Smali source
  7. Signing apk • Using signapk.jar java -jar signapk.jar certificate.pem key.pk8

    your- app.apk your-app-signed.apk • Using AppUse
  8. Lack of binary protection • At this point if you

    can read the source code of the application, modify the behavior of the application  doesn’t have enough protection.
  9. Obfuscated • Some obfuscation tool, allow to encrypt String in

    source code. – ProGuard(*) – DexProtector – DexGuard
  10. Recap • We’ve seen how it’s possible change the behavior

    of an app by disassembling, modify the smali code and recompiling the app • Some techniques to “try” to prevent the lack of binary protection
  11. Dendroid botnet #1 Botnet especially developed for attacking android user’s

    which has the functionalities like • Record call • Block SMS • Take video/photo • Send text • Send contacts • Get user account • Call Number • Update App • Delete files • Get browser history • Get call history • Get inbox SMS
  12. DroidDream Malware • Steal sensitive data – IMEI –> block

    phone – IMSI – Device model – SDK
  13. GMBot – Slempo • The first Tor Trojan for Android

    (2014) - Backdoor.AndroidOS.Torec.a • The Trojan can receive the following commands from the C&C : – Intercept sms – Send sms – Control number
  14. GMBot – Overview • Display phishing pages on the top

    of mobile banking applications • Also capable of forwarding calls and intercepting SMS messages to help fraudsters bypass an additional layer of bank security mechanisms, and locking a device’s screen.
  15. GMBot – Overview • Spy on victims • Delete data

    from the infected device • Gain boot persistence to help survive device restart • Send and Read your SMS message • Make calls to your contacts • Read the phone's state • Plague phone's control keys • Infect your Chrome browser • Change phone settings • Force the phone into sleep mode • Query the network status • Access the Internet • Wipe your device's storage Additionally the malware can be used to:
  16. How to Protect Yourself • Go to Settings → Security

    → Turn OFF "Allow installation from unknown sources" . • Always keep an up-to-date Anti-virus app • Avoid unknown and unsecured Wi-Fi hotspots • Never open attachments from unknown sources. • Never click on links in SMS or MMS messages sent to your phone. • Even if the email looks legit, go directly to the source website and verify any possible updates.