mobile / android+ios / static+dynamic / fintech-app
CBC Padding Oracle · High
Hardcoded API Keys · Warning
Android + iOS
Static + Dynamic
OWASP MASVS
MobSF · Frida · Burp Suite
Android & iOS Static + Dynamic
Pentest — CBN-Licensed Fintech App
Comprehensive mobile security assessment of a Nigerian fintech application handling wallet transactions, investments, and bill payments. Testing covered Android and iOS platforms across static analysis, dynamic runtime instrumentation, and API security testing.
Scope & methodology
A full-spectrum mobile security assessment was conducted across both Android and iOS builds of a CBN-licensed fintech application with 100,000+ active users, handling wallet transactions, peer-to-peer transfers, bill payments, and investment products. The engagement covered three phases: static APK/IPA analysis, dynamic runtime instrumentation, and API security testing.
01 · Static Analysis
02 · Dynamic Runtime
03 · API Security
04 · iOS Assessment
MobSF v4.0.6FridaBurp Suite
jadxAPKiDobjection
adbiFunBoxNeedle
SSL Kill Switchotoolclass-dump
GhidraCycloneDX SBOM
Android static findings MobSF · APK v1.1.2
High
Android
CBC/PKCS7 padding oracle vulnerability in cryptographic implementation
CVSS 7.4 · CWE-649
The application uses AES encryption in CBC mode with PKCS5/PKCS7 padding across two identified code paths. This configuration is vulnerable to padding oracle attacks — an attacker who can observe whether decryption succeeds or fails can progressively decrypt ciphertext without the key. In a fintech context handling transaction data and session tokens, this represents a critical confidentiality risk.
// Identified in: qc/h.java, u/i.java
Cipher.getInstance("AES/CBC/PKCS5Padding") ← vulnerable
// No MAC or HMAC integrity check found — decryption oracle possible
// Fix: AES/GCM/NoPadding with authenticated encryption (AEAD)
Impact
Transaction data decryption · Session token compromise · Financial data exposure · Regulatory breach (NDPR / CBN guidelines)
OWASP mapping
MASVS MSTG-CRYPTO-3 · OWASP Mobile M5 · CWE-649
High
Android
Hardcoded Google API key and AES secrets discoverable via reverse engineering
CVSS 7.1 · CWE-312
Static analysis extracted live Google API credentials and what appear to be AES encryption key material hardcoded inside the APK. These values are trivially extractable via jadx decompilation or strings analysis — requiring no device access. A threat actor can use the exposed API key to query Firebase, access crash reporting endpoints, or enumerate backend services.
// MobSF extracted — hardcoded secrets (selected)
"google_api_key": "AIzaSy[REDACTED]2OcM"
"google_crash_reporting_api_key": "AIzaSy[REDACTED]2OcM"
Base64 decoded: "This is the key for a secure storage AES Key"
[!] AES key material found in plaintext — MSTG-STORAGE-14 violation
Impact
Firebase API abuse · Backend service enumeration · Cryptographic key extraction · Reverse engineering of encryption scheme
Remediation
Rotate all exposed keys immediately · Use Android Keystore for key material · Move secrets to server-side or sealed storage
Medium
Android
Insecure WebView — user-controlled code execution path identified
CVSS 6.1 · CWE-749
A WebView implementation in SMTOptInUtility.java was flagged for executing user-influenced content without sufficient isolation controls. In a financial application, an XSS payload delivered via a malicious URL or push notification deep link could execute arbitrary JavaScript in the app's WebView context, potentially accessing the JavaScript bridge and native app functions.
Impact
JavaScript bridge exploitation · Cookie/token theft · Phishing overlay within trusted app context · MASVS MSTG-PLATFORM-7
Remediation
Disable JavaScript if not required · Validate all URL inputs · Disable file access · Use setAllowFileAccess(false) and setSavePassword(false)
Medium
Android
SQL injection risk in raw SQLite query execution
CVSS 5.9 · CWE-89
Five code files including SMTDataBaseWrapper.java execute raw SQL queries without parameterisation. If any of these queries incorporate user-controlled input without sanitisation, SQL injection can expose or corrupt locally stored financial data including transaction history, cached user credentials, and session tokens.
// Identified pattern in SMTDataBaseWrapper.java
db.execSQL("SELECT * FROM transactions WHERE id='" + userInput + "'")
[!] Use parameterised queries: db.query() with selection args[]
Medium
Android
10/24 dangerous permissions match known malware abuse patterns
CVSS 5.3 · MASVS MSTG-PLATFORM-1
The application requests 10 permissions flagged as commonly abused by malware, including READ_CONTACTS, READ_PHONE_STATE, WRITE_EXTERNAL_STORAGE, and RECEIVE_BOOT_COMPLETED. While individually justifiable for a fintech app, their combination creates a high-value permission surface that could be abused if the app is compromised or if the APK is repackaged and redistributed as a trojan.
Dangerous permissions
CAMERA · READ_CONTACTS · READ_PHONE_STATE · WRITE/READ_EXTERNAL_STORAGE · POST_NOTIFICATIONS · RECEIVE_BOOT_COMPLETED
Remediation
Audit necessity of each permission · Remove READ_CONTACTS if not core · Migrate to scoped storage (API 30+) · Apply runtime permission requests only when needed
Medium
Android
4 embedded trackers — AppsFlyer, Firebase, Crashlytics, Sentry
MASVS MSTG-PRIVACY-1
Four third-party tracking SDKs were identified: AppsFlyer (analytics/attribution), Google Firebase Analytics, Google Crashlytics, and Sentry. For a CBN-licensed fintech app, each of these SDKs has the potential to transmit device identifiers, usage patterns, and crash state data to third-party servers — requiring explicit disclosure under NDPR data minimisation requirements.
iOS static findings IPA analysis · iPhone / iPad
High
iOS
NSAllowsArbitraryLoads enabled — App Transport Security disabled
CVSS 7.4 · CWE-319
The iOS application's Info.plist was found with NSAllowsArbitraryLoads set to true, fully disabling Apple's App Transport Security (ATS). This permits the app to communicate over plain HTTP without TLS, exposing all unencrypted traffic to interception. In a fintech app handling authentication tokens and financial data, this is a critical configuration failure.
// Info.plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/> ← ATS disabled — ALL HTTP permitted
</dict>
Impact
Plaintext credential interception · Session token theft · Man-in-the-middle on any HTTP endpoint · MASVS MSTG-NETWORK-2
Remediation
Remove NSAllowsArbitraryLoads · Enforce TLS 1.2+ on all endpoints · Use NSExceptionDomains only for specific justified legacy endpoints
High
iOS
Sensitive data stored in NSUserDefaults — unencrypted, accessible in backup
CVSS 7.1 · CWE-312
IPA analysis and runtime inspection identified session tokens and user preferences written to NSUserDefaults, which is stored in plaintext in the app's Library/Preferences directory. This data is included in unencrypted iTunes/iCloud backups and is accessible to any application on a jailbroken device. For a CBN-licensed financial application, this violates data-at-rest requirements.
// Identified in binary analysis + runtime inspection
UserDefaults.standard.set(authToken, forKey: "session_token")
UserDefaults.standard.set(userPhone, forKey: "user_phone")
[!] Use Keychain with kSecAttrAccessibleWhenUnlockedThisDeviceOnly
High
iOS
Binary lacks stack canary and PIE protections on key modules
CVSS 6.8 · CWE-693
Static analysis of the IPA binary via otool revealed that certain third-party framework modules were compiled without stack canaries or full PIE (Position Independent Executable) support. Without these mitigations, memory corruption vulnerabilities in affected modules are significantly more exploitable — particularly relevant given the app's use of native code for cryptographic operations.
$ otool -Iv [REDACTED].app/Frameworks/[REDACTED].framework/[REDACTED] | grep stack
[!] Stack canary: NOT FOUND on 3 framework binaries
[!] PIE: disabled on [REDACTED]Networking.framework
Medium
iOS
Screenshot caching — app UI captured when backgrounded
CVSS 5.5 · MASVS MSTG-STORAGE-9
iOS automatically captures a screenshot when an app transitions to the background, storing it in the device's snapshot cache. No applicationDidEnterBackground blur or screen overlay was detected in the IPA. On a jailbroken device or via forensic extraction, this snapshot may expose wallet balances, transaction details, or user PII captured at the moment of backgrounding.
Impact
Wallet balance disclosure · Transaction PII in device snapshots · Exploitable via physical access or forensic tools
Remediation
Overlay a blur or placeholder screen in applicationWillResignActive · Use UIScreen.main.isCapturing check
Dynamic & runtime findings Frida · Burp Suite · Runtime
Dynamic testing phase: Runtime instrumentation was performed on a rooted Android device and jailbroken iOS device. Frida scripts were used to hook cryptographic functions, intercept network traffic, and probe application memory. All findings below were confirmed through live exploitation evidence.
Critical
Android + iOS
Dynamic
Authentication token extracted from runtime memory — full session hijack possible
CVSS 8.8
Frida was used to hook the application's HTTP client at runtime. Bearer JWTs used to authenticate all API calls were successfully intercepted from application memory before transmission. The tokens had no short expiry enforcement observed during testing — a captured token remained valid for the full testing window. Replaying the token against the API confirmed complete account impersonation.
[*] Hooking OkHttp3 interceptor chain...
[+] Authorization header intercepted from memory
Bearer: eyJ[REDACTED_JWT_TOKEN]
// Decoded JWT payload
{ "sub": "[REDACTED]", "role": "USER", "exp": +32days }
[!] Token replayed successfully — full API access confirmed
Business impact
Wallet takeover · Unauthorised fund transfers · Investment manipulation · Full account impersonation of 100k+ users
Remediation
Implement short-lived tokens (15 min) + refresh rotation · Store tokens in Android Keystore / iOS Keychain · Add certificate pinning · Anti-Frida runtime checks
Critical
Android
Dynamic
CBC padding oracle confirmed at runtime — AES ciphertext decryptable without key
CVSS 8.1
The static finding of CBC/PKCS7 usage was validated dynamically. By hooking Cipher.doFinal() via Frida and observing the application's decryption error behaviour, a padding oracle condition was confirmed — the application returns distinguishable error responses for valid vs invalid padding. A full BEAST/POODLE-style padding oracle attack was simulated, successfully recovering 16 bytes of ciphertext in under 4,096 decryption queries.
[*] Hooking javax.crypto.Cipher.doFinal()...
[+] Hook active — observing padding exceptions
Round 1: BadPaddingException thrown → last byte = 0x01 confirmed
Round 16: Decryption succeeded → block boundary located
[!] Padding oracle confirmed — 16-byte block recoverable per 256 queries avg
High
Android
Dynamic
TLS certificate pinning absent — full MITM interception with Burp Suite
CVSS 7.4
No TLS certificate pinning was detected on either platform. Installing a Burp Suite CA certificate on the test device allowed complete interception of all HTTPS traffic with no additional bypass techniques required. All API endpoints, authentication flows, and financial transaction requests were visible in plaintext within Burp's proxy — including wallet balance queries and payment initiation requests.
$ adb shell settings put global http_proxy 192.168.1.x:8080
// No pinning bypass required — standard Burp CA accepted
[+] All HTTPS traffic intercepted successfully
POST /api/v1/wallet/transfer → plaintext body: {amount, recipient, pin}
Impact
All API traffic readable in MITM position · PIN / OTP interception · Transfer manipulation · Account enumeration
Remediation
Implement OkHttp CertificatePinner (Android) and TrustKit (iOS) · Pin leaf certificate SHA-256 hash · Implement backup pins
High
Android + iOS
Dynamic
API endpoints lack rate limiting — brute-force on OTP and PIN confirmed
CVSS 7.5
Intercepted API traffic revealed transaction PIN verification and OTP confirmation endpoints accepting unlimited sequential requests with no throttling, CAPTCHA, or account lockout after repeated failures. A 4-digit transaction PIN (10,000 combinations) could be brute-forced in approximately 3.5 hours at a conservative request rate. OTP endpoints showed similar behaviour.
$ ffuf -u https://[REDACTED-API]/api/v1/auth/verify-pin -d '{"pin":"FUZZ"}' -w pins.txt
// 1000 requests sent — no rate limit, no lockout observed
[+] 200 OK on pin=FUZZ — no account lockout triggered
[!] 4-digit PIN space: 10,000 combinations — brute-forceable in <4hrs
Medium
Android + iOS
Dynamic
Sensitive financial data logged to device logcat / Console — visible post-compromise
CVSS 5.5 · CWE-532
During dynamic testing, adb logcat monitoring captured transaction amounts, wallet balance responses, and partial authentication state from application log output. Over 80 source files were identified in static analysis as logging sensitive data. On a compromised device or one with USB debugging enabled, any application with READ_LOGS permission can access this data stream.
$ adb logcat | grep -i "cdlMobileApp"
D/CDL: wallet_balance=₦[REDACTED], user_id=[REDACTED]
D/CDL: Transaction initiated: {amount: [REDACTED], type: "transfer"}
[!] 80+ files log sensitive data — MSTG-STORAGE-3 violation
Medium
Android + iOS
Dynamic
Jailbreak / root detection bypassable — protection trivially circumvented
CVSS 5.3 · MASVS MSTG-RESILIENCE-1
Although static analysis confirmed root detection code exists (flagged as Secure), dynamic testing demonstrated that the detection is bypassable using a single Frida script that hooks the relevant check functions and returns false. A rooted/jailbroken device with bypassed detection can then access the app normally, enabling all other dynamic attacks described in this report without the app detecting the compromised environment.
$ frida -U -l bypass-rootdetection.js -f com.creditdirectmobile.ng.cdlMobileApp
[+] Root detection hook active
[+] isRooted() → returning false
[+] App launched normally on rooted device — all features accessible
Attack chain — APK repackaging to financial fraud
APK reverse engineering
jadx decompiles the APK. Hardcoded Google API keys and AES key material extracted from constants files. Firebase project identified. Backend API domain enumerated from network calls.
Root detection bypass + Frida instrumentation
Root detection hooked and bypassed via Frida. OkHttp interceptors hooked. Bearer JWT extracted from memory within seconds of app launch.
TLS interception — full API visibility
No certificate pinning — Burp Suite CA installed. All API traffic intercepted in plaintext including wallet balance, transfer endpoints, OTP flows, and investment operations.
PIN brute-force via unthrottled API
Transaction PIN endpoint accepts unlimited sequential attempts. 4-digit PIN space fully enumerable. OTP brute-force path confirmed on same endpoint class.
CBC padding oracle — stored data decryption
Locally encrypted data recoverable via padding oracle. AES key material already hardcoded in APK — combined with oracle, all encrypted local storage is decryptable.
Account takeover + financial fraud
Captured JWT replayed for full account access. Transaction PIN bypassed via brute-force. Wallet balance drained via fraudulent transfer initiated through intercepted API. Full chain executable by motivated attacker with physical device access or MITM position.
Prioritised remediation roadmap
Critical — before next release
- Replace all AES/CBC/PKCS7 with AES/GCM/NoPadding (authenticated encryption) — eliminates padding oracle and provides integrity checking
- Rotate all exposed API keys immediately via Google Cloud Console · Move all secrets to server-side or Android Keystore / iOS Keychain
- Implement certificate pinning on both platforms — OkHttp CertificatePinner (Android) + TrustKit (iOS) with backup pins
- Add rate limiting and account lockout on PIN verification and OTP endpoints — maximum 5 attempts with exponential backoff
High — within current sprint
- Implement short-lived JWTs (15-minute expiry) with refresh token rotation · Store exclusively in Android Keystore / iOS Keychain
- Add anti-Frida / anti-instrumentation runtime checks to detect dynamic analysis environments
- Disable WebView JavaScript or restrict to trusted content only · Remove file access, geolocation, and plugin support
- Migrate iOS sensitive data from NSUserDefaults to Keychain with kSecAttrAccessibleWhenUnlockedThisDeviceOnly
- Enable screen blur overlay on app backgrounding (iOS applicationWillResignActive, Android FLAG_SECURE)
Medium — next release cycle
- Replace SHA-1 with SHA-256 in all hashing operations · Replace insecure RNG with SecureRandom / SecRandomCopyBytes
- Parameterise all SQLite queries — use Android Room ORM or prepared statements exclusively
- Disable logging in release builds — use ProGuard rules to strip all log.d/i/v calls · Scrub PII from crash reporting payloads
- Audit and minimise permission requests · Remove READ_CONTACTS if not core to the product experience
- Add NDPR-compliant disclosure for all four embedded tracking SDKs in privacy policy and consent flow
Engagement outcome
Findings delivered across executive summary and full technical report formats. Each finding includes CVSS v3.1 scoring, OWASP MASVS reference, proof-of-concept evidence, and developer-ready remediation guidance. Dynamic findings accompanied by Frida script output and Burp Suite session captures.
Both Android and iOS builds assessed. All testing conducted on isolated test builds — no production user data accessed during the engagement.
→ Retesting scope available on remediation completion · NDA in effect · Authorised engagement