xChar
·a month ago

Web1

签到题

image-20240808170851461

view-source一下

image-20240808170927179

得到qweasdrtyfgh.php

image-20240808171000834

Web2

index是一个go to test.php的超链,进去后一眼文件包含

image-20240808171106313

读了一下index跟test的源码,没有什么发现,绕不过strpos

但是data流可用,说明开启了allow_url_fopenallow_url_include

直接system任意命令执行写文件发现当前目录不可写,ls也看了一下没有别的马子,写到tmp再配合文件包含getshell

image-20240808171548683

image-20240808171857729

这道题拿了二血嘎嘎嘎

Web3

image-20240808172153842

分析题目,这道题有以下几个限制

1.phone必须是数组
2.avatar在post参数内不能带flag字眼
3.string内不能有任何的root和别的字眼

那么,在post内数组绕过第一个,然后再利用__destruct反序列化链传参即可。链中的name使用反序列化字符串逃逸绕过第二个限制,第三个限制只影响post,post的avatar跟解题无关,且不影响链中的avatar

Payload:

name=O:9:"user_info":3:{s:4:"name";s:126:"rootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootrootroot";s:5:"phone";a:2:{i:0;i:1;i:1;i:1;}s:6:"avatar";s:5:"/flag";}&phone[]=1&avatar=123

image-20240808172635216

两百分的题。一血多给了十分好耶!是唯一一个解出来的小组!

Misc1

是一张图片,不是lsb也不用改weight

右键改成.rar得到未加密压缩包中的rsa.txt

右键改成.zip可得一个加密压缩包,内有flag.txt,不是伪加密

1723109396511

妈的我不会加密阿。丢去问gpt秒了

bfda59a5d29efefc00db14d075e0ba3

455f6b1e4e3fea002b50f877fc37f9d

Misc2

签到题。压缩包内二维码扫描得到flag秒了

Crypto1

签到题。

image-20240808173138965

PWN

别的大手子教的。我也学不会就是

main输入两个截断后进入get_data

img

这里 的len是自定义的可以为-1

img

进入token计算会异或一个48('0'),如果我name就是0,这个时候字符串会变为空

img

当后面赋值的时候因为len返回-1就无限赋值了,v7在file上面可以覆盖到file

img

算一下栈偏移打过去刚好把s中的flag覆盖到file,就打开flag并输出

payload
输入 0:0:

此文由 Mix Space 同步更新至 xLog
原始链接为 https://de3ay.com/posts/sec/maoming-ctf-writeup


Loading comments...