「配枪朱丽叶。」

RootのCTF学习笔记。

php

BJDCTF2020/BUUCTF-WEB:Mark loves cat

扫描得到/.git/目录,尝试用GitHack读取源码:flag.php: $y){ $$x = $y; } foreach($_GET as $x => $y){ $$x = $$y; } foreach($_GET as $x => $y){ if($_GET['flag'] === $x…

BJDCTF2020/BUUUCTF-WEB:ZJCTF,不过如此

<h1>".file_get_contents($text,'r')."</h1></br>"; if(preg_match("/flag/",$file)){ die("Not now!"); } include($file); //next.php } else{ highlight_file…

XCTF-WEB:Web_php_unserialize3

file = $file; } function __destruct() { echo @highlight_file($this->file, true); } function __wakeup() { if ($this->file != 'index.php') { //the secret is in the fl4g.php $this->file = 'index.php'; } } } if (…

FBCTF2019/BUUCTF-RCEService

题目给的表单可以接收JSON格式的命令。比如{"cmd":"ls"} 接下来如果输入{"cmd":"cat index.php"}的话什么都不会返回。 这是因为后端中有匹配规则: <br/>'; } elseif (preg_match('/^.*(alias|bg|bind|…</br/>

GXYCTF2019/BUUCTF-WEB:禁止套娃

主页只有一句:flag在哪里呢?经测试存在/.git,可以利用githack读取源代码。 GitHub - lijiejie/GitHack: A `.git` folder disclosure exploit "; if(isset($_GET['exp'])){ if (!preg_match('/data:\/\/|filter:\/\/|php:\/\/|phar:\/\//i', $_GET['exp'])…

i春秋圣诞CTF答题夺旗赛(第四季)做题记录(WEB+MISC+CRYPTO)

WEB部分 【nani】 啥也没有,看源代码发现一句话/index.php?file=show.php。 访问show.php得到user.php,因为是file参数考虑是否有LFI。 ?file=php://filter/read=convert.base64-encode/resource=user.php得到user.php的源码: warn); } function __wakeup(…

安洵杯 2019:easy_web

这道题还是不太难的嘿qwq记录一哈: 仔细观察url的img的参数,复制下来,两遍base64,一遍hex可以得到明文。 同理,我们将参数改为?img=TmprMlJUWTBOalUzT0RKRk56QTJPRGN3&cmd=(一次hex两次base64),然后查看源代码,可以得到index的源码。

GWCTF 2019 WEB-枯燥的抽奖

哈哈,打开给👵逗乐了。 查看源代码,发现check.php:

BUUCTF/ZJCTF2019 WEB-NiZhuanSiWei

<h1>".file_get_contents($text,'r')."</h1></br>"; if(preg_match("/flag/",$file)){ echo "Not now!"; exit(); }else{ include($file); //u…

BUUCTF/极客大挑战2019-WEB BuyFlag

查看源代码,到payflag页面,这里有个提示: Flag need your 100000000 moneyattentionIf you want to buy the FLAG: You must be a student from CUIT!!! You must be answer the correct password!!! 查了下CUIT是阿根廷的意思,我把Accept-Language改成了…

攻防世界web-php_rce

ThinkPHP5.x rec 漏洞分析与复现通过参考这篇文章,得到payload ?s=index/\think\App/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]=dir 又因为只可以执行linux命令,命令行直接运行PHP代码: php -r "phpinfo();" 所以这道题的pa…

关于PHP中md5比较绕过方式的总结

BUUCTF-CheckIn

本来寻思正常走一个上传文件姿势,内容为: 但是返回:exif_imagetype:not image!,猜测可能对文件头进行了检查。 添加GIF89a 成功上传,可以访问,但是无法利用。。 学到了新姿势: .user.ini文件构成的PHP后门 - phith0n 我们可以借助.user.ini轻松让所有p…

BUUCTF 2018 - Online Tool

tcl 看着有复现,于是记笔记,学习一下这道题:

RoarCTF2019-easy calc

首先ctrl+u查看源代码,发现calc.php: 访问calc.php,查看源代码:

RCTF2019Web-nextphp(暂未完成)

开局一篇简短的代码

WEB-Regex(正则 )

把正则摘下来分析以下: preg_match("/flag.*php.{4,7}key:\/.\/(.*regex):punct:[a-z]/i", trim($_GET["id"]), $match); /fl…

安洵杯web Hash

打开是一个登录框,抓包把Cooike中的 source=0 改成1

NSCTF-web2

parse_url函数在解析url时存在的bug

代码如下: