Web

第一次战斗到最后一刻的比赛….劳累

CatBank | Pure

注册2-3个账号,发现能转钱到负数,就直接转给另一个号一百万即可

当时好像要刚好才行,之前超了几分钱就没回显

CatNet | Pure

先扫目录:

尝试访问,发现需要本地IP才可以进入,那么直接抓包XFF:

然后看到:

1
2
3
4
5
6
function getFlag() {
fetch('/admin/flag', {
headers: {
'X-Internal-Auth': 'cateye-internal-000'
}
}

就直接在添加一条X-Internal-Auth: cateye-internal-xxx

然后爆破这个三位数即可

猫猫的秘密 | Pure

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
document.getElementById('getSecretBtn').addEventListener('click', async () => {
try {
const response = await fetch('/get_secret', {
method: 'GET',
headers: {
'Authorization': token
}
});

const data = await response.json();

if (response.ok) {
let resultText = `${data.message}\n\n`;

if (data.public) {
resultText += `${data.public}\n\n`;
}

if (data.confidential) {
resultText += `猫猫信息: ${data.confidential}\n\n`;
}

if (data.flag) {
resultText += `Flag: ${data.flag}`;
}

document.getElementById('secretResult').textContent = resultText;
} else {
document.getElementById('secretResult').textContent = `错误: ${data.error}`;
}

document.getElementById('secretResult').classList.remove('hidden');
} catch (error) {
document.getElementById('secretResult').textContent = `发生错误: ${error.message}`;
document.getElementById('secretResult').classList.remove('hidden');
}
});

document.getElementById('logoutBtn').addEventListener('click', () => {
token = '';
document.getElementById('username').value = '';
document.getElementById('password').value = '';
document.getElementById('loginResult').classList.add('hidden');
document.getElementById('secretResult').classList.add('hidden');
document.getElementById('secretSection').classList.add('hidden');
document.getElementById('loginSection').classList.remove('hidden');
});

看到前端源码,应该是要个token然后访问/get_secret,然后认证通过了就可以

然后看到是要添加一个Authorization,然后后面跟token

反正只会JWT,拦截的时候又没给cookie,就尝试构造JWT

喵喵喵?,你想看什么捏。发现有回显,那看来就是JWT了,但是看下面这几段:

1
2
3
4
document.getElementById('loginResult').classList.add('hidden');
document.getElementById('secretResult').classList.add('hidden');
document.getElementById('secretSection').classList.add('hidden');
document.getElementById('loginSection').classList.remove('hidden');

总感觉还缺一段验证,想到可能是要admin验证,一开始尝试换username没有成功,就尝试加了个role:admin,然后就结束了…..

palu{0b503f28af6f4d7987e832174284cb40}

Ezblog | Pure

首先下载源码,看到:

1
2
3
4
5
6
7
8
9
@Mapping("/backdoor")
public String backdoor(@Param("key") String key) {
if ("********".equals(key)) {
String flag = System.getenv("FLAG");
return "flag is " + flag;
} else {
return "you are god";
}
}

有个后门,要求backdoor?key=,里面需要符合给的值就可以得出flag,但这里没给,接着看

1
2
3
4
5
6
7
8
@SolonMain
public class App {
public static void main(String[] args) {
Solon.start(App.class, args, (app) -> {
StaticMappings.add("/assets/", new FileStaticRepository("/app/assets"));
});
}
}

这里给了个静态的目录,结合题目所给的/app,可以尝试访问assets/../app.jar,但是发现我的浏览器都访问不了,但是Bp里面有反应,但是是乱码,然后导出到内嵌浏览器查看:

又是源码,打开发现key值出现,直接访问即可

palu{91ffcbb02e904b699cf3639af74ad2af}