Diagnoses and configures HTTPS traffic capture for Android and iOS Flutter applications during authorized security testing. Use when capturing Flutter network packets, troubleshooting why Charles/Fiddler/mitmproxy/Burp shows zero Flutter traffic, evaluating mitmproxy --emudhra boundaries, or choosing between VPN/TUN routing, reFlutter repackaging, and Frida BoringSSL hooks.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Flutter Https Capture?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/muyang520-flutter-https-capture)
---
name: flutter-https-capture
description: >-
Diagnoses and configures HTTPS traffic capture for Android and iOS Flutter applications during authorized security testing.
Use when capturing Flutter network packets, troubleshooting why Charles/Fiddler/mitmproxy/Burp shows zero Flutter traffic,
evaluating mitmproxy --emudhra boundaries, or choosing between VPN/TUN routing, reFlutter repackaging, and Frida BoringSSL hooks.
---
# Flutter HTTPS Traffic Capture & Triage SOP
Flutter apps do **not** use the host OS TLS stack (`Conscrypt` on Android / `SecureTransport` on iOS) or system HTTP proxy settings by default. Dart's `HttpClient` compiles its own **BoringSSL** inside `libflutter.so` (`Flutter.framework` on iOS) and connects directly at the socket layer.
Follow this decision tree strictly instead of telling the user to "install a user CA certificate and set Wi-Fi HTTP proxy" (which always fails on standard Flutter apps).
- **Bundled Frida 17 Script**: [frida17_flutter_boringssl_bypass.js](./scripts/frida17_flutter_boringssl_bypass.js)
---
## Step 1: Fix Transport Routing First (Why Zero Packets Appear)
Even before TLS verification happens, Wi-Fi manual HTTP proxy (`http_proxy`) is ignored by Dart `HttpClient` unless explicitly coded by the developer.
1. **Mandatory Transport Layer**: Route traffic at Layer 3/4 so TCP `:443` reaches your MITM listener:
- **Android (No Root)**: Use a local VPN-to-Proxy tool (`ProxyDroid`, `Tun2Socks`, `Clash TUN`, `Reqable VPN mode`, or `HTTP Toolkit` VPN mode) forwarding `:80/:443` to your desktop `mitmproxy` / `Burp`.
- **Android (Root)**: Use `iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination <HOST_IP>:<PORT>`.
- **iOS**: Use `Shadowrocket` / `Surge` / `Stash` TUN rule forwarding target process/domain TCP `:443` to the MITM host.
2. **Verify Transport**: Confirm `ClientHello` TLS handshake errors appear in `mitmproxy` / `Burp` logs. If nothing appears at all, the app is either bypassing the TUN route or using raw UDP/QUIC (`Cronet` / HTTP/3 — block UDP `:443` to force TCP fallback).
---
## Step 2: Select the Lowest-Cost TLS Interception Tier
Evaluate the target environment from **Tier 1 (fastest, zero modification)** to **Tier 3 (Root/Jailbreak dynamic hook)**:
### Tier 1: Zero-Root / Zero-Frida (`mitmproxy --emudhra` Assessment)
Check if `mitmproxy >= 12.3.0` `--emudhra` (`mitmweb --emudhra -p 8888`) applies. **Never claim `--emudhra` is universal**—check all 4 hard boundaries first:
1. **OS CA Blocklist Boundary**: Google/Android revoked and blocklisted the leaked eMudhra intermediate CA in late October 2026 (`2026-10-17` to `2026-10-22` updates). Check both `/apex/com.android.conscrypt/cacerts` (Google Play System Update) and `/system/etc/security/cacerts`, and verify whether the target Flutter build's embedded BoringSSL root bundle predates the revocation.
2. **Custom Root Store / SPKI Pinning (`withTrustedRoots: false`)**: If the app initializes `SecurityContext(withTrustedRoots: false)` and pins its own leaf/CA cert or SPKI hash, any public CA chain (including `--emudhra`) fails TLS verification immediately.
3. **Non-TLS / Custom Binary Framing**: Raw TCP encryption or custom mTLS (`setClientAuthority` / client PKCS#12 cert) will reject the handshake without the client certificate.
4. **Missing TUN Routing**: Running `mitmweb --emudhra` with only Android Wi-Fi manual proxy still captures zero Flutter packets—always pair with TUN/VPN forwarding.
### Tier 2: Non-Root Android Repackaging (`reFlutter`)
Use when the device is unrooted **and** the app does not enforce strict server-side APK signature attestation:
1. Run `reflutter target.apk`, select **Traffic monitoring and interception**, and enter your MITM host IP.
2. Sign the output `release.RE.apk` with `apksigner` (enable V1 + V2 + V3 signatures).
3. **Check Failure Mode**: If the app crashes on launch or returns `401/403` after login, inspect `AndroidManifest.xml` (`android:name` custom `Application` packer) and check for APK Signature V2/V3 verification (`PackageManager.GET_SIGNING_CERTIFICATES` or native `openat("/proc/self/maps")` / base.apk Zip central directory checks). Move to Tier 3 if packed.
### Tier 3: Root / Jailbreak Dynamic BoringSSL Hook (Frida)
Use when the app is packed, enforces APK/IPA signature checks, or uses custom certificate pinning inside `libflutter.so` / `Flutter.framework`:
1. **Do NOT hardcode version-specific offsets** across unknown Flutter builds—locate `ssl_crypto_x509_session_verify_cert_chain` (or `ssl_verify_peer_cert` on older engines) via string cross-references inside `libflutter.so`:
- Anchor strings in BoringSSL `ssl/handshake_client.cc` or `ssl/ssl_x509.cc`: search `"ssl_client"`, `"tls13_enc.cc"`, or `"handshake_client.cc"`.
- If `ida-pro-mcp` or `GhidraMCP` is connected, resolve XREFs to those strings, walk back to the function prologue (`STP X29, X30, [SP, ...]` or `PACIASP` on ARM64e), and verify a boolean return (`MOV W0, #1; RET`).
2. **Frida 17 Compatible ARM64 Return-True Hook Template**:
```javascript
// Frida 16 & 17 compatible (uses NativePointer methods, NOT deprecated Memory.*)
function hookFlutterVerify(moduleName, verifyOffset) {
const mod = Process.findModuleByName(moduleName);
if (!mod) {
console.log(`[!] ${moduleName} not loaded yet, waiting for dlopen...`);
return false;
}
const target = mod.base.add(verifyOffset);
console.log(`[+] Hooking ${moduleName}!verify_cert_chain @ ${target}`);
Interceptor.attach(target, {
onLeave(retval) {
console.log(`[*] BoringSSL verify original=${retval.toInt32()} -> forcing 0x1`);
retval.replace(ptr(0x1));
}
});
return true;
}
// Delay hook until libflutter.so is mapped on Android
const LIB = Process.platform === "darwin" ? "Flutter" : "libflutter.so";
if (!hookFlutterVerify(LIB, 0x0 /* replace with IDA/blutter verified offset */)) {
const dlopenPtr = Module.findExportByName(null, "android_dlopen_ext") || Module.findExportByName(null, "dlopen");
Interceptor.attach(dlopenPtr, {
onEnter(args) {
this.path = args[0].isNull() ? "" : args[0].readUtf8String();
},
onLeave() {
if (this.path && this.path.includes("libflutter.so")) {
hookFlutterVerify("libflutter.so", 0x0 /* verified offset */);
}
}
});
}
```
---
## Step 3: Verification Checklist
- [ ] UDP `:443` (QUIC) disabled or blocked if HTTP/3 bypasses TCP MITM.
- [ ] Layer-3 VPN/TUN or `iptables` active (never rely on Wi-Fi proxy settings alone for Flutter).
- [ ] Frida script uses `ptr.readUtf8String()` (Frida 17 safe), never removed `Memory.readUtf8String()`.