[GXYCTF2019]禁止套娃

进来发现只有这句话,习惯性访问一下flag.php,发现不是404,那就证明flag就在这了,接下来要想办法拿到flag.php的源码。

这道题是.git文件泄露网页源码,githack拿到index.php源码

这里观察到多次判断,首先要有个get参数exp,第二层是过滤了php伪协议,第三层是正则匹配,要求输入的字符串满足形如以下的格式,第四层过滤了一些目录名称

q_we_(fd_s());

因为正则匹配,我们没法通过system('cmd')等函数实现命令执行(参数里都带有引号,不符合匹配正则模式)

故通过PHPSESSID传递参数,session_id()获取PHPSESSID, session_start()创建新会话或重启现有会话,最后通过highlight_file()实现内容回显

exp=highlight_file(session_id(session_start()));

相关推荐
曲幽3 天前
FastAPI流式输出实战与避坑指南:让AI像人一样“边想边说”
python·ai·fastapi·web·stream·chat·async·generator·ollama
曲幽4 天前
不止于JWT:用FastAPI的Depends实现细粒度权限控制
python·fastapi·web·jwt·rbac·permission·depends·abac
曲幽5 天前
FastAPI分布式系统实战:拆解分布式系统中常见问题及解决方案
redis·python·fastapi·web·httpx·lock·asyncio
曲幽6 天前
FastAPI压力测试实战:Locust模拟真实用户并发及优化建议
python·fastapi·web·locust·asyncio·test·uvicorn·workers
曲幽7 天前
FastAPI实战:打造本地文生图接口,ollama+diffusers让AI绘画更听话
python·fastapi·web·cors·diffusers·lcm·ollama·dreamshaper8·txt2img
曲幽8 天前
我用FastAPI接ollama大模型,差点被asyncio整崩溃(附对话窗口实战)
python·fastapi·web·async·httpx·asyncio·ollama
曲幽9 天前
FastAPI + Ollama 实战:搭一个能查天气的AI助手
python·ai·lora·torch·fastapi·web·model·ollama·weatherapi
holeer10 天前
【V1.0】Typora 中的 HTML 支持|软件文档自翻译
前端·编辑器·html·typora·web·markdown·文档
努力的lpp10 天前
【ctf常用备用文件名字典】
web安全·网络安全·ctf
敲敲了个代码11 天前
浏览器时间管理大师:深度拆解 5 大核心调度 API
前端·javascript·学习·web