nctf-php
来源:互联网 发布:手机淘宝电影在线看 编辑:程序博客网 时间:2024/05/18 00:12
一:nctf-php-decode
http://ctf.nuptsast.com/challenges#php%20decode
<?phpfunction 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
得到
<?phpif(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.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
- nctf-php
- nctf-wireshark
- nctf-密码
- nctf-web
- nctf-/x00
- nctf-web-2
- Writeup of NCTF
- 南京邮电大学nctf web部分题解
- NCTF 南京邮电大学网络攻防训练平台 WriteUp
- NCTF 南京邮电大学网络攻防训练平台 WriteUp
- PHP
- PHP
- php
- php
- PHP
- PHP
- php
- php
- sql基础知识-----主外键、参照完整性
- 个人能力怎么看?四个方面帮你量化UE&UI的绩效标准
- 关于swift - 网络请求+MD5,混合编程
- TCP可靠传输的实现
- Qt Gui使用(二)
- nctf-php
- SQLserver连接错误,错误代号2
- Ajax复选框多选删除的实现
- Swift 中枚举高级用法及实践
- WiBRAS宽带网络接入网关
- 附件下载功能
- HDU 5631 Rikka with Graph
- Vulkan教程
- 内建模块-urllib