InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Member-only story

Bypass Jailbreak Detection in Flutter apps

Marco Galetta
InfoSec Write-ups
Published in
7 min readJan 29, 2023

--

Image generated with DALL-E

If you ever worked on a mobile Flutter application for a big company, or if you ever needed to treat your users’ personal data carefully, you may consider securing your Flutter app in some way.
During the last Flutter Forward on Wednesday, January 25, a place in the “on-demand sessions” has been reserved for an interesting video from Majid Hajian about “Securing Flutter Apps | OWASP Top 10 for mobile & RASP explained”.
You should check it out as a good introduction to OWASP Foundation and the Runtime Application Self Protection (RASP) solutions.
A big point is touched on when it comes to mobile security in general: an app’s ability to understand if the device on which it is running has been rooted or jailbroken.
This article will focus on iOS and the so-called jailbreak detection.

Notice that, although in detail, the information that you are going to learn, has an informative purpose only and you should try those technics on apps that you own or on which you have permission to do those kinds of checks.

I will use a simple Flutter project specifically made for this purpose, using two Flutter packages, flutter_jailbreak_detection, and freeRASP.

  • Setup
  • Different kinds of Jailbreak Detection
  • Flutter packages
  • Technics
  • Conclusion

Setup

In order to start testing, you need:

  • an iOS app
  • Hopper Disassembler
  • a Jailbroken iPhone (not totally true, more on that later)

iOS app

You can build your own .ipa file with flutter build ipa command, you can run flutter build ios — release to make a .app file or you could also grab an application from a Jailbroken iPhone. Whatever method you want to use it’s up to you (and what you can do at the time of testing).
If you have a .ipa file, just change the extension to .zip and decompress it. It should reveal a folder named Payload with a…

--

--

InfoSec Write-ups
InfoSec Write-ups

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by Marco Galetta

Software Engineer with a passion for Dart and Flutter

Responses (1)