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
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.4k
[WeAreDevelopers World Conference] Reversing Android Apps
marcobrador
0
690
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
920
[DroidCon Lisbon 2019] Intro to Android App Security
marcobrador
2
480
Other Decks in Programming
See All in Programming
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.3k
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
220
How to stabilize UI tests using XCTest
akkeylab
0
130
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
950
Claude Codeセッション現状確認 2026福岡 / fukuoka-aicoding-00-beacon
monochromegane
4
420
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
4
510
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
250
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
590
Fundamentals of Software Engineering In the Age of AI
therealdanvega
1
250
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
1
140
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
200
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
15
8.8k
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
280
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
140
The Limits of Empathy - UXLibs8
cassininazir
1
260
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Statistics for Hackers
jakevdp
799
230k
The Spectacular Lies of Maps
axbom
PRO
1
620
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
RailsConf 2023
tenderlove
30
1.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
190
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
390
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!