25年的nk应该差不多了(msk还能再难吗?),头吸一波,综测可以加分😋
55没原题可以做,看看题解学学思路
my first cms | SV
cms题目
- 爆破弱口令字典
- cms当然是找cve了
- 剩下就是cve+看版本如
{$smarty.version}
,4.2.1这样,有rce cve,直接打就行
全世界最简单的CTF | OPEN
- node vm逃逸
源码,有路由,源码,审一下
/secret
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
49const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const fs = require("fs");
const path = require('path');
const vm = require("vm");
app.use(bodyParser.json())
.set('views', path.join(__dirname, 'views'))
.use(express.static(path.join(__dirname, '/public')));
app.get('/', function (req, res) {
res.sendFile(__dirname + '/public/home.html');
});
function waf(code) {
let pattern = /(process|\[.*?\]|exec|spawn|Buffer|\\|\+|concat|eval|Function)/g;
if (code.match(pattern)) {
throw new Error("what can I say? hacker out!!");
}
}
app.post('/', function (req, res) {
let code = req.body.code;
let sandbox = Object.create(null);
let context = vm.createContext(sandbox);
try {
waf(code);
let result = vm.runInContext(code, context);
console.log(result);
} catch (e) {
console.log(e.message);
require('./hack');
}
});
app.get('/secret', function (req, res) {
if (process.__filename == null) {
let content = fs.readFileSync(__filename, "utf-8");
return res.send(content);
} else {
let content = fs.readFileSync(process.__filename, "utf-8");
return res.send(content);
}
});
app.listen(3000, () => {
console.log("listen on 3000");
});思路
- process.__filename读文件
- 打vm,需要查一下资料
- 不知道能不能原型链污染,有点说法
- x baby-parser直接byebye
查一下vm的资料,ok的
- 本地打通再说,看看版本
- 有toString操作,直接按照文章的方式打即可,但是还要绕过一下黑名单,想起鹏城杯的反射了,但是ban了[]和+,拼接不行那就编码吧(但是ban了
\
,ascii如何呢?)
attack_tacooooo | SV
提示1:账户是
tacooooo@qq.com
提示2:题目环境无curl,bash命令
- pickle构造有点忘记了wc
- 没法爆破,3次限制 -> 踩一下密码/弱口令/sql试一试
- pgadmin4 v8.3(不是cms但是cms类型),找相关漏洞 => pgAdmin CVE-2024-2044
- [https://www.venustech.com.cn/new_type/aqtg/20240315/27167.html]
- 无bash?windows?总之可以执行看看 => 就是构造pickle走cve就好
用过就是熟悉 | OPEN
似乎有给docker,学一下tp后看看
- tp5,但是自己找链子