Skip to content
Business logic Write-up Intermediate

Client side validation strikes again: PIN code bypass !

The Linxo iOS banking app checked its unlock PIN only on the device, so the true/false result could be altered at runtime. An attacker with an unlocked phone could hook the check and unlock the app without knowing the PIN. The same client-side weakness affected Netflix parental controls, which Netflix declined to fix.

Davy Follow

Published on blog.randorisec.fr

Client side validation is a common weakness found during penetration tests and security audits performed by Randorisec.

Davy (@RandoriSec), on blog.randorisec.fr

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 PIN comparison was performed locally in the app and the result was trusted by the client, with no server-side verification.

Impact

Anyone with an unlocked device could bypass the app PIN and reach the protected banking app, though the text notes the non-jailbroken route is non-trivial.

What the attacker needed

An unlocked iOS device; jailbreak or developer account and re-signing; Frida client on a computer

The fix

Linxo was fixing it in layers: moving the check to Swift, adding jailbreak and debug detection, and eventually doing the check on the server side; the Swift change was already in version 6.1.1.

How it was found

  1. Set a PIN in the app and confirm it is requested on launch.
  2. Attach Frida to the running app and trace the pinMatch method of the LXKeychain class.
  3. Observe that the method returns 1 for a correct PIN and another value for a wrong one.
  4. Use a script to replace the return value with 1.
  5. Enter a wrong PIN and see the app unlock.

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.

A PIN screen should ask a server whether the code is right, but here the app decided on the phone itself. Because the phone belongs to the user, they can use tools to change the app's answer from 'wrong' to 'right'. This means the lock only stops someone who does not try to tamper with the app.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.