Tryhackme Server-side Template Injection靶场

题目描述:
Task 8
Extra-Mile Challenge
Challenge
Another web app is running on http://ssti.thm:8080/. Can you achieve RCE and read the content of the hidden text file in the directory using SSTI?
Login credentials:

Username: admin
Password: admin
Answer the questions below
What is the content of the hidden text file in the server directory?

题目让我们用给出的账号登录到后台,寻找ssti漏洞并找出隐藏的文件内容

这题找了很久,发现在Form创建form时添加组存在ssti
屏幕截图 2026-04-05 135001
任意选取一个类型
屏幕截图 2026-04-05 135015
进入views
屏幕截图 2026-04-05 135034
点击Add New Group
屏幕截图 2026-04-05 135043
这里可以渲染我们输入的参数,点击update更新后发现成功执行,判断出模板引擎为smarty
屏幕截图 2026-04-05 135240
屏幕截图 2026-04-05 135251
接下来就不要在创建新的组了,因为创建的字符有限制会直接阶段,我们直接在已有的组名上面修改要渲染执行的命令
屏幕截图 2026-04-05 142102
点击update前抓包得到当前目录下的文件
屏幕截图 2026-04-05 142218
在网站根目录下发现隐藏的文件
屏幕截图 2026-04-05 143139

查看得到flag
屏幕截图 2026-04-05 143312

posted @ 2026-04-05 14:58  Morphoko  阅读(28)  评论(0)    收藏  举报