Skip to content
Back to skills

Anti Analysis Bypass

ASecurity

Diagnoses anti-Frida, anti-debugging, Root/Jailbreak detection, emulator checks, and hardware Key Attestation boundaries on Android and iOS during authorized security assessments. Use when attaching Frida or LLDB crashes the app (SIGABRT/SIGSEGV/exit_group), or when apps block rooted/jailbroken test devices.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 1, 2026
developmentrustgojavabashdebuggingbackendsecurity

Works with

  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add muyang520/awesome-mobile-re-mcp-skills --skill anti-analysis-bypass --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Anti Analysis Bypass?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Anti Analysis Bypass
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/muyang520-anti-analysis-bypass/badge)](https://www.skillsdirectory.com/skills/muyang520-anti-analysis-bypass)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: anti-analysis-bypass
description: >-
  Diagnoses anti-Frida, anti-debugging, Root/Jailbreak detection, emulator checks, and hardware Key Attestation boundaries on Android and iOS during authorized security assessments.
  Use when attaching Frida or LLDB crashes the app (SIGABRT/SIGSEGV/exit_group), or when apps block rooted/jailbroken test devices.
---

# Mobile Anti-Analysis, Anti-Frida & Environment Triage SOP

When an authorized test app immediately exits (`Process terminated`) upon Frida spawn or displays `"Unsupported environment / Root detected"`, **never guess blindly or overwrite random libc functions**. Pinpoint the exact detection vector first using non-destructive telemetry.

---

## Step 1: Run the Non-Destructive Diagnostic Probe (3 Seconds)

Before writing any bypass, run the bundled Frida 17 diagnostic probe in spawn mode to see **which module, thread, file path, or property** triggers right before termination:

```bash
frida -U -f com.target.app -l skills/anti-analysis-bypass/scripts/frida17_anti_detect_probe.js
```
Helper script: [frida17_anti_detect_probe.js](./scripts/frida17_anti_detect_probe.js)

Read the last 5 lines printed before exit:
- `[ThreadSpawn] libsec.so!0x1a4c0` -> Dedicated background anti-Frida watchdog thread!
- `[FileCheck] openat("/proc/self/maps") from libsec.so!0x22910` -> Memory map scanning for `frida-agent` / `gum-js-loop` / `rwxp` pages!
- No `openat` log at all before instant `Process terminated` -> **Inline ARM64 `svc #0` syscall** bypassing `libc.so` exports!

---

## Step 2: Android Anti-Frida & Anti-Debug Escalation Ladder

Work from lowest-intrusion environment fixes up to binary/syscall instrumentation:

1. **Level 1 — Environment Hygiene (Solves ~60% of Checks Without Hooks)**:
   - Never run default `frida-server` listening on `0.0.0.0:27042`. Rename binary, use a patched server build (`hluda-server`) that strips `frida-agent-64.so` / `gum-js-loop` / `gmain` thread & map strings, and run on a custom port (`-l 127.0.0.1:38192` + `adb forward tcp:38192 tcp:38192`).
   - Prefer **Gadgetless / Zygisk / Kernel-module** instrumentation or **Attach post-startup (`frida -U -F`)** if anti-Frida checks only run once inside `.init_array` / `JNI_OnLoad`!
2. **Level 2 — Watchdog Thread Neutralization**:
   - Using the `[ThreadSpawn] mod!offset` logged in Step 1, inspect `mod!offset` in `ida-pro-mcp` / `GhidraMCP`. Verify it loops (`sleep` / `usleep` + `/proc/self/task` / `/proc/self/maps` scan) with no business side effects, then replace its `pthread_create` `start_routine` with a clean `return 0` stub.
3. **Level 3 — Inline ARM64 `svc #0` Syscalls**:
   - Commercial security SDKs invoke Linux syscalls directly (`MOV X8, #56; SVC #0`) so hooking `libc.so!openat` never fires.
   - Key ARM64 Linux syscall numbers (`X8`):
     - `48` = `faccessat` (`su` / `magisk` file existence)
     - `56` = `openat` (`/proc/self/maps`, `/proc/self/status`, `/proc/self/task/<tid>/stat`)
     - `78` = `readlinkat` (`/proc/self/fd/<n>` checking `linjector` / deleted `frida` pipes)
     - `93` / `94` = `exit` / `exit_group` (put a Frida `Stalker` or LLDB watchpoint/backtrace here to catch the exact check site!)
   - Scan the target `.so` binary in IDA/radare2 (`r2mcp`: `/x 010000d4` for `svc #0` little-endian bytes `01 00 00 d4`) to list every inline syscall site instantly!

---

## Step 3: iOS Jailbreak, TrollStore & Anti-Debug Checkpoints

1. **`ptrace(PT_DENY_ATTACH, 0, 0, 0)` (`request = 31`) & `syscall(26, 31, ...)`**:
   - Also check inline ARM64 `MOV X16, #26; SVC #0x80` (`SYS_ptrace` on Darwin)! Scan Mach-O `__TEXT,__text` for `01 10 00 d4` (`svc #0x80`).
2. **`sysctl` `P_TRACED` Check**:
   - Inspects `info.kp_proc.p_flag & P_TRACED` (`0x00000800`).
3. **DYLD Image Enumeration**:
   - `_dyld_image_count()` + `_dyld_get_image_name(i)` scanning for `FridaGadget`, `Substrate`, `Substitute`, `ellekit`, `SSLKillSwitch`.

---

## Step 4: Honest Hardware Root-of-Trust Boundary (Android Key Attestation / App Attest)

Be strictly factual with the user when diagnosing server-side `403 Device Integrity Failed`:
- **Software checks** (`su` binary, `ro.boot.verifiedbootstate`, `PackageManager` app list, `/proc/mounts`) run in userspace and can be audited/hooked.
- **Hardware-backed Android Key Attestation (TEE / StrongBox)** signs the bootloader lock state (`RootOfTrust.deviceLocked`) inside the hardware Trusted Execution Environment using a Google-rooted X.509 certificate chain verified on the **backend server**. Userspace Frida Java hooks **cannot** forge a valid hardware TEE signature if the bootloader is unlocked and the server strictly validates the X.509 extension OID `1.3.6.1.4.1.11129.2.1.17`! Always check if the app falls back to software attestation when KeyStore throws `ProviderException` before spending hours hooking Java getters.

Files in this skill

  • SKILL.md4.8 KB
  • scripts/frida17_anti_detect_probe.js4.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.