SQL Injection

Authentication Bypass

Shadab Ahmed Ansari
2 min readJun 12, 2021

Hello Everyone, today we will demonstrate a technique to bypass the authentication using SQL injection.

In the recent pen-testing, identified that the admin panel was using a weak mechanism that leads to unauthorized access.

Attack scenario

To check potential SQL injection, we simply add the special character ‘ and see the response.

As shown in the below figure, you find that it throws an error with the database that the application is using. It’s using MYSQL.

Potential checking sqli

As its using MYSQL, the comments we use is # for MYSQL

1' OR 1=1#

SQL injection payload

YEAH!!!! we successfully bypassed the authentication. Now we got unauthorized access to this application we simply check the data, create users, can go to stores, and extract sensitive information.

Authentication bypass

Now we try to exploit it. Further exploitation sqli using sqlmap you can read my other blog click here.

Thank You!! All for spending your precious time and reading this article.

Stay tuned for the next attack.

--

--

Shadab Ahmed Ansari
Shadab Ahmed Ansari

Written by Shadab Ahmed Ansari

Information Security Analyst | Researcher | VA-PT | Bug Bounty |