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
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
130
[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
810
[GDG BCN 2019] Introduction to Android App Security
marcobrador
1
950
[DroidCon Lisbon 2019] Intro to Android App Security
marcobrador
2
500
Other Decks in Programming
See All in Programming
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.8k
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
250
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
160
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
480
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.4k
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
130
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
190
えっ!!コードを読まずに開発を!?
hananouchi
0
190
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
140
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
130
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
210
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
290
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
How STYLIGHT went responsive
nonsquared
100
6.2k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
380
Embracing the Ebb and Flow
colly
88
5.1k
Designing for Timeless Needs
cassininazir
1
320
We Have a Design System, Now What?
morganepeng
55
8.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.4k
Test your architecture with Archunit
thirion
1
2.3k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
410
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!