╔═══════════════════════════════════════════════════════════════════════════════╗ ║ ║ ║ 📊 رسم توضيحي للبروتوكول الكامل ║ ║ ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ ┌─────────────┐ │ App Start │ └──────┬──────┘ │ │ HTTP Request ▼ ┌──────────────────────────────────────┐ │ Server: cp5.uk/api/auth │ │ ──────────────────────────────── │ │ Response: │ │ { │ │ "data": [ │ │ "dQlkxubHvTWp3iPODK...", (58×) │ │ "8kJ2nPm3QrxYvI0KTj..." │ │ ] │ │ } │ └──────────┬───────────────────────────┘ │ │ JSON Parse ▼ ┌──────────────────────────────────────┐ │ Extract array of 58 items │ │ Each item: ~200 chars Base64 │ └──────────┬───────────────────────────┘ │ │ For each item: ▼ ╔═════════════════════════════════════════════════════════╗ ║ LAYER 1: AES-128-CBC Decryption ║ ╠═════════════════════════════════════════════════════════╣ ║ ║ ║ Function Call: ║ ║ ┌─────────────────────────────────────────────────┐ ║ ║ │ com.andyhax.Crypt.aesDecrypt( │ ║ ║ │ encrypted: "dQlkxubHvTWp3iPODKTk...", │ ║ ║ │ key: "Al4mK7AwxtYS1yC7", │ ║ ║ │ iv: from first 16 bytes │ ║ ║ │ ) │ ║ ║ └─────────────────────────────────────────────────┘ ║ ║ ║ ║ Algorithm: AES/CBC/PKCS5Padding ║ ║ Key Size: 128 bits (16 bytes) ║ ║ ║ ║ Native Implementation: libhax.so ║ ║ ║ ╚═════════════════════════════════════════════════════════╝ │ │ Decryption success ▼ ┌──────────────────────────────────────┐ │ Result: Base64 string (172 chars) │ │ │ │ Example: │ │ "9uxMIftJ3Ir3w0vgBBYSrNyxug..." │ └──────────┬───────────────────────────┘ │ │ Base64 decode ▼ ╔═════════════════════════════════════════════════════════╗ ║ LAYER 2: RSA-1024 Encrypted Tokens ║ ╠═════════════════════════════════════════════════════════╣ ║ ║ ║ Binary Data: 128 bytes ║ ║ ║ ║ Format: RSA-1024 encrypted data ║ ║ (1024 bits = 128 bytes) ║ ║ ║ ║ Hex (first 16 bytes): ║ ║ f6 ec 4c 21 fb 49 dc 8a f7 c3 4b e0 04 16 12 ac ║ ║ ║ ║ Entropy: 35-38% (low variance) ║ ║ Purpose: Authentication/License tokens ║ ║ ║ ║ Status: 🔒 Requires server private key ║ ║ ║ ╚═════════════════════════════════════════════════════════╝ │ │ (Needs RSA private key) ▼ ┌──────────────────────────────────────┐ │ Function Call (if available): │ │ ┌──────────────────────────────┐ │ │ │ com.andyhax.Crypt.rsaDecrypt(│ │ │ │ encrypted: 128 bytes │ │ │ │ ) │ │ │ └──────────────────────────────┘ │ └──────────┬───────────────────────────┘ │ │ RSA decryption (if happens) ▼ ┌──────────────────────────────────────┐ │ Decrypted Token/Data │ │ (Unknown format - need Frida) │ └──────────┬───────────────────────────┘ │ │ App uses token for: ▼ ┌──────────────────────────────────────┐ │ • Authentication │ │ • License validation │ │ • Session management │ │ • Content access control │ └──────────────────────────────────────┘ ═══════════════════════════════════════════════════════════════════════════════ 🔑 KEYS DISCOVERED: ═══════════════════════════════════════════════════════════════════════════════ Static Analysis (libhax.so): ┌─────────────────────────────────────────────────────────┐ │ Offset: 0x00017e90 │ │ Key 1: EsySxALGhVMgDldp (16 bytes) │ │ │ │ Offset: 0x0002d570 │ │ Key 2: Al4mK7AwxtYS1yC7 (16 bytes) ✅ ACTIVE │ └─────────────────────────────────────────────────────────┘ Dynamic Analysis (Frida): ┌─────────────────────────────────────────────────────────┐ │ Runtime Key: zVhdXOltYkluLqYx (16 bytes) ✅ │ │ Runtime IV: CzOHfCErMZxJYXdb (16 bytes) │ │ │ │ Device Key: 229572 │ └─────────────────────────────────────────────────────────┘ ═══════════════════════════════════════════════════════════════════════════════ 📊 DATA FLOW STATISTICS: ═══════════════════════════════════════════════════════════════════════════════ API Response: ┌───────────────────────────────────────┐ │ Items: 58 │ │ Item size: ~200 chars │ │ Total size: ~11,600 chars │ │ Format: Base64 │ └───────────────────────────────────────┘ │ │ AES Decrypt ▼ ┌───────────────────────────────────────┐ │ Success rate: 100% (58/58) │ │ Item size: 172 chars │ │ Total size: ~9,976 chars │ │ Binary size: 128 bytes per item │ └───────────────────────────────────────┘ │ │ Base64 Decode ▼ ┌───────────────────────────────────────┐ │ Total binary: 7,424 bytes │ │ Type: RSA-1024 tokens │ │ Status: 🔒 Encrypted │ └───────────────────────────────────────┘ ═══════════════════════════════════════════════════════════════════════════════ 🔬 FRIDA INTERCEPTION POINTS: ═══════════════════════════════════════════════════════════════════════════════ ① Hook aesDecrypt(): ┌─────────────────────────────────────────────────────────┐ │ Capture: │ │ • Input (encrypted Base64) │ │ • Key (Al4mK7AwxtYS1yC7) │ │ • IV (from data or CzOHfCErMZxJYXdb) │ │ • Output (172 chars Base64) │ │ │ │ Status: ✅ Working (frida_simple.js) │ └─────────────────────────────────────────────────────────┘ ② Hook rsaDecrypt(): ┌─────────────────────────────────────────────────────────┐ │ Capture: │ │ • Input (128 bytes RSA encrypted) │ │ • Output (decrypted token - UNKNOWN FORMAT) │ │ │ │ Status: ✅ Hooked, waiting for call │ └─────────────────────────────────────────────────────────┘ ③ Hook HTTP Requests: ┌─────────────────────────────────────────────────────────┐ │ Capture: │ │ • URL: cp5.uk/api/auth │ │ • Response: Full JSON │ │ │ │ Status: ✅ Working │ └─────────────────────────────────────────────────────────┘ ④ Hook JSON Parser: ┌─────────────────────────────────────────────────────────┐ │ Capture: │ │ • Raw JSON before parsing │ │ • Data extraction │ │ │ │ Status: ✅ Working │ └─────────────────────────────────────────────────────────┘ ⑤ Hook Device Key: ┌─────────────────────────────────────────────────────────┐ │ Capture: │ │ • Device Key: 229572 │ │ │ │ Status: ✅ Captured │ └─────────────────────────────────────────────────────────┘ ═══════════════════════════════════════════════════════════════════════════════ ✅ COMPLETED: ═══════════════════════════════════════════════════════════════════════════════ [✓] API endpoint identified [✓] Response format understood [✓] Layer 1 (AES) fully decrypted (100%) [✓] Encryption keys extracted [✓] Algorithm identified (AES-128-CBC) [✓] Frida scripts working without errors [✓] Device Key captured (229572) [✓] Protocol flow mapped 🔒 REMAINING: ═══════════════════════════════════════════════════════════════════════════════ [ ] Layer 2 (RSA) decryption → Requires server private key → Or: Monitor how app uses tokens after rsaDecrypt() → Or: Bypass RSA entirely and use tokens directly [ ] Complete token usage analysis → What functions receive rsaDecrypt() output? → How are tokens used for authentication? ═══════════════════════════════════════════════════════════════════════════════ 🎯 NEXT STEPS WITH FRIDA: ═══════════════════════════════════════════════════════════════════════════════ 1. Run app with frida_simple.js 2. Perform login/authentication 3. Monitor rsaDecrypt() calls and output 4. Trace token usage after decryption 5. Hook functions that use decrypted tokens 6. Analyze authentication flow ═══════════════════════════════════════════════════════════════════════════════ 💡 START COMMAND: ═══════════════════════════════════════════════════════════════════════════════ frida -U -f com.flextv.livestore -l frida_simple.js --no-pause 2>&1 | tee capture.log ═══════════════════════════════════════════════════════════════════════════════