Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
[WeAreDevelopers World Conference] Reversing An...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Marc Obrador
June 30, 2021
Programming
700
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
[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
140
[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
400
[ICE71 CyberSecurity Networking Night] Mobile App Security: A developer's introduction
marcobrador
0
820
[GDG BCN 2019] Introduction to Android App Security
marcobrador
1
970
[DroidCon Lisbon 2019] Intro to Android App Security
marcobrador
2
510
Other Decks in Programming
See All in Programming
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
520
SREの越境 / SRE Collaboration
y0hgi
2
300
Jetpack Compose Mechanisms
skydoves
2
350
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
350
カツオ、ご期待ください
suneo3476
0
150
setup-vp GitLab対応の裏側
naokihaba
0
150
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
670
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
190
Rでドレミ/Do-Re-Mi_with_R
florets1
0
120
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
20
21k
Webの地図
yosuke_furukawa
PRO
6
5k
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
270
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Faster Mobile Websites
deanohume
310
32k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
66k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
The browser strikes back
jonoalderson
0
1.8k
Discover your Explorer Soul
emna__ayadi
2
1.3k
What's in a price? How to price your products and services
michaelherold
247
13k
Speed Design
sergeychernyshev
33
2.1k
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!