{"id":44787394,"url":"https://github.com/theqmaks/phantom-frida","last_synced_at":"2026-04-26T06:01:58.124Z","repository":{"id":338753755,"uuid":"1158752263","full_name":"TheQmaks/phantom-frida","owner":"TheQmaks","description":"Build anti-detection Frida server from source. ~90 patches covering 16 detection vectors, weekly auto-builds with random names.","archived":false,"fork":false,"pushed_at":"2026-03-22T13:05:30.000Z","size":8,"stargazers_count":225,"open_issues_count":0,"forks_count":131,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-23T04:06:47.454Z","etag":null,"topics":["android","anti-detection","frida","frida-server","instrumentation","mobile-security","pentesting","reverse-engineering","security","stealth"],"latest_commit_sha":null,"homepage":"https://www.linkedin.com/in/ant01","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheQmaks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-15T21:27:00.000Z","updated_at":"2026-03-23T03:44:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/TheQmaks/phantom-frida","commit_stats":null,"previous_names":["theqmaks/phantom-frida"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/TheQmaks/phantom-frida","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheQmaks%2Fphantom-frida","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheQmaks%2Fphantom-frida/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheQmaks%2Fphantom-frida/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheQmaks%2Fphantom-frida/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheQmaks","download_url":"https://codeload.github.com/TheQmaks/phantom-frida/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheQmaks%2Fphantom-frida/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31705574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T05:11:36.334Z","status":"ssl_error","status_checked_at":"2026-04-12T05:11:27.332Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","anti-detection","frida","frida-server","instrumentation","mobile-security","pentesting","reverse-engineering","security","stealth"],"created_at":"2026-02-16T10:18:49.678Z","updated_at":"2026-04-12T06:02:12.484Z","avatar_url":"https://github.com/TheQmaks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phantom-frida\n\nBuild anti-detection Frida server from source. Covers 16 detection vectors with ~90 patches.\n\nExtended beyond [ajeossida](https://github.com/hackcatml/ajeossida) with additional stealth techniques: custom port, binary string sweep, internal symbol renaming, temp path obfuscation, and more.\n\n## How it works\n\nPhantom-frida clones Frida source, applies patches in 4 phases (source, targeted, post-build, binary), and compiles a custom server where all identifiable \"frida\" strings, symbols, thread names, and file paths are replaced with a custom name.\n\nStandard Frida client (`pip install frida-tools`) connects to the patched server normally — the client-server protocol is preserved.\n\n## Quick Start\n\n### GitHub Actions (recommended)\n\n1. Fork this repo\n2. Actions \u003e **Build Custom Frida** \u003e Run workflow\n3. Choose version, name, architecture, options\n4. Download artifacts (~8 min with cache, ~35 min cold build)\n\n### Weekly auto-builds\n\nThe **Weekly Stealth Build** workflow runs every Sunday:\n- Detects latest Frida version automatically\n- Generates a random name and port via `namegen.py`\n- Builds with `--extended` for maximum stealth\n- Creates a GitHub Release with binary + `build-info.json`\n\n### Local build (WSL Ubuntu)\n\n```bash\npython3 build.py --version 17.7.2\n\n# Full options:\npython3 build.py --version 17.7.2 --name myserver --port 27142 --extended --verify\n\n# Patch only (inspect changes without compiling):\npython3 build.py --version 17.7.2 --skip-build\n```\n\n### WSL helper script\n\n```bash\nwsl -d Ubuntu bash build-wsl.sh\n\n# With options:\nFRIDA_VERSION=17.7.2 CUSTOM_NAME=myserver CUSTOM_PORT=27142 EXTENDED=1 \\\n  wsl -d Ubuntu bash build-wsl.sh\n```\n\n## Detection Vectors\n\n| # | Vector | Detection method | Base | Extended |\n|---|--------|-----------------|------|----------|\n| 1 | Process name `frida-server` | `/proc/*/cmdline`, `ps` | Renamed | Renamed |\n| 2 | `libfrida-agent.so` in maps | `/proc/self/maps` scan | Renamed | Renamed |\n| 3 | Thread names `gum-js-loop`, `gmain`, `gdbus` | `/proc/self/task/*/comm` | Renamed | Renamed |\n| 4 | memfd name `frida-agent-64.so` | `/proc/self/fd/` readlink | `jit-cache` | `jit-cache` |\n| 5 | `frida_agent_main` symbol | `dlsym` / memory scan | Renamed | Renamed |\n| 6 | SELinux labels `frida_file` | SELinux context check | Renamed | Renamed |\n| 7 | libc hooks (exit, signal) | Hook detection | Disabled | Disabled |\n| 8 | D-Bus service `re.frida.server` | D-Bus introspection | Renamed | Renamed |\n| 9 | Default port 27042 | `connect()` scan | - | `--port N` |\n| 10 | D-Bus interfaces | Protocol inspection | - | Renamed |\n| 11 | Internal C symbols | Memory string scan | - | Renamed |\n| 12 | GType names `FridaServer` | GObject introspection | - | Renamed |\n| 13 | Temp paths `.frida`, `frida-` | Filesystem scan | - | Renamed |\n| 14 | Binary string residuals | Binary `strings` scan | - | Swept |\n| 15 | Build config defines | Memory scan | - | Renamed |\n| 16 | Asset directory `libdir/frida` | Path inspection | - | Renamed |\n\n## Options\n\n```\n--version, -v    Frida version to build (required)\n--name, -n       Custom name replacing 'frida' (default: ajeossida; use random for stealth)\n--arch, -a       Target arch (default: android-arm64)\n--port, -p       Custom listening port (default: 27042)\n--extended, -e   Enable extended anti-detection (vectors 9-16)\n--temp-fixes     Stability fixes (perfetto skip, cloak detach)\n--verify         Scan output for residual 'frida' strings\n--skip-build     Apply patches only, don't compile\n--skip-clone     Use existing source in work-dir\n--ndk-path       Path to existing Android NDK r29\n```\n\n## Deploy\n\n```bash\n# Push to device\nadb push output/myserver-server-17.7.2-android-arm64 /data/local/tmp/myserver-server\nadb shell chmod 755 /data/local/tmp/myserver-server\n\n# Start (default port 27042)\nadb shell /data/local/tmp/myserver-server -D \u0026\nfrida -U -f com.example.app\n\n# Start (custom port)\nadb shell /data/local/tmp/myserver-server -D \u0026\nadb forward tcp:27142 tcp:27142\nfrida -H 127.0.0.1:27142 -f com.example.app\n```\n\nEach weekly release includes a `build-info.json` with the name, port, version, and architecture.\n\n## Build Phases\n\n1. **Source patches**: Global string replacement across the entire Frida source tree. Renames all `frida-agent`, `frida-helper`, `frida-server`, `re.frida.*` references. Rebuilds Android helper DEX with renamed Java package.\n\n2. **Targeted patches**: Specific fixes for build system files (meson.build), memfd names, libc hook disabling, SELinux labels.\n\n3. **Post-build patches**: After first compilation, renames `frida_agent_main` symbol (generated by Vala compiler, only exists in build output). Requires a second incremental build.\n\n4. **Binary patches**: Hex-level replacements in compiled binaries — thread names (`gmain`, `gdbus`, `pool-spawner`), and optional binary string sweep for residual `frida`/`Frida` strings.\n\n## Architecture\n\n```\nbuild.py                Main build script (clone, patch, compile, collect)\npatches.py              All patch definitions (87 patches + 17 rollbacks)\nnamegen.py              Random name/port generator for stealth builds\nbuild-wsl.sh            WSL helper script\ntest_comprehensive.js   Anti-detection + Java bridge verification script\n.github/workflows/\n  build.yml             Manual build workflow\n  scheduled-build.yml   Weekly auto-build with releases\n```\n\n## Requirements\n\n- Ubuntu 22.04+ (WSL works)\n- Python 3.10+\n- Git, curl, unzip, make\n- ~20 GB free disk space\n- Android NDK r29 (auto-downloaded)\n\n## Version Support\n\n| Frida | Status |\n|-------|--------|\n| 17.x | Fully verified against source |\n| 16.x | Compatible (auto-detects API differences) |\n\n## Tested Apps\n\nVerified on arm64 Android 14 device with `--extended`:\n\n| App | Java bridge | Hooks | Anti-detection |\n|-----|-------------|-------|----------------|\n| Telegram | 28,772 classes | SSL+crypto | All clean |\n| Google Play Store | 47,305 classes | Activity hooks | All clean |\n| Facebook | 54,064 classes | Basic hooks | All clean |\n| Magisk | 27,737 classes | Activity hooks | All clean |\n\n## Known Limitations\n\n- **arm32 apps** (Chrome): Frida upstream bug [#2878](https://github.com/frida/frida/issues/2878) — `invalid instruction` in `_patchCode`. Not a phantom-frida issue.\n- **D-Bus interface names** (`re.frida.HostSession17` etc.): Intentionally NOT renamed in base mode. These are the client-server protocol — renaming server-side would break standard `frida` client. Not a detection vector (only visible over USB/TCP channel).\n\n## Credits\n\n- [Frida](https://frida.re/) by Ole Andre Ravnas\n- [ajeossida](https://github.com/hackcatml/ajeossida) by hackcatml — original stealth Frida concept\n- Detection vector research from the Android security community\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheqmaks%2Fphantom-frida","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheqmaks%2Fphantom-frida","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheqmaks%2Fphantom-frida/lists"}