githubEdit

Pin Bruteforce

On this page you will learn how to use Bad USB to brute-force PINs on mobile devices, for 4 and 6 digits.

My payload repository

We can use my repository where I have uploaded payloads for 4 and 6 pins. We would just need to download the payloads from the Bad USB folder:

Payload Generator in Python

We can use the following Python scripts to customize the payloads to our liking.

4-digit PINs

The following script generates a payload for 4-digit PINs:

6-digit PINs

The following script generates a payload for 6-digit PINs:

Common Pin Generator in Python

4-digit PINs

The following script generates a payload with the 200 most common 4-digit PINs:

6-digit PINs

The following script generates a payload with the 200 most common 6-digit PINs:

Limitations and recommendations

1. Blocks and limits in iOS

  • Failed Attempts :

    • iOS has a progressive locking system after several failed attempts.

    • Default:

      • 5 failed attempts : Temporary 1 minute lockout.

      • 6 failed attempts : 5-minute lockout.

      • 7 failed attempts : 15-minute lockout.

      • 8 or more failed attempts : 1 hour blocks.

    • If the "Erase data" option is enabled, the device will reset after 10 failed attempts .

  • Automation with an HID keyboard :

    • iOS treats HID entries as if they were manual, but the blocking behavior remains the same.

2. Blocks and limits in Android

Depending on the age of the OS, they are more or less restrictive:

  • Older versions (< Android 6.0) :

    • Fewer restrictions on failed attempts; some devices allowed infinite attempts if no additional measures were enabled.

  • Modern versions (Android 10+) :

    • More robust implementation of progressive limits and automatic locks, integrated with security features such as FRP (Factory Reset Protection) to protect the device against unauthorized access.

3. Recommended Waiting Time

To avoid these blockages, consider the following intervals:

  • Attempts per minute : No more than 5 attempts (one attempt every 12 seconds).

  • Suggested delay :

    • Minimum: 12000 ms (12 seconds).

    • Recommended: 15000 ms (15 seconds), to allow additional time and simulate human behavior.

4. Calculation of Total Time

If you are trying all possible combinations of a 6-digit PIN (1,000,000 combinations) with a 15-second delay between each attempt:

This makes brute-force attacks on modern iOS devices with a 6-digit PIN impractical, as waiting times and lockouts make the process extremely slow.

Last updated