Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
[mDevCamp 2020] Reversing Android Apps
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Marc Obrador
June 11, 2020
Programming
3
2.9k
[mDevCamp 2020] Reversing Android Apps
Marc Obrador
June 11, 2020
Tweet
Share
More Decks by Marc Obrador
See All by Marc Obrador
[Droidcon London 2023] REST in Peace: A Journey Through API Protection
marcobrador
0
110
[Droidcon Berlin 2023] Obfuscation in Mobile Apps
marcobrador
0
1.3k
[WeAreDevelopers World Conference] Reversing Android Apps
marcobrador
0
680
Introduction to Mobile App Security
marcobrador
2
390
[ICE71 CyberSecurity Networking Night] Mobile App Security: A developer's introduction
marcobrador
0
790
[GDG BCN 2019] Introduction to Android App Security
marcobrador
1
910
[DroidCon Lisbon 2019] Intro to Android App Security
marcobrador
2
480
Other Decks in Programming
See All in Programming
Architectural Extensions
denyspoltorak
0
290
2026年 エンジニアリング自己学習法
yumechi
0
130
AtCoder Conference 2025
shindannin
0
1.1k
AI時代の認知負荷との向き合い方
optfit
0
160
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
280
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
Oxlintはいいぞ
yug1224
5
1.3k
「ブロックテーマでは再現できない」は本当か?
inc2734
0
1k
AI巻き込み型コードレビューのススメ
nealle
1
280
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
970
Apache Iceberg V3 and migration to V3
tomtanaka
0
160
Featured
See All Featured
Marketing to machines
jonoalderson
1
4.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Music & Morning Musume
bryan
47
7.1k
WENDY [Excerpt]
tessaabrams
9
36k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
Code Review Best Practice
trishagee
74
20k
Writing Fast Ruby
sferik
630
62k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
Principles of Awesome APIs and How to Build Them.
keavy
128
17k
Transcript
Reversing Android Apps
Marc Obrador Lead Architect @ Build38 Barcelona
[email protected]
@marcobrador /in/marc-obrador
None
Source: https://en.wikipedia.org/wiki/Reverse_engineering It’s illegal (in the EU)!
None
Josep Bernad iOS Albert Sunyer UI
Artà is in Mallorca ABF takes place (usually) in June
COVID-19 pushed it to … ?
None
Get to know the app Step 0
Get to know the app
Get to know the app
Get to know the app
Get to know the app
Static Analysis Step 1
Static Analysis
Getting the APK
Decompiling the app https://ibotpeaches.github.io/Apktool/ $ brew install apktool
Decompiling the app
None
None
None
None
None
Let’s keep looking around
Wait… “discount codes”?
App users get a discount for events
None
Let’s take a closer look…
None
HTTP Basic Authorisation = Base64(“username:password”)
None
HTTP Basic Authorisation = Base64(“username:password”) username = “string1” xor “string2”
pasword = “string3” xor “string2”
None
Protecting against static analysis ProGuard is a good start… for
regular apps • It’s just method renaming and code shrinking • Tools for reversing ProGuard exist: http://apk-deguard.com/ Other (paid) alternatives exist for obfuscation Writing sensitve code in native (NDK) is a good idea
Dynamic Analysis Step 2
Dynamic Analysis
Dynamic Analysis
Network Sniffing a.k.a MITM
Network Sniffing https://www.charlesproxy.com/
Setting Up Charles Proxy
Setting Up Charles Proxy
Setting Up Charles Proxy
First attempt…
First attempt…
Setting Up Charles Proxy
Setting Up Charles Proxy
Let’s try again…
None
None
None
None
None
• Implement Root/Debugger/Emulator/Hooking Framework detection • Use certificate pinning •
Try to detect app tampering Protecting against dynamic analysis
Using Certificate Pinning Source: https://developer.android.com/training/articles/security-config
Tampering with the App Step 3
Assuming the app implemented Certificate Pinning…
$ adb install “Downloads/Artà Beer Festival_v1.2.5_apkpure.com.apk” Performing Streamed Install Success
$ adb shell am start com.marcobrador.android.artabeerfestival/.SplashActivity Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category .LAUNCHER] cmp=com.marcobrador.android.artabeerfestival/.SplashActivity }
Let’s try to remove it
None
None
None
Time to give it a try!
None
None
Preventing Repackaging
Looks like we are done here Looks like we are
done here
This code can be removed, too!
Closing Thoughts
None
None
None
Thank you!