web

Pacman

https://deobfuscate.io/反混淆

BandBomb

上传文件改名为模板,实现覆盖

MysteryMessageBoard

和网鼎青龙组的很像

双面人派对

prodbucket

逆向在字符串李搜索可以发现存储桶的账号密码

用的是minio的分布式存储桶,这里我使用其官方工具mc进行连接

1
2
mc.exe config host add minio_admin http://node1.hgame.vidar.club:30407 


连接上后就可以看到

hint里是一个源码。

可以发现是一个使用overseer来自更新program函数的程序,而更新的Fetcher就是minio prodbucket的update程序。那么我们只要将program重写成危险函数再传到update就可以了就可以了

角落

https://blog.wm-team.cn/index.php/archives/82/配置文件错误,源码读取

发现路径/app.conf

发现apache配置有问题,可以进行源码读取

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

from flask import Flask, request, render_template, render_template_string, redirect
import os
import templates

app = Flask(__name__)
pwd = os.path.dirname(__file__)
show_msg = templates.show_msg


def readmsg():
filename = pwd + "/tmp/message.txt"
if os.path.exists(filename):
f = open(filename, 'r')
message = f.read()
f.close()
return message
else:
return 'No message now.'


@app.route('/index', methods=['GET'])
def index():
status = request.args.get('status')
if status is None:
status = ''
return render_template("index.html", status=status)


@app.route('/send', methods=['POST'])
def write_message():
filename = pwd + "/tmp/message.txt"
message = request.form['message']

f = open(filename, 'w')
f.write(message)
f.close()

return redirect('index?status=Send successfully!!')

@app.route('/read', methods=['GET'])
def read_message():
if "{" not in readmsg():
show = show_msg.replace("{{message}}", readmsg())
return render_template_string(show)
return 'waf!!'


if __name__ == '__main__':
app.run(host = '0.0.0.0', port = 5000)

我们可以看到read_message函数查看readmsg()即/tmp/message.txt的值即我们传入的内容如果没有{就进入模板渲染,这里的渲染内容又调用了readmsg(),那么这时候就可以打个时间差,我们不断发三个包,一个正常有{}的ssti,另一个无括号,最后触发读取路由,这样子当if语句时readmsg()返回的是无括号的,而进入if后模板渲染时就有可能返回的是有括号的,从而进行条件竞争。

条件竞争。ssti打内存马