Voltar ao ranking

Impact-I/reFlutter

Python

Flutter Reverse Engineering Framework

bugbountymobile-securityreverse-engineeringssl-pinning
Crescimento de estrelas
Estrelas
2.7k
Forks
291
Crescimento semanal
Issues
10
2.7k
abr. de 2022set. de 2023fev. de 2025jul. de 2026
ArtefatosPyPIpip install reflutter
README

stars

Read more on the blog: https://swarm.ptsecurity.com/fork-bomb-for-flutter/

This framework helps with Flutter apps reverse engineering using the patched version of the Flutter library which is already compiled and ready for app repacking. This library has snapshot deserialization process modified to allow you perform dynamic analysis in a convenient way.

Key features:

  • socket.cc is patched for traffic monitoring and interception;
  • dart.cc is modified to print classes, functions and some fields;
  • display absolute code offset for functions;
  • contains minor changes for successful compilation;
  • if you would like to implement your own patches, manual Flutter code changes are supported using a specially crafted Dockerfile.

Supported engines

  • Android: arm64, arm32;
  • iOS: arm64;
  • Release: Stable, Beta

Install

# Linux, Windows, MacOS
pip3 install reflutter==0.8.6

Usage

impact@f:~$ reflutter main.apk

Please enter your Burp Suite IP: <input_ip>

SnapshotHash: 8ee4ef7a67df9845fba331734198a953
The resulting apk file: ./release.RE.apk
Please sign the apk file

impact@f:~$ reflutter main.ipa

Traffic interception

You need to specify the IP of your Burp Suite Proxy Server located in the same network where the device with the Flutter application is. Then configure the Proxy in BurpSuite -> Listener Proxy -> Options tab:

  • Add port: 8083
  • Bind to address: All interfaces
  • Request handling: Support invisible proxying = True

No certificate installation or root access is required for Android. reFlutter also allows bypassing some of the Flutter certificate pinning implementations.

⚠️ Note: Starting from Flutter version 3.24.0 (snapshot hash: 80a49c7111088100a233b2ae788e1f48), the hardcoded proxy IP and port have been removed. You now need to configure your proxy directly on the device.

On Android

Use ADB to configure the device’s proxy:

adb -s <device> shell "settings put global http_proxy <proxy_ip:port>"

Sign, align, and install the APK. Optionally configure TunProxy to route traffic through Burp Suite.

On iOS

Sign and install the IPA. Configure Potatso to use your Burp Suite proxy server.

Usage on Android

The resulting apk must be aligned and signed. A recommended tool is uber-apk-signer:

java -jar uber-apk-signer.jar --allowResign -a release.RE.apk

Run the app on a device. Determine _kDartIsolateSnapshotInstructions via binary search. reFlutter writes the dump file to the app's root folder and sets 777 permissions. Retrieve it using:

adb -d shell "cat /data/data/<PACKAGE_NAME>/dump.dart" > dump.dart
file contents
Library:'package:anyapp/navigation/DeepLinkImpl.dart' Class: Navigation extends Object {
String* DeepUrl = anyapp://evil.com/ ;
...

Usage on iOS

After running reflutter main.ipa, execute the app on device. The dump file path is printed to Xcode console logs:

Current working dir: /private/var/mobile/Containers/Data/Application/<UUID>/dump.dart

Retrieve the file from the device.

Frida

frida-tools==13.7.1
frida==16.7.19

Use dump offsets in the Frida script:

frida -U -f <package> -l frida.js

To find _kDartIsolateSnapshotInstructions:

readelf -Ws libapp.so

Look for the Value field.

To Do

  • Display absolute code offset for functions;
  • Extract more strings and fields;
  • Add socket patch;
  • Extend engine support to Debug using Fork and Github Actions;
  • Improve detection of App.framework and libapp.so inside zip archive

Build Engine

Engines are built using GitHub Actions based on data in enginehash.csv. Snapshot hash is retrieved from:

https://storage.googleapis.com/flutter_infra_release/flutter/<hash>/android-arm64-release/linux-x64.zip
release

gif

Custom Build

Manual Flutter code patching is supported using Docker:

git clone https://github.com/Impact-I/reFlutter && cd reFlutter
docker build -t reflutter -f Dockerfile .

Run with:

docker run -it -v "$(pwd):/t" -e HASH_PATCH=<Snapshot_Hash> -e COMMIT=<Engine_commit> reflutter

Example:

docker run -it -v "$(pwd):/t" -e HASH_PATCH=aa64af18e7d086041ac127cc4bc50c5e -e COMMIT=d44b5a94c976fbb65815374f61ab5392a220b084 reflutter

Example: Build Android ARM64 (Linux/Windows)

docker run -e WAIT=300 -e x64=0 -e arm=0 -e HASH_PATCH=<Snapshot_Hash> -e COMMIT=<Engine_commit> --rm -iv${PWD}:/t reflutter

Flags:

  • -e x64=0: disables x64 build
  • -e arm64=0: disables arm64 build
  • -e arm=0: disables arm32 build
  • -e WAIT=300: time in seconds to modify source before build
  • -e HASH_PATCH: snapshot hash from enginehash.csv
  • -e COMMIT: engine commit hash

Repositórios relacionados
swisskyrepo/PayloadsAllTheThings

A list of useful payloads and bypass for Web Application Security and Pentest/CTF

PythonPyPIMIT Licensepentestpayload
swisskyrepo.github.io/PayloadsAllTheThings/
79.3k17.2k
maurosoria/dirsearch

Web path scanner

PythonPyPIfuzzerfuzzing
14.5k2.4k
projectdiscovery/subfinder

Fast passive subdomain enumeration tool.

GoGo ModulesMIT Licensesubdomain-enumerationosint
projectdiscovery.io
14k1.6k
projectdiscovery/nuclei-templates

Community curated list of templates for the nuclei engine to find security vulnerabilities.

JavaScriptnpmMIT Licensenuclei-templatesnuclei
github.com/projectdiscovery/nuclei
12.7k3.6k
nahamsec/Resources-for-Beginner-Bug-Bounty-Hunters

A list of resources for those interested in getting started in bug bounties

bug-bounty-huntershackers
12.1k2.1k
dstotijn/hetty

An HTTP toolkit for security research.

GoGo ModulesMIT Licensemitmproxy
hetty.xyz
11.9k770
edoardottt/awesome-hacker-search-engines

A curated list of awesome search engines useful during Penetration testing, Vulnerability assessments, Red/Blue Team operations, Bug Bounty and more

ShellMIT Licenseawesomeawesome-list
awesome-hacker-search-engines.com
10.9k1k
blacklanternsecurity/bbot

The recursive internet scanner for hackers. 🧡

PythonPyPIGNU Affero General Public License v3.0hackingneo4j
blacklanternsecurity.com/bbot/
10.2k889
projectdiscovery/httpx

httpx is a fast and multi-purpose HTTP toolkit that allows running multiple probes using the retryablehttp library.

GoGo ModulesMIT Licensehttpbugbounty
docs.projectdiscovery.io/tools/httpx
10.2k1.1k
shmilylty/OneForAll

OneForAll是一款功能强大的子域收集工具

PythonPyPIGNU General Public License v3.0subdomainsubdomain-scanner
9.9k1.4k
OWASP/wstg

The Web Security Testing Guide is a comprehensive Open Source guide to testing the security of web applications and web services.

Creative Commons Attribution Share Alike 4.0 Internationalbest-practicesguide
owasp.org/www-project-web-security-testing-guide/
9.6k1.6k
yogeshojha/rengine

reNgine is an automated reconnaissance framework for web applications with a focus on highly configurable streamlined recon process via Engines, recon data correlation and organization, continuous monitoring, backed by a database, and simple yet intuitive User Interface. reNgine makes it easy for penetration testers to gather reconnaissance with minimal configuration and with the help of reNgine's correlation, it just makes recon effortless.

HTMLGNU General Public License v3.0security-toolsosint
yogeshojha.github.io/rengine/
8.7k1.3k