Skip to content
Business logic Write-up Beginner

research

The Android application's lockscreen passcode had no rate limiting, so an attacker with physical access and USB debugging enabled could brute-force all 4-digit combinations using adb commands to simulate keystrokes. This allowed bypassing the lockscreen.

Omar Espino Follow

Published on omespino.com

3.- Then connect your phone via USB, make sure that you have USB debugging mode in your phone, and test the connection with the following command

Omar Espino (@omespino), on omespino.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 application does not enforce any rate limiting or lockout after multiple failed passcode attempts.

Impact

An attacker with physical access to an unlocked device with USB debugging enabled could bypass the app's lockscreen by brute-forcing the passcode.

What the attacker needed

Physical access to the device; USB debugging enabled; app installed and logged in; lockscreen passcode set

The fix

The application should implement rate limiting or lockout after a number of failed passcode attempts.

How it was found

  1. Install the Android application from Google Play Store.
  2. Log in and set a 4-digit passcode in the app's lockscreen settings.
  3. Connect the phone via USB and enable USB debugging.
  4. Verify the connection using adb devices.
  5. Run a script that uses adb shell input keyevent to simulate pressing digits for each passcode attempt.
  6. Wait for the script to try all combinations (or a subset for proof of concept).

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.

The app's lock screen lets you try as many passcodes as you want without slowing down or locking you out. Someone with the phone in hand and a computer connected by USB can use a tool to automatically type every possible 4-digit code until the right one is found. This means the lock screen does not really protect the app if the phone is unlocked and debugging is on.

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.

More by Omar Espino

View all

15 more disclosed reports, best first.

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.