/secskills-offense:bypassing-root-jailbreak-detectionfrom secskills-offense
Defeats root, jailbreak, and Frida detection in mobile apps using Magisk, Zygisk, objection, and Frida hooks. Explains hardware-backed attestation limits.
Ships in secskills-offense. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Detection is almost never one check. It is a dozen cheap checks scattered across the app, plus — increasingly — one hardware-backed attestation that no hook can touch. Hooking checks one at a time is whack-a-mole; the work is finding the layer the app actually depends on.
Use only against apps you are authorized to test.
frida-ps shows nothingobjection fails to explore, or hooks stop firing after a few secondsbypassing-mobile-pinning; a proxy error
is a different problem, though detection can masquerade as onetesting-mobile-applicationsreversing-* skillDetection lives at four layers, and each needs a different response. Working out which one is firing saves the most time.
| Layer | Signals | Response |
|---|---|---|
| Java/managed checks | RootBeer, File.exists("/system/xbin/su"), package queries for Magisk | Hook at the Java layer (objection, Frida) |
Native checks in .so | stat/access/fopen on su, /proc/self/maps scans | Hook libc, or patch the .so |
| Instrumentation detection | Dies only when Frida is attached; port 27042 probes; thread-name scans | Hide the agent, not the root |
| Hardware attestation | Play Integrity, SafetyNet, DeviceCheck, App Attest | Cannot be hooked — see below |
# What does the app reference? Decompile and look before hooking.
apktool d target.apk -o out
rg -n 'RootBeer|isRooted|su\b|magisk|superuser|test-keys|/system/xbin|busybox|xposed|frida' -i out/smali* out/res 2>/dev/null | head -30
rg -n 'SafetyNet|PlayIntegrity|IntegrityManager|attest|DeviceCheck' -i out/ | head
# Native side
unzip -j target.apk 'lib/arm64-v8a/*' -d libs
rg -a -o 'su|/system/bin/su|magisk|frida|gum-js-loop|gmain' libs/*.so | sort -u | head -20
The strings you find in the native libraries tell you what the app looks for, which is far more efficient than hooking blind and waiting for it to die.
Start with environment hiding, not hooking. A well-hidden root defeats most detection without a single hook, and it does not break when the app updates.
# Magisk: DenyList the target so the root is invisible to it
# Settings → Zygisk ON, Enforce DenyList ON, select the target package
# Shamiko (Zygisk module) hides more thoroughly than DenyList alone
# Play Integrity Fix (PIF) module for the attestation layer — see limits below
# Verify what the app can see
adb shell "pm list packages | grep -i magisk" # should return nothing to the app
Then hook what remains:
objection -g com.target.app explore
# then: android root disable
frida -U -f com.target.app -l anti-root-bypass.js --no-pause
Common Java hook points, in the order they usually appear:
// File existence checks — the single most common family
Java.use('java.io.File').exists.implementation = function () {
const p = this.getAbsolutePath();
if (/su$|magisk|superuser|busybox|xposed/i.test(p)) return false;
return this.exists();
};
// Runtime.exec("su") and ProcessBuilder
// Build.TAGS containing "test-keys"
// PackageManager.getPackageInfo for known root packages
// System properties: ro.debuggable, ro.secure, ro.build.selinux
Native checks need native hooks. When Java hooks are in place and the app
still exits, the check is in a .so:
# See which syscall is finding the evidence
frida-trace -U -f com.target.app -i 'stat*' -i 'access' -i 'fopen' -i 'open'
# then edit the generated handlers to lie about the paths it probes
If the app runs fine rooted but dies the moment you attach, you are fighting instrumentation detection, and hiding root will not help.
| Check | Counter |
|---|---|
| TCP 27042 open, or the D-Bus handshake response | Run frida-server on a random port, or use Gadget instead of Server |
/proc/self/maps contains frida-agent, gum | Rename the agent; use a patched build |
Thread names gmain, gum-js-loop, pool-frida | Patched Frida builds rename these |
/proc/self/task/*/stat scanning | Same |
Named pipes and re.frida.server strings | Patched build |
| Periodic re-check after launch | Attach after the check window, or hook the timer |
The practical answer is a patched Frida (community builds exist specifically for this) plus Gadget injection rather than a listening server. If detection still wins, fall back to static analysis plus targeted APK patching — you lose interactivity but keep progress.
objection -g com.target.app explore
# then: ios jailbreak disable
# Tweak-based, system-wide: Liberty Lite, A-Bypass, Shadow (rootless jailbreaks)
What iOS apps check, and what to hide:
/Applications/Cydia.app, /bin/bash, /usr/sbin/sshd,
/etc/apt, /private/var/lib/aptfopen("/private/jailbreak.txt", "w"))fork() succeeding, which it should not in a sandboxed appdyld image list containing MobileSubstrate / substitutecydia:// being openableNSFileManager checks, which are easier to hook than raw statHook stat, access, fopen, getenv("DYLD_INSERT_LIBRARIES"), and
_dyld_get_image_name for the native layer; hook NSFileManager methods for
the Objective-C layer. On non-jailbroken devices, repackage with the Frida
gadget (objection patchipa) — and expect that to trip attestation.
Hardware-backed attestation is the hard boundary. Play Integrity's
MEETS_STRONG_INTEGRITY, key attestation via the TEE/StrongBox, and Apple's
App Attest are signed by hardware keys and verified on the vendor's servers.
A client-side hook can change what the app reads, but it cannot forge a
signature the server validates.
What this means in practice:
BASIC and
DEVICE integrity. STRONG requires an unmodified bootloader.Say this in the report rather than quietly reducing scope: "dynamic instrumentation was not possible against production builds due to hardware attestation; testing covered X and not Y" is a finding about your coverage, and hiding it is worse than the limitation.
While bypassing, record how good the detection was — clients ask, and it belongs in the report:
An app whose entire root defense is File.exists("/system/xbin/su") deserves a
low-severity note; one that uses server-verified attestation deserves credit.
testing-mobile-applications — the assessment this unblocksbypassing-mobile-pinning — the other reason a mobile app "just fails"analyzing-binaries — patching native detection routinesreporting-security-findings — how to state a coverage limitation honestlyWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub trilwu/secskills --plugin secskills-offense40 skills in this plugin
/abusing-adcsEnumerate and abuse Active Directory Certificate Services with Certipy and Certify — the ESC1 through ESC16 escalation paths, vulnerable template and CA configurations, NTLM relay to web enrollment, certificate-based authentication and persistence, and the strong-mapping changes that gate several of them. Use when a domain has a certificate authority, when Certipy or BloodHound reports vulnerable templates, or when escalating from a low-privilege domain user./abusing-ci-cd-oidcExploit CI/CD pipeline misconfigurations and OIDC federation weaknesses across GitHub Actions, GitLab CI, and Jenkins -- poisoned workflows, secret exfiltration, runner compromise, overly broad OIDC trust policies, build artifact poisoning, and credential theft. Use when pentesting CI/CD infrastructure, assessing OIDC federation trust boundaries, reviewing pipeline security posture, or exploiting a path from repository access to cloud credentials./attacking-active-directoryAttack and enumerate Active Directory environments using Kerberos attacks (Kerberoasting, ASREPRoasting), credential dumping (DCSync, Mimikatz), lateral movement (PtH, PtT), and BloodHound analysis. Use when pentesting Windows domains or exploiting AD misconfigurations.2 plugins ship this exact skill · first indexed Jul 31, 2026
Other plugins' skills for the same job