Skip to content
Tamandua
← All posts

What a Frida session sees inside your app (and the signals that give it away)

Frida lets anyone rewrite your app's behavior at runtime. A look at how the toolkit is used in real attacks, the signals hook detection relies on, and why no single check is enough.

Tamandua Team · · 6 min read

If you ship a mobile app that handles money, accounts or anything else worth stealing, someone will eventually attach Frida to it. Frida is a dynamic instrumentation toolkit: it injects a JavaScript runtime into a running process and lets you intercept, inspect and replace function calls while the app runs. It is an excellent tool for security research and testing. It is also the usual first step for anyone who wants to bypass your checks, read your traffic or change what your app does.

This post covers how Frida gets into an app, what attackers typically do with it, and how hook detection works, including where it falls short.

How Frida gets into your process

There are three common ways in, and they matter because each one leaves different traces.

  • frida-server on a rooted or jailbroken device. A privileged daemon runs on the device and injects the Frida agent into the target process on demand. This is the most common setup for research and for casual attacks.
  • Frida Gadget in a repackaged app. The attacker unpacks your APK or IPA, adds the Gadget shared library, makes the app load it at startup, then re-signs and reinstalls it. No root is needed, which makes this the usual route against apps that refuse to run on rooted devices.
  • Spawning the app under instrumentation. With access to a device running frida-server, the attacker can launch your app with the agent already loaded, before your own startup code has a chance to run any checks.

What attackers do once they are in

A lot of Frida use is not sophisticated. A typical script finds one function, such as the method that decides whether the device is rooted, and replaces its implementation so it always returns the answer the attacker wants. The app keeps running normally, except that the check it relies on now lies to it.

The same idea covers most of the common goals:

  • Bypassing environment checks such as root, jailbreak, emulator or debugger detection, by forcing each check to report a clean device.
  • Disabling certificate pinning by hooking the platform TLS trust APIs or the pinning helper of a networking library, so traffic can be read and modified in a proxy. Public tooling automates this for the most common libraries.
  • Extracting secrets by tracing crypto, keystore and string-decryption calls and logging their arguments and return values. This reveals keys and plaintext that the static binary never exposes.
  • Changing business logic, for example flipping a premium flag, skipping a confirmation step or altering values before they are sent to the server.

None of this requires breaking your cryptography or finding a memory-corruption bug. The attacker controls the device, so they control the process your code runs in.

How hook detection works

Hook detection looks for evidence that instrumentation is present or that code has been modified in memory. The signals fall into a few groups.

Artifacts of the toolkit

  • Loaded libraries. On Android, /proc/self/maps lists every file mapped into the process. Frida's agent and Gadget libraries show up there unless they have been renamed or loaded from anonymous memory. On iOS, the list of loaded images can be inspected through dyld.
  • Threads. The injected runtime creates its own threads, and their default names are recognizable in /proc/self/task/*/comm.
  • Listening ports. frida-server listens on a well-known default port. This is the weakest signal, since the port is trivially changed.

Evidence of modified code

  • Inline hook detection. Native interception works by overwriting the first instructions of a function with a jump to a trampoline. Comparing the prologue of sensitive functions, in your own libraries and in system libraries such as libc, against the expected bytes exposes that patch.
  • Code integrity checks. Hashing executable sections at runtime and comparing them with values computed at build time catches in-memory patching of your own code.
  • Managed runtime hooks. On Android, replacing a Java method changes how the runtime dispatches it. Checking method metadata for unexpected changes reveals hooks that never touch native code.

Evidence of repackaging

The Gadget route requires re-signing the app. Verifying the signing certificate and the integrity of the installed package at runtime catches a repackaged build even when the device is not rooted and no Frida-specific artifact is visible yet.

Why one check is never enough

Every signal above can be defeated. There are public Frida builds with renamed libraries and threads, scripts that hide entries from /proc/self/maps, and the detection function itself can be hooked to always return "clean", which is exactly the attack described at the start of this post. Detection runs inside a process the attacker controls, so it raises the cost of an attack. It cannot make an attack impossible.

That shapes how detection should be built:

  1. Use many independent checks. An attacker who has to find and neutralize a dozen checks spread across native and managed code, running at different times, spends far more effort than one who patches a single isHooked() function.
  2. Make the checks hard to find. Obfuscation and string encryption stop the detection code from being located by searching for "frida" in a decompiler.
  3. Don't respond in an obvious way. Crashing at the exact point of detection leads the attacker straight to the check. Reporting the event, restricting sensitive features or deciding on the server is harder to trace back.
  4. Report, don't just react. Telemetry about which devices and builds show instrumentation tells you whether you are being actively targeted, which is often worth more than any single reaction.
  5. Keep critical decisions on the server. Entitlements, limits and payment state must be validated server-side. Client-side protection buys time and visibility. It does not replace server-side authorization.

Testing your own app

The fastest way to understand your exposure is to look at your own release build the way an attacker would, on a test device you control. The OWASP Mobile Application Security Testing Guide documents reverse-engineering and tampering techniques in detail, and the OWASP MASVS resilience controls describe what an app should defend against.

Next step: a 20-minute review of your own app

  1. List every decision your app makes on the client: feature flags, entitlement checks, price or limit logic, "is this user verified".
  2. For each one, confirm the server re-checks it. Anything that only the client enforces can be changed at runtime by an instrumented process.
  3. Check whether your release build reports anything when it runs with a debugger attached, on an emulator, or with a signing certificate that is not yours. If the answer is "nothing", that is the first gap to close.
  4. Write down which of those signals your backend would act on, and how. A signal nobody reads is not a control.

How we think about this at Tamandua

The principles above (many independent checks, hardening that keeps them hard to find, a signed policy that starts in observe-only mode, and telemetry that keeps detected, degraded and bypassed outcomes visible) are the direction Tamandua App Guard is heading, not a description of what it ships today.

Current App Guard evidence is a detect-only Android lab observation on one tested device: root and re-signing were detected and logged on-device. No hosted completion, console telemetry, public enrollment, purchase, blocking, or verified effect is offered. An assisted Android pilot is under consideration, not available. iOS is source/preview only, with no enrollment or availability offer. A request records interest; it does not grant access or guarantee delivery. Register interest.

Updated 2026-10-10: this status reflects the approved availability boundaries; the educational discussion above is not a product offer.

Your app's third-party SDKs are attack surface too

Analytics, ads, crash reporting and payment SDKs run with your app's permissions and ship under your name. How to inventory them, what to check before adding one, and why app hardening doesn't change who you trust.

· 6 min read

Account takeover on mobile: the device-side signals that matter

Most account takeover is decided on the server, but the device often knows something first. Which client-side signals are worth collecting, how to bind a session to a device, and how to use them without locking out real users.

· 7 min read

Ship apps that fight back

App Guard protects Android and iOS apps: zero-code hardening for APKs, a native iOS SDK, real-time telemetry and a verifiable receipt for every build.