Reverse Engineering Toolkit for Mobile APIs — 14 tools for the full RE pipeline
Project description
rekit
Reverse Engineering Toolkit for Mobile APIs.
14 focused tools for the mobile API reverse engineering pipeline: capture traffic, map endpoints, test fingerprints, detect bot protection, compare schemas, generate clients, mock servers, analyze tokens, map auth flows, decode protobuf, scan JS bundles, probe rate limits, bypass cert pinning, and fingerprint HTTP/2.
Why rekit?
Reverse engineering mobile APIs is a multi-step process with lots of manual work between each step. Existing tools (mitmproxy, jadx, frida) are great at individual steps but nothing connects the pipeline. rekit fills the gaps:
- No more manual HAR-to-client translation —
hargengenerates typed Python clients automatically - No more proxy/cert pinning headaches —
apktaphooks at the app layer, above TLS;certpatchgenerates targeted bypass scripts - No more grepping through 40K decompiled files —
apkmapandjsbundlefind the API surface for you - No more guessing why you're getting 403s —
ja3probe,botwall, andheaderprinttell you exactly what's blocking you - No more hand-mapping 25 different response schemas —
schemadiffbuilds the unified model - No more copy-pasting JWTs into jwt.io —
tokendumpdecodes every token in your traffic - No more manually figuring out auth flows —
authmapmaps OAuth2, session cookies, API keys, and generates auth modules - No more hitting live APIs during development —
mockapireplays captured traffic as a local server - No more binary protobuf gibberish —
protorevdecodes and infers schemas from gRPC traffic - No more guessing rate limits —
ratelimfinds the exact threshold
Tools
Core Pipeline
| Tool | What it does | Input | Output |
|---|---|---|---|
| hargen | Generate typed Python API client from captured traffic | HAR / mitmproxy dump | Python client + dataclasses |
| apktap | Hook into Android app HTTP layer via Frida | Package name | HAR file |
| apkmap | Scan decompiled APK for API endpoints and auth | APK or decompiled source | Endpoint map (table/JSON) |
| schemadiff | Compare API response schemas across sources | JSON files | Unified model + diff table |
Security & Fingerprinting
| Tool | What it does | Input | Output |
|---|---|---|---|
| ja3probe | Test which TLS fingerprints a target accepts | URL | Accept/reject matrix |
| botwall | Identify bot protection system and difficulty | URL | Detection report |
| headerprint | Analyze HTTP/2 and header-order fingerprints | HAR file | Fingerprint match + anomalies |
| certpatch | Scan for cert pinning, generate Frida bypass | Decompiled source | Bypass script + config |
Traffic Analysis
| Tool | What it does | Input | Output |
|---|---|---|---|
| tokendump | Extract and decode all auth tokens (JWT, OAuth, etc.) | HAR file | Token report + decoded JWTs |
| authmap | Map authentication flows, generate auth modules | HAR file | Flow diagram + Python auth code |
| mockapi | Replay captured traffic as a local mock server | HAR file | Running HTTP server |
| ratelim | Probe rate limits with binary search | URL | Limits table + safe RPS |
App Analysis
| Tool | What it does | Input | Output |
|---|---|---|---|
| jsbundle | Scan React Native / JS bundles for API endpoints | APK / IPA / bundle | Endpoints + secrets + GraphQL |
| protorev | Decode protobuf/gRPC, infer .proto schemas | HAR file / raw bytes | Decoded messages + .proto file |
Install
# From source
git clone https://github.com/b-erdem/rekit.git
cd rekit
pip install -e .
# With TLS fingerprint testing
pip install -e ".[tls]"
# With Frida hooking
pip install -e ".[frida]"
# Everything
pip install -e ".[all]"
Quick Start
Detect bot protection
$ rekit botwall detect https://www.example.com
╭──────────────── Cloudflare (Under Attack Mode) ────────────────╮
│ Confidence: 100% Difficulty: IMPRACTICAL │
│ │
│ Evidence: │
│ - cf-ray header present │
│ - server header is 'cloudflare' │
│ - cf-mitigated header (challenge) │
│ - __cf_bm cookie (Bot Management) │
│ │
│ Bypass hints: │
│ - Requires solving Cloudflare JS challenge or Turnstile. │
│ - Use curl_cffi with chrome impersonation for TLS. │
╰────────────────────────────────────────────────────────────────╯
Test TLS fingerprints
$ rekit ja3probe probe https://api.example.com
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━┓
┃ Profile ┃ Status ┃ HTTP ┃ Time (ms) ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━┩
│ chrome_120 │ ACCEPTED │ 200 │ 45 │
│ safari_15_5 │ ACCEPTED │ 200 │ 38 │
│ firefox_133 │ CHALLENGE │ 403 │ 42 │
│ python_req │ REJECTED │ 403 │ 29 │
└──────────────┴───────────┴──────┴───────────┘
3/26 accepted. Protection: Akamai. Recommended: chrome_120
Generate API client from captured traffic
$ rekit hargen generate traffic.har -o ./client/ --name MyApiClient
Generated: client.py (3 endpoints), models.py (8 dataclasses)
Run a mock server from captured traffic
$ rekit mockapi serve traffic.har --port 8080
Mock server running on http://127.0.0.1:8080
Endpoints:
GET /api/v1/users (3 responses)
POST /api/v1/users (1 response)
GET /api/v1/users/{id} (5 responses)
Extract and decode tokens
$ rekit tokendump extract traffic.har
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Type ┃ Source ┃ Value ┃ Expires ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ JWT │ Bearer │ eyJhbGci...kpXV │ 2h from now │
│ OAUTH_REFRESH │ body │ dGhpcyBp...c2Vj │ 30 days │
│ SESSION_COOKIE │ cookie │ sess_abc...xyz9 │ session │
└────────────────┴─────────┴──────────────────────────┴─────────────┘
Map authentication flows
$ rekit authmap detect traffic.har
OAuth2 Authorization Code + PKCE
1. POST /oauth/authorize → redirect with code
2. POST /oauth/token (code + code_verifier) → access_token + refresh_token
3. GET /api/* (Bearer token) × 47 requests
4. 401 → POST /oauth/token (refresh_token) → new access_token
Scan JS bundles from React Native apps
$ rekit jsbundle scan ./app.apk
API Endpoints: 12 found
Hardcoded Secrets: 3 found (use --show-secrets to reveal)
GraphQL Operations: 5 queries, 2 mutations
Decode protobuf traffic
$ rekit protorev extract traffic.har
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ gRPC Method ┃ Fields Found ┃ Type ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━┩
│ /user.UserService/GetUser │ 5 │ gRPC │
│ /feed.FeedService/GetFeed │ 12 │ gRPC │
└────────────────────────────────────┴──────────────┴────────┘
Probe rate limits
$ rekit ratelim probe https://api.example.com/v1/search
Probed 50 requests at 5.0 rps
Successful: 42 Rate-limited: 8 Errors: 0
First 429 at request #43
Rate limit: 100 req/min (from headers)
Cooldown: 60s
Recommended: 1.5 rps with 0.7s jitter
Generate cert pinning bypass
$ rekit certpatch bypass ./decompiled/ -o bypass.js
Detected 3 pinning implementations:
- OkHttp CertificatePinner (api.example.com) → easy bypass
- network_security_config.xml (*.example.com) → easy bypass
- Custom X509TrustManager → medium bypass
Generated: bypass.js (load with: frida -U -f com.example.app -l bypass.js)
The Pipeline
┌─────────┐
│ apktap │──────────────┐
└────┬────┘ │
│ HAR │
v v
┌─────────┐ ┌─────────────────┐ ┌────────────┐
│ apkmap │ │ hargen │ │ mockapi │
│jsbundle │ │ (generate API │ │ (mock srv) │
└────┬────┘ │ client) │ └────────────┘
│ └────────┬────────┘
│ │
v v
┌─────────┐ ┌─────────────────┐ ┌────────────┐
│certpatch│ │ tokendump │ │ ratelim │
│ │ │ authmap │ │ │
└─────────┘ └─────────────────┘ └────────────┘
│
┌──────────────────┼──────────────────┐
v v v
┌─────────┐ ┌─────────────────┐ ┌────────────┐
│ja3probe │ │ schemadiff │ │ protorev │
│ botwall │ │ │ │ │
│headerpr.│ └─────────────────┘ └────────────┘
└─────────┘
- Capture: Use
apktapto hook into the app and capture traffic, or use mitmproxy - Analyze app: Use
apkmap,jsbundle,certpatchto understand the app - Generate: Feed the HAR file to
hargento get a typed Python client - Understand auth: Use
tokendumpandauthmapto map the auth flow - Debug blocks: Use
ja3probe,botwall, andheaderprintwhen requests get blocked - Mock & test: Use
mockapito develop against captured traffic - Normalize: Use
schemadiffwhen building a unified model across multiple APIs - Decode binary: Use
protorevfor protobuf/gRPC APIs - Scale safely: Use
ratelimto find rate limit boundaries
Requirements
- Python 3.9+
curl_cffifor TLS fingerprint testing (pip install curl_cffi)frida-toolsfor app traffic capture (pip install frida-tools)jadxfor APK decompilation (install separately)
Contributing
See CONTRIBUTING.md for development setup and guidelines.
License
MIT — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rekit-0.2.0.tar.gz.
File metadata
- Download URL: rekit-0.2.0.tar.gz
- Upload date:
- Size: 195.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38ac5232d913b2baaf065ea6491f22f08524c338582c9536681d46ee41e0d16c
|
|
| MD5 |
2d0e9bf0c87e6e82a2fa52ecd8ad7dd9
|
|
| BLAKE2b-256 |
94338fe2d18de3ea5add1e03dbf2ad3609c536c608f400f53d1084c3f43a432e
|
Provenance
The following attestation bundles were made for rekit-0.2.0.tar.gz:
Publisher:
publish.yml on b-erdem/rekit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rekit-0.2.0.tar.gz -
Subject digest:
38ac5232d913b2baaf065ea6491f22f08524c338582c9536681d46ee41e0d16c - Sigstore transparency entry: 1247120210
- Sigstore integration time:
-
Permalink:
b-erdem/rekit@7bdfc8c9b7e8f0c62e8fabaf3c67422cb2ede70b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/b-erdem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7bdfc8c9b7e8f0c62e8fabaf3c67422cb2ede70b -
Trigger Event:
release
-
Statement type:
File details
Details for the file rekit-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rekit-0.2.0-py3-none-any.whl
- Upload date:
- Size: 191.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58ac51e5c11a62ff915e95958c68e83309a52084239e17c493e0eb9cab1df4b0
|
|
| MD5 |
6a15df59d971d90e0d3af6f451c3ac49
|
|
| BLAKE2b-256 |
e143f7a0fe552f9cbe91c0b4f24fb9ca4a74efee200cdcf48d774f4f8bef1389
|
Provenance
The following attestation bundles were made for rekit-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on b-erdem/rekit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rekit-0.2.0-py3-none-any.whl -
Subject digest:
58ac51e5c11a62ff915e95958c68e83309a52084239e17c493e0eb9cab1df4b0 - Sigstore transparency entry: 1247120228
- Sigstore integration time:
-
Permalink:
b-erdem/rekit@7bdfc8c9b7e8f0c62e8fabaf3c67422cb2ede70b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/b-erdem
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7bdfc8c9b7e8f0c62e8fabaf3c67422cb2ede70b -
Trigger Event:
release
-
Statement type: