174 words
1 minute
TCTT25 Mobile: Bangkok Casino
Bangkok Casino (300 pts) - Mobile Security Write-up
โจทย์
คุณหลุดเข้ามาในคาสิโนลับกลางกรุงเทพฯ ที่ว่ากันว่ามี “กุญแจรหัส” สำหรับสมาชิกระดับ VIP ซ่อนอยู่ในแอปของทางคาสิโนเอง
ใครก็ตามที่หามันเจอ จะปลดล็อกสิทธิพิเศษได้ทันที… แต่แน่นอนว่าเจ้าบ้านไม่ปล่อยให้ค้นง่าย ๆ
ดาวน์โหลดไฟล์
| ไฟล์ | ดาวน์โหลด |
|---|---|
| APK File | 📦 GitHub Folder |
แนวทางการวิเคราะห์
1. Decompile APK
jadx-gui bangkok-casino.apk2. ค้นหา Secrets
grep -r "VIP" output/grep -r "secret" output/grep -r "key" output/grep -r "flag" output/grep -r "admin" output/3. วิเคราะห์ Game Logic
มองหา:
- Admin/VIP checks
- Hidden features
- Hardcoded credentials
- Encrypted data
4. ตรวจสอบ Native Libraries
# List native libsls output/lib/
# Analyze with Ghidra if needed5. Dynamic Analysis with Frida
Java.perform(function() { // Hook VIP check var VIPClass = Java.use('com.casino.VIPManager'); VIPClass.isVIP.implementation = function() { console.log('VIP check bypassed'); return true; };});จุดโจมตีที่เป็นไปได้
| จุดโจมตี | คำอธิบาย |
|---|---|
| Hardcoded Keys | Secret keys ใน source code |
| SharedPreferences | เก็บ VIP status |
| Native Lib | Keys ซ่อนใน .so files |
| Encrypted Assets | Decode encrypted resources |
| Network Traffic | Intercept API calls |
Tools สำหรับวิเคราะห์
| Tool | วัตถุประสงค์ |
|---|---|
| jadx | Java decompiler |
| Frida | Runtime hooking |
| Ghidra | Native lib analysis |
| Burp Suite | Network traffic |
| objection | Mobile exploration |
Frida Scripts
Bypass Root Detection
Java.perform(function() { var RootChecker = Java.use('com.casino.security.RootChecker'); RootChecker.isRooted.implementation = function() { return false; };});Dump Strings
Java.perform(function() { var StringClass = Java.use('java.lang.String'); StringClass.$init.overload('[B').implementation = function(bytes) { var result = this.$init(bytes); if (result.indexOf('flag') !== -1 || result.indexOf('VIP') !== -1) { console.log('Found: ' + result); } return result; };});หมายเหตุ
นี่เป็น reverse engineering challenge VIP secret key (flag) ซ่อนอยู่ในแอปและต้องวิเคราะห์อย่างละเอียดเพื่อดึงออกมา
Credits
Writeup by netw0rk7 | Original Repo
TCTT25 Mobile: Bangkok Casino
https://blog.lukkid.dev/posts/tctt25-mobile-bangkok-casino/