Skip to content
Mobile Write-up Advanced

**Bypass FreeRASP’s Mobile Security Measures in Flutter Apps**

The article shows how the freeRASP Flutter protection SDK's threat callbacks can be redirected in a disassembler so that jailbreak, hook, debugger and tamper detections no longer reach the app's Dart code. An attacker with the app binary could therefore run a modified app on a compromised device while the SDK reports only an undefined threat.

Marco Galetta Follow

Published on infosecwriteups.com

In my previous post, Bypass Jailbreak Detection in Flutter apps I show you how detecting jailbroken iPhones isn’t effective and can be easily bypassed. In the article, I show how to do it in flutterjailbreakdetection package while briefly discussing also freeRASP package.

Marco Galetta, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the SDK's detection results are delivered through ordinary branch instructions inside the app binary, so anyone who can edit the binary can redirect every callback to a harmless default branch.

Impact

An attacker could run a repacked app on a jailbroken or instrumented device while the app's own code never receives the real threat callbacks, so the free SDK's protections can be defeated; the author notes automatic tools may still be stopped.

What the attacker needed

Access to the app's iOS binary; a disassembler such as Hopper; ability to repack and install the app

The fix

The author suggests moving the stronger jailbreak, hook and tamper protections from the paid version into the free package, though the text does not say this was done.

How it was found

  1. Open the app's iOS executable in a disassembler and locate the blocks that trigger the threat callbacks.
  2. Find the branch-not-equal instruction and note its hexadecimal encoding.
  3. Select the branch instructions of the callback blocks and switch the tool to hexadecimal mode.
  4. Replace each branch instruction with the saved branch-not-equal encoding.
  5. Repack the app and deploy it to an iPhone.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Apps can include a protection library that watches for signs the phone is jailbroken or the app has been altered, and tells the app's own code when it sees something. The author opens the compiled app in a tool that shows machine instructions and rewrites the small jump instructions so every warning goes to a do-nothing branch instead. The app still runs, but its own checks never hear about the problem.

What is Mobile?

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.

Similar reports

View all

Same bug class and techniques, clearest first.

Mobile app vulnerabilities

The lesson behind this report.

Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.