flutter
できること
このガイドは、ロジックが事前にネイティブライブラリへコンパイルされるFlutterアプリの分析を扱います。自社アプリのネットワーク保護を確認する必要がある開発者とテスター向けです。
使う場面
- ✓FlutterアプリのJavaやObjective-Cのラッパーに、ロジックがほとんど見えないとき。
- ✓テストで、Flutterアプリの証明書ピン留めを回避できるかをチームが確認したいとき。
- ✓許可されたレビューで、Flutterのビルドに埋め込まれたURLや設定を読む必要があるとき。
スキルのリンク
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/mobile/flutter/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私たちのFlutterアプリには証明書ピン留めがあります。許可されたテストで、自社ビルドに対して有効か確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはFlutterのビルドを特定し、埋め込まれたアドレスや設定がないかネイティブライブラリをレビューします。アプリ自身のネットワーク通信でピン留めが強制されているかをテストします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Flutter App Reversing Playbook
Flutter compiles Dart AOT to a native shared library (
libapp.so/Flutter.framework).jadx/apktoolshow only the thin Java/ObjC shell and are useless for app logic. Use this playbook when static Android or iOS skills yield nothing but an empty Java wrapper.
Prerequisites
- APK / IPA obtained (see
mobile/android/SKILL.mdPath 1 for APK pull). - Tools:
reflutter(pip install reflutter),uber-apk-signer(download JAR from GitHub releases),adb+ device or emulator,jadx(identification only), Burp Suite proxy. - For iOS:
reFlutteralso patchesFlutter.framework; useobjection patchipaor direct framework patching workflow.
Step 1: Identify a Flutter App
# Unzip APK, look for the telltale Flutter artifacts
unzip -o base.apk -d /tmp/apk-out/
ls /tmp/apk-out/lib/arm64-v8a/
# Flutter app: libflutter.so libapp.so
# Present: flutter_assets/ kernel_blob.bin (optional, debug)
# jadx shows only the Java bootstrap:
jadx -d /tmp/apk-java /tmp/base.apk
# Expect: ~1 class, LoadLibrary("app"), nothing useful
# Confirm with strings:
strings /tmp/apk-out/lib/arm64-v8a/libflutter.so | grep -i "flutter"
strings /tmp/apk-out/lib/arm64-v8a/libapp.so | grep -E "https?://"
Key tell: libapp.so size > 5 MB with no dex business logic; the
kernel_blob.bin in flutter_assets/ indicates a debug/JIT build
(rare in production; can extract Dart directly with dart_vm).
Step 2: reFlutter Workflow — Patch BoringSSL Pinning
reFlutter patches the ssl_crypto_x509_session_verify_cert_chain
function in libflutter.so to always return true, bypassing all
BoringSSL-based certificate validation (covers both custom pinning
and system trust).
Flutter <= 3.23.x (hardcoded proxy IP)
# Patch: supply your Burp listener IP
reflutter base.apk
# reFlutter prompts for IP — enter your Burp machine IP (e.g. 192.168.1.100)
# Output: release.RE.apk (patched, unsigned)
# Sign with uber-apk-signer
java -jar uber-apk-signer.jar --allowResign -a release.RE.apk -o /tmp/
# Install on device
adb install /tmp/release.RE-aligned-signed.apk
# Configure Burp proxy listener on 0.0.0.0:8083 (reFlutter default port is 8083)
# Launch app — HTTPS traffic appears in Burp
Flutter >= 3.24.0 (no hardcoded proxy IP — breaking change)
Starting Flutter 3.24.0 (August 2024), the hardcoded proxy IP was removed from the patched BoringSSL stub. Traffic is no longer redirected to a fixed IP. Two options:
Option A: Device-level proxy
# Patch as above (no IP prompt in 3.24+)
reflutter base.apk
java -jar uber-apk-signer.jar --allowResign -a release.RE.apk -o /tmp/
# Install and configure device proxy manually:
# Android Settings → Wi-Fi → [SSID] → Proxy → Manual
# Host: <Burp-IP> Port: 8080
# Or use TunProxy for non-proxy-aware processes:
adb install TunProxy.apk
# Launch TunProxy, set server to <Burp-IP>:8080, toggle VPN
# Then launch patched app
Option B: Per-app proxy injection via Frida
# Run patched APK + Frida script to redirect all socket connections
frida -U -f com.target.app -l proxy-redirect.js --no-pause
# proxy-redirect.js: hooks connect() syscall, redirects to Burp IP
iOS Flutter.framework patching
# Extract IPA
unzip target.ipa -d /tmp/ipa-out/
# Locate Flutter.framework
ls /tmp/ipa-out/Payload/TargetApp.app/Frameworks/Flutter.framework/Flutter
# reFlutter iOS (experimental — check reFlutter README for current support)
reflutter target.ipa
# Sign with codesign + adhoc or with valid mobileprovision
codesign --force --sign - /tmp/ipa-out/Payload/TargetApp.app/Frameworks/Flutter.framework/Flutter
# Repack + install with ios-deploy or Sideloadly
Step 3: BoringSSL Bypass Mechanism
reFlutter patches ssl_crypto_x509_session_verify_cert_chain to
unconditionally return 1 (success). This function is the central
chain verification entry point in BoringSSL (the TLS library embedded
in libflutter.so) — no root CA, no pinning config, and no custom
validator override this patch because the chain evaluation never runs.
Manual binary patch (if reFlutter fails on a specific version):
# Find the function offset in libflutter.so
r2 -A /tmp/apk-out/lib/arm64-v8a/libflutter.so
# In r2: afl~ssl_crypto_x509
# Or: /c ret in data section near ssl_crypto_x509_session_verify_cert_chain
# Patch: overwrite function prologue with MOV W0, #1 / RET (AArch64)
# MOV W0, 1 = 20 00 80 52
# RET
よくある質問
証明書ピン留めとは何ですか?
アプリが期待される証明書を持つサーバーにだけ接続することを確かめる仕組みです。多くの傍受の試みを防げます。
なぜFlutterのラッパーは役に立たないのですか?
ガイドによると、アプリのロジックはネイティブライブラリにあるため、Javaのラッパーはほとんど何も示さないからです。
誰がこれらの確認を行うべきですか?
自社のFlutterアプリに取り組む開発者とテスターです。
詳細
作者による元の説明
Flutter app reversing and SSL pinning bypass — reFlutter Dart-AOT patching, BoringSSL bypass, libapp.so static analysis in Ghidra/radare2, Dart snapshot dump, and iOS Flutter.framework notes.
人気
- GitHubのスター
- 6.5k
- ランキング
- #14109
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
detector-overview
6.5kエージェントが、スキャナーが指摘したコードを読み、本物のセキュリティバグと誤検知を見分けられるよう支援します。
exploiter-overview
6.5kエージェントが、確認済みの複数のセキュリティ上の弱点を一つのテストの連鎖にまとめ、その影響がどこまで及ぶかを確認できるよう支援します。
llm-redteam-overview
6.5kエージェントが、プロンプトインジェクションからモデルの悪用まで、15の戦術グループの中から適切なAIレッドチーム用ガイドを見つけられるよう支援します。
aatmf-t01-prompt-injection
6.5kプロンプトインジェクションを説明します。隠された指示でAIシステムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
android-clean-architecture
280kエージェントがAndroidプロジェクトを効率よく整理できるようにします。コードを構造化して、保守や新機能の開発をしやすくします。
compose-multiplatform-patterns
280kエージェントがKMPプロジェクトでCompose MultiplatformとJetpack Composeのパターンを使えるようにします。状態管理、ナビゲーション、テーマ設定、パフォーマンスを扱います。
dart-flutter-patterns
280kエージェントがDartとFlutterのアプリ向けのコードを書けるようにします。最新のパターンを使い、堅牢で管理しやすいアプリを作ります。