exploring the android apk via pokemon go
play

Exploring the Android APK via Pokemon GO The story of a Cat and a - PowerPoint PPT Presentation

Exploring the Android APK via Pokemon GO The story of a Cat and a Mouse Structure of APK Extraction Techniques Solutions Us Niantic (Pokemon Go) Connor Tumbleson Software Engineer Apktool Maintainer @iBotPeaches


  1. Exploring the Android APK via Pokemon GO

  2. The story of a Cat and a Mouse ๏ Structure of APK ๏ Extraction Techniques ๏ Solutions Us Niantic (Pokemon Go)

  3. Connor Tumbleson Software Engineer 
 Apktool Maintainer @iBotPeaches connortumbleson.com

  4. Pokemon Go

  5. Why Pokemon? ๏ Popularity ๏ Rough Launch ๏ Augmented Reality

  6. Pokemon Go - Unofficial Project Boom github.com/AHAAAAAAA/PokemonGo-Map ๏ Map Scanners ๏ Bots ๏ 3rd party Clients

  7. Player Count or API Abuse? Unofficial API Requests blocked. pokemongo.nianticlabs.com/en/post/update-080416/

  8. Where did it begin?

  9. Where did it begin?

  10. Let’s learn about APKs

  11. So let’s take a look at Pokemon Go

  12. So what is in an APK? ๏ Java Code Java Code ๏ compiled to .class (javac) classes.dex ๏ then to .dex (dx) ๏ dex file per 65,000 methods

  13. So what is in an APK? ๏ Resources Resources ๏ Strings resources.arsc ๏ Layouts ๏ Images

  14. So what is in an APK? ๏ Libraries C/C++ ๏ Game Engines il2cpp.so ๏ Android NDK ๏ Native langs - C / C++

  15. Goals ๏ Understand Format ๏ Extract ๏ APIs ๏ Assets ๏ Rebuild

  16. Meet Apktool

  17. Meet Apktool (not a plug)

  18. Pokemon Go - Decode

  19. Extraction - Format ๏ Unity Game Engine ๏ Multi Platform ๏ Widely Used

  20. Extraction - Assets

  21. Extraction - Assets

  22. Extraction - Assets

  23. Solution - Assets ๏ Placeholders ๏ Download assets on runtime

  24. Extraction - MITM ๏ Man in the Middle ๏ Peek into SSL traffic

  25. Extraction - MITM ๏ Not exactly readable

  26. Google - Protocol Buffers Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. https://developers.google.com/protocol-buffers/

  27. Extraction - Raw Protobuf ๏ Raw Protobuf output ๏ Could be better

  28. Extraction - il2cpp C# Mono C# compiler user scripts IL Emscripten (WebGL) C++ IL C++ Unity Script Xcode (iOS) il2cpp.exe UnityScript compiler user scripts C++ IL Other C++ compiler IL Assemblies (UnityEngine.dll, UnityEngine.UI.dll, asset store packages) https://blogs.unity3d.com/2015/05/06/an-introduction-to-ilcpp-internals/

  29. Extraction - il2cpp C# Mono C# compiler user scripts IL Emscripten (WebGL) C++ IL C++ Unity Script Xcode (iOS) il2cpp.exe UnityScript compiler user scripts C++ IL Other C++ compiler IL Assemblies (UnityEngine.dll, UnityEngine.UI.dll, asset store packages) https://blogs.unity3d.com/2015/05/06/an-introduction-to-ilcpp-internals/

  30. Extraction - protobuf

  31. Extraction - MITM https://github.com/AeonLucid/POGOProtos

  32. ๏ Understand Request ๏ Edit Requests ๏ Bonus: Precise values

  33. Solution - Sniffing ๏ SSL Pinning ๏ Not in launch ๏ Added in 0.31

  34. Extraction - Diff Report New Old ๏ NianticTrustManager.smali ๏ hmmm

  35. Extraction - smali

  36. Extraction - smali patched

  37. Extraction - Rebuild Complete ๏ We are back ๏ Caveat: Google Auth

  38. Solution - Java Obfuscation

  39. Solution - Java Obfuscation Old vs New

  40. Solution - “Unknown6”

  41. Unofficial API Blackout Unknown6 Enforced pokemongo.nianticlabs.com/en/post/update-080416/

  42. ClientBlob - “Unknown6” ๏ GPS ๏ Sensor ๏ Device ๏ Activity

  43. “Unknown6” broken https://github.com/pogodevorg/TU6

  44. Solution - Native Obfuscation ๏ Obfuscation ๏ Anti-Debugger ๏ Integrity Validation ๏ Complexity

  45. Hello SafetyNet

  46. Solution - SafetyNet ๏ SafetyNet enforces the CTS ๏ Compatibility Test Suite ๏ Blocks rooted devices ๏ Integrity Checks

  47. Solution - SafetyNet evolves ๏ suhide / magisk ๏ bypasses SafetyNet ๏ frequent updates https://developer.android.com/training/safetynet/index.html

  48. Solution - Captcha ๏ Not all users are equal ๏ Catch the outliers ๏ Google’s reCAPTCHA

  49. Solution - Legal :/

  50. Solution - Production is not Development ๏ Debug code can be abused ๏ Application contains clues ๏ Explain features

  51. Solutions - Recap ๏ Runtime Assets ๏ Obfuscation ๏ API Security ๏ Captcha, SafetyNet, Legal

  52. Q / A @iBotPeaches connortumbleson.com

  53. Story Time Upsight Analytics

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend