2.7k words 2 mins.

# [SCTF2019]Flag Shop # 点击 buy flag 试试 提示没有足够的 jkl 这里可以点击 work 去赚取 jkl 正常点击要攒到 flag 怕是不可能,buu 请求过快也会报错 先抓包看看吧 这里不能修改 work 赚取的 jkl,尝试把 cookie 解码看看:直接修改发现出错,有密码。重新开始审计: 又回到最开始的地方。。 扫描一下有没有源码泄露之类的 发现 robots.txt 访问发现有 /filebak 发现 ruby 代码: require 'sinatra' require...
1.5k words 1 mins.

# [羊城杯 2020] easyphp 和 [XNUCA2019Qualifier] EasyPHP 基本一样,唯一的区别就是少了 include_once 导致没办法通过 error_log 来做,预期解应该就是那道题的非预期。 <?php $files = scandir('./'); foreach($files as $file) { if(is_file($file)){ if ($file !== "index.php") { unlink($file); }...
788 words 1 mins.

# [BSidesCF 2019]SVGMagic 标题说把 SVG 转为 PNG SVG 是一种用 XML 定义的语言,SVG 图形是可交互的和动态的,可以在 SVG 文件中嵌入动画元素或通过脚本来定义动画。 也就是说这里的 SVG 是个 XML, 并且存在可控的内容,那么自然就会想到 XXE。 究极详细讲解:https://www.freebuf.com/vuls/175451.html 我的理解是: 首先我们要知道,XML 被设计用来传输和存储数据。 然后这个漏洞就是利用了,应用程序在解析XML输入时,没有禁止外部实体的加载。 就拿下面的这个来说<!ENTITY file...
1.8k words 2 mins.

# [极客大挑战 2020] Greatphp 源码: <?phperror_reporting(0);class SYCLOVER { public $syc; public $lover; public function __wakeup(){ if( ($this->syc != $this->lover) && (md5($this->syc) === md5($this->lover)) && (sha1($this->syc)===...
847 words 1 mins.

# easybypass 源码: <?php highlight_file(__FILE__); $comm1 = $_GET['comm1']; $comm2 =...
970 words 1 mins.

# [CSAWQual2019]Web_Unagi 提示需要上传 xml 文件,flag 在 /flag 中。很容易联想到 XXE 漏洞来读取。 <?xml version='1.0'?> <!DOCTYPE users [ <!ENTITY xxe SYSTEM "file:///flag"...
2.7k words 2 mins.

# [MRCTF2020]Ezaudit 打开题目是个漂亮的前端,扫一下发现 www.zip 文件泄露,下载审计 <?php header('Content-type:text/html; charset=utf-8'); error_reporting(0); if(isset($_POST['login'])){ $username = $_POST['username']; $password = $_POST['password']; $Private_key =...
1.9k words 2 mins.

# [WMCTF2020]Make PHP Great Again 前言: 关键字:[require_once|proc | 文件包含 | session|session.upload_progress] <?phphighlight_file(__FILE__);require_once 'flag.php';if(isset($_GET['file'])) { require_once $_GET['file'];}# 题解 绕过不能重复包含文件的限制 # 解法 1 PHP 最新版的小...