From meta
Detects weak reverse engineering and tampering protections in mobile apps (Android/iOS). Trigger on: root detection bypass, jailbreak detection bypass, Frida detection, debugger detection, anti-debugging, ptrace, sysctl, emulator detection, code obfuscation absent, debug symbols present, get-task-allow, ProGuard disabled, R8 disabled, string encryption, integrity check, file tampering, repackaging, dynamic instrumentation, runtime hook, Magisk hide, Magisk, frida-server, objection bypass, signing verification, apk resign. Covers MASVS-RESILIENCE-1/2/3/4.
npx claudepluginhub securityfortech/hacking-skills --plugin metaThis skill uses the workspace's default tool permissions.
Resilience controls protect app logic, keys, and business rules from reverse engineering and tampering. Root/jailbreak detection, anti-debugging, and integrity checks create defense-in-depth. Without them, attackers can attach Frida to patch auth checks, repack APKs with modified logic, or extract keys from memory at leisure. Most basic resilience checks are bypassable individually — the value ...
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Resilience controls protect app logic, keys, and business rules from reverse engineering and tampering. Root/jailbreak detection, anti-debugging, and integrity checks create defense-in-depth. Without them, attackers can attach Frida to patch auth checks, repack APKs with modified logic, or extract keys from memory at leisure. Most basic resilience checks are bypassable individually — the value comes from layered controls that raise the cost of attack. Root detection that relies on a single file check (/system/app/Superuser.apk) is trivially bypassed; multi-vector detection that checks file system, build properties, and system call behavior is significantly harder.
get-task-allow entitlement present in iOS app (allows debugger attachment)nm libapp.so | grep "T _" shows function names/system/xbin/su or Cydia URL schemeptrace(PT_DENY_ATTACH, 0, 0, 0) / sysctl checks absent in iOS binaryBuildConfig.DEBUG == true, android:debuggable="true"Android:
android:debuggable in manifest — should be false in release buildadb shell jdwp | xargs → connect Android Studio debugger → if attaches: no anti-debugfrida -U -f TARGET_PKG — if no crash/exit: no Frida detectionapktool b app/ -o repack.apk → sign → install — does app accept repackaged build?jadx decompiled/ — are class/method names meaningful (no obfuscation) or mangled?iOS:
get-task-allow entitlement: codesign -d --entitlements :- App.ipalldb -p TARGET_PID — does app detect and exit?otool -tV App.app/App | grep ptracefrida -U TARGET — detection if app calls proc_pidinfo to scan for suspicious process namesdsymutil -s App.app/App | head -50 — are symbols present in production?# Android — check debuggable flag
apktool d app.apk && grep "debuggable" app/AndroidManifest.xml
# Android — Frida bypass root detection (generic)
frida -U -f TARGET_PKG --no-pause -l bypass-root-detection.js
# Common scripts: https://github.com/fridayy/frida-scripts
# Android — objection root bypass
objection --gadget TARGET_PKG explore
android root disable
# Android — check obfuscation
jadx app.apk -d jadx-out/
ls jadx-out/sources/ # readable package names = no obfuscation
# iOS — check entitlements
codesign -d --entitlements :- Payload/App.app/App | grep "get-task-allow"
# iOS — Frida jailbreak bypass
frida -U TARGET -l jailbreak-bypass.js
# Liberty Lite, Shadow (Cydia tweaks) for persistent bypass
# checksec — Android native binary
checksec --file=lib/arm64-v8a/libapp.so
// Frida — Android: bypass single root check (file existence)
Java.perform(function() {
var File = Java.use("java.io.File");
File.exists.implementation = function() {
var path = this.getAbsolutePath();
if (path.indexOf("su") >= 0 || path.indexOf("magisk") >= 0) {
console.log("[+] Blocked file check:", path);
return false;
}
return this.exists();
};
});
android root disable — hooks common root detection libraries (RootBeer, SafetyNet check bypass)get-task-allow to enable debugging on non-jailbroken deviceptrace to return 0 always; hook sysctl to clear P_TRACED flagScenario 1 — Frida Attach to Extract Business Logic
Setup: Fintech app has no Frida detection. Logic for calculating fees is in native method calculateFee(). → Trigger: frida -U TARGET -e "Module.findExportByName(null,'calculateFee')" hooks the method. → Impact: Proprietary fee calculation logic extracted and replicated by competitor.
Scenario 2 — APK Repackage to Remove Feature Flags
Setup: App has premium feature gated by boolean check if (user.isPremium). No integrity verification. → Trigger: Decompile APK, patch smali to always return true, repack and re-sign. → Impact: Free users access all premium features without payment.
Scenario 3 — Debug Build in Production
Setup: App shipped with android:debuggable="true" in release. → Trigger: Attacker runs adb shell run-as TARGET_PKG to access app's private data directory. → Impact: SQLite databases, SharedPreferences, and cached tokens extracted without root.
get-task-allow present in development provisioning profile only — verify release build entitlements separately// Android — multi-vector root detection (raise attack cost)
fun isDeviceRooted(): Boolean {
return checkSuBinary() || checkBuildTags() || checkDangerousApps() ||
checkRWPaths() || checkSafetyNetAttestation()
}
// Use Play Integrity API for cryptographic device attestation (replaces SafetyNet)
// Android — prevent debugging in release
// In build.gradle: ensure debuggable is false
buildTypes { release { debuggable false } }
// iOS — ptrace anti-debug
import Darwin
func denyDebugger() {
var name = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()]
var info = kinfo_proc()
var infoSize = MemoryLayout<kinfo_proc>.size
sysctl(&name, 4, &info, &infoSize, nil, 0)
if (info.kp_proc.p_flag & P_TRACED) != 0 { exit(1) }
}
-s linker flag)[[mobile-auth-bypass]] via Frida hook is the most common exploit that resilience controls defend against — without debugger detection and Frida detection, biometric bypasses are trivially reproducible. [[mobile-insecure-storage]] extraction requires root or jailbreak access that resilience detection is designed to catch. [[mobile-code-quality]] binary hardening (PIE, stack canaries) complements resilience: hardened native code makes memory corruption exploitation harder even when the attacker has successfully bypassed root/jailbreak detection.