Android APK ์ฒดํฌ๋ฆฌ์คํธ
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.
Learn Android fundamentals
- Basics
- Dalvik & Smali
- Entry points
- Activities
- URL Schemes
- Content Providers
- Services
- Broadcast Receivers
- Intents
- Intent Filter
- Other components
- How to use ADB
- How to modify Smali
Static Analysis
- ๋ค์ ํญ๋ชฉ ํ์ธ: obfuscation ์ฌ์ฉ ์ฌ๋ถ, ๊ธฐ๊ธฐ๊ฐ rooted์ธ์ง ์ฌ๋ถ, emulator ์ฌ์ฉ ์ฌ๋ถ, anti-tampering ์ฒดํฌ ๋ฑ. Read this for more info.
- ๋ฏผ๊ฐํ ์ ํ๋ฆฌ์ผ์ด์ (์: bank apps)์ ๊ธฐ๊ธฐ๊ฐ rooted์ธ์ง ํ์ธํ๊ณ ๊ทธ์ ๋ฐ๋ผ ๋์ํด์ผ ํฉ๋๋ค.
- interesting strings ๊ฒ์ (passwords, URLs, API, encryption, backdoors, tokens, Bluetooth uuidsโฆ).
- firebase ๊ด๋ จ APIs์ ํน๋ณํ ์ฃผ์ํ์ธ์.(firebase APIs).
- Read the manifest:
- ์ ํ๋ฆฌ์ผ์ด์ ์ด debug ๋ชจ๋์ธ์ง ํ์ธํ๊ณ โexploitโ ์๋ํด๋ณด์ธ์.
- APK๊ฐ backups๋ฅผ ํ์ฉํ๋์ง ํ์ธํ์ธ์.
- Exported Activities ํ์ธ
- Unity Runtime: exported UnityPlayerActivity/UnityPlayerGameActivity์
unityCLI extras bridge. pre-initdlopen()RCE๋ฅผ ์ํด-xrsdk-pre-init-library <abs-path>ํ ์คํธ. ์์ธํ ๋ด์ฉ์ Intent Injection โ Unity Runtime ์ฐธ๊ณ . - Content Providers ์ ๊ฒ
- Exposed services ์ ๊ฒ
- Broadcast Receivers ์ ๊ฒ
- URL Schemes ์ ๊ฒ
- ์ ํ๋ฆฌ์ผ์ด์ ์ด ๋ด๋ถ ๋๋ ์ธ๋ถ์ ๋ฐ์ดํฐ๋ฅผ ์์ ํ์ง ์๊ฒ ์ ์ฅํ๊ณ ์๋๊ฐ? saving data insecurely internally or externally
- ํ๋์ฝ๋ฉ๋ ํจ์ค์๋ ๋๋ ๋์คํฌ์ ์ ์ฅ๋ ํจ์ค์๋๊ฐ ์๋๊ฐ? password hard coded or saved in disk ์ฑ์ด insecureํ crypto ์๊ณ ๋ฆฌ์ฆ์ ์ฌ์ฉํ๊ณ ์๋๊ฐ? using insecurely crypto algorithms
- ๋ชจ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ PIE ํ๋๊ทธ๋ก ์ปดํ์ผ๋์๋๊ฐ?
- ์ ์ Android ๋ถ์๊ธฐ๋ค(static Android Analyzers)์ด ์ด ๋จ๊ณ์์ ๋ง์ ๋์์ ์ค ์ ์๋ค๋ ๊ฒ์ ์์ง ๋ง์ธ์. (์๋ ๋ถ์ ์ฐธ๊ณ )
-
android:exportedAndroid 12+์์ ํ์ โ ์๋ชป ๊ตฌ์ฑ๋ exported ์ปดํฌ๋ํธ๋ ์ธ๋ถ intent ํธ์ถ๋ก ์ด์ด์ง ์ ์์ต๋๋ค. -
Network Security Config(networkSecurityConfigXML)๋ฅผ ๊ฒํ ํ์ฌcleartextTrafficPermitted="true"๋๋ ๋๋ฉ์ธ๋ณ ์ค๋ฒ๋ผ์ด๋๊ฐ ์๋์ง ํ์ธํ์ธ์. - Play Integrity / SafetyNet / DeviceCheck ํธ์ถ์ ์ฐพ์์ ์ปค์คํ attestation์ ํ /์ฐํํ ์ ์๋์ง ํ๋จํ์ธ์.
- App Links / Deep Links (
android:autoVerify)๋ฅผ ๊ฒ์ฌํ์ฌ intent-๋ฆฌ๋๋ ์ ๋๋ open-redirect ๋ฌธ์ ๊ฐ ์๋์ง ํ์ธํ์ธ์. - WebView.addJavascriptInterface ๋๋
loadData*()ํธ์ถ์ ์ฐพ์ ์ฑ ๋ด๋ถ์์ RCE / XSS๋ก ์ด์ด์ง ์ ์๋์ง ํ์ธํ์ธ์. - ํฌ๋ก์คํ๋ซํผ ๋ฒ๋ค(Flutter
libapp.so, React-Native JS bundles, Capacitor/Ionic assets)์ ๋ถ์ํ์ธ์. ์ ์ฉ ๋๊ตฌ: flutter-packer,fluttersign,rn-differ- ์ 3์ ๋ค์ดํฐ๋ธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ค์บํ์ฌ ์๋ ค์ง CVE ํ์ธ(์: libwebp CVE-2023-4863, libpng ๋ฑ).
- ์ถ๊ฐ ๋ฐ๊ฒฌ์ ์ํด SEMgrep Mobile rules, Pithus ๋ฐ ์ต์ MobSF โฅ 3.9 AI ์ง์ ์ค์บ ๊ฒฐ๊ณผ ํ๊ฐ.
Dynamic Analysis
- ํ๊ฒฝ ์ค๋น(online, local VM or physical)
- ์๋์น ์์ data leak(๋ก๊น , ๋ณต์ฌ/๋ถ์ฌ๋ฃ๊ธฐ, crash logs) ์ฌ๋ถ ํ์ธ
- SQLite DB์ ๊ธฐ๋ฐ ์ ๋ณด๊ฐ ์ ์ฅ๋๊ณ ์๋๊ฐ?(Confidential information being saved in SQLite dbs)
- Exploitable exposed Activities ์ฌ๋ถ
- Exploitable Content Providers ์ฌ๋ถ
- Exploitable exposed Services ์ฌ๋ถ
- Exploitable Broadcast Receivers ์ฌ๋ถ
- ์ ํ๋ฆฌ์ผ์ด์ ์ด clear text๋ก ์ ๋ณด๋ฅผ ์ ์กํ๊ฑฐ๋ ์ฝํ ์๊ณ ๋ฆฌ์ฆ์ ์ฌ์ฉํ๋๊ฐ?(transmitting information in clear text/using weak algorithms) MitM๊ฐ ๊ฐ๋ฅํ๊ฐ?
- HTTP/HTTPS ํธ๋ํฝ ๊ฒ์ฌ(Inspect HTTP/HTTPS traffic)
- HTTP ํธ๋ํฝ์ ์บก์ฒํ ์ ์๋ค๋ฉด ์ผ๋ฐ์ ์ธ Web ์ทจ์ฝ์ ์ ์ฐพ์ ์ ์์ผ๋ฏ๋ก ๋งค์ฐ ์ค์ํฉ๋๋ค(Hacktricks๋ ์น ์ทจ์ฝ์ ์ ๊ดํ ๋ง์ ์ ๋ณด๋ฅผ ์ ๊ณตํฉ๋๋ค).
- ๊ฐ๋ฅํ Android Client Side Injections ๊ฒ์ฌ(Android Client Side Injections) (์ ์ ์ฝ๋ ๋ถ์์ด ๋์๋ ์ ์์)
- Frida: Frida๋ฅผ ์ฌ์ฉํด ์ ํ๋ฆฌ์ผ์ด์ ์์ ํฅ๋ฏธ๋ก์ด ๋์ ๋ฐ์ดํฐ๋ฅผ ํ๋ํ์ธ์(์: ํจ์ค์๋).
- Tapjacking / Animation-driven attacks (TapTrap 2025) ํ ์คํธ โ Android 15+์์๋(overlay ๊ถํ ๋ถํ์) ์ฃผ์.
- overlay / SYSTEM_ALERT_WINDOW clickjacking ๋ฐ Accessibility Service ๋จ์ฉ์ ํตํด ๊ถํ ์์น ์๋.
-
adb backup/bmgr backupnow๋ก ์ฑ ๋ฐ์ดํฐ๋ฅผ ๋คํํ ์ ์๋์ง ํ์ธ(allowBackup๋ฅผ ๋นํ์ฑํํ์ง ์์ ์ฑ). - Binder-level LPEs ํ์(์: CVE-2023-20963, CVE-2023-20928) โ ํ์ฉ๋๋ ๊ฒฝ์ฐ ์ปค๋ ํผ์ ๋๋ PoC ์ฌ์ฉ.
- Play Integrity / SafetyNet์ด ๊ฐ์ ๋๋ ๊ฒฝ์ฐ runtime ํ
(์:
Frida Gadget,MagiskIntegrityFix,Integrity-faker) ๋๋ ๋คํธ์ํฌ ๋ ๋ฒจ ๋ฆฌํ๋ ์ด ์๋. - ์ต์ ํด๋ก ๊ณ์ธก:
- Objection > 2.0, Frida 17+, NowSecure-Tracer (2024)
- ์์คํ
์ ๋ฐ์ ๋์ ํธ๋ ์ด์ฑ:
perfetto/simpleperf.
Some obfuscation/Deobfuscation information
์ฐธ๊ณ ์๋ฃ
Tip
AWS ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training AWS Red Team Expert (ARTE)
GCP ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:HackTricks Training GCP Red Team Expert (GRTE)
Azure ํดํน ๋ฐฐ์ฐ๊ธฐ ๋ฐ ์ฐ์ตํ๊ธฐ:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks ์ง์ํ๊ธฐ
- ๊ตฌ๋ ๊ณํ ํ์ธํ๊ธฐ!
- **๐ฌ ๋์ค์ฝ๋ ๊ทธ๋ฃน ๋๋ ํ ๋ ๊ทธ๋จ ๊ทธ๋ฃน์ ์ฐธ์ฌํ๊ฑฐ๋ ํธ์ํฐ ๐ฆ @hacktricks_live๋ฅผ ํ๋ก์ฐํ์ธ์.
- HackTricks ๋ฐ HackTricks Cloud ๊นํ๋ธ ๋ฆฌํฌ์งํ ๋ฆฌ์ PR์ ์ ์ถํ์ฌ ํดํน ํธ๋ฆญ์ ๊ณต์ ํ์ธ์.


