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
[WeAreDevelopers World Conference] Reversing An...
Search
Marc Obrador
June 30, 2021
Programming
690
0
Share
[WeAreDevelopers World Conference] Reversing Android Apps
Marc Obrador
June 30, 2021
More Decks by Marc Obrador
See All by Marc Obrador
[Droidcon London 2023] REST in Peace: A Journey Through API Protection
marcobrador
0
120
[Droidcon Berlin 2023] Obfuscation in Mobile Apps
marcobrador
0
1.4k
[mDevCamp 2020] Reversing Android Apps
marcobrador
3
2.9k
Introduction to Mobile App Security
marcobrador
2
390
[ICE71 CyberSecurity Networking Night] Mobile App Security: A developer's introduction
marcobrador
0
800
[GDG BCN 2019] Introduction to Android App Security
marcobrador
1
940
[DroidCon Lisbon 2019] Intro to Android App Security
marcobrador
2
490
Other Decks in Programming
See All in Programming
[RubyKaigi 2026] Require Hooks
palkan
1
300
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
370
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
380
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
180
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
350
Programming with a DJ Controller — not vibe coding
m_seki
3
810
GitHubCopilotCLIをはじめよう.pdf
htkym
0
330
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.9k
KMP × Kotlin 2.3 - How Android Got Slower While iOS Builds Improved by 47%
rio432
0
160
Kingdom of the Machine
yui_knk
2
1.5k
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
230
AI時代になぜ書くのか
mutsumix
0
340
Featured
See All Featured
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
170
A Soul's Torment
seathinner
6
2.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
The Language of Interfaces
destraynor
162
26k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
How STYLIGHT went responsive
nonsquared
100
6.1k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
790
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
Automating Front-end Workflow
addyosmani
1370
200k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
GitHub's CSS Performance
jonrohan
1032
470k
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
• Use certificate pinning • Implement Root/Debugger/Emulator/Hooking Framework detection •
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!