「配枪朱丽叶。」

RootのCTF学习笔记。

hackthebox 注册邀请码/WEB-Fuzzy

做题地址:https://www.hackthebox.eu

关于邀请码:首先来到/register注册账号告诉我邀请码丢失,提示我先进入/invite。
在/invite这里的源代码里有一个inviteapi.min.js,其中有一个makeInviteCode函数,根据名字可以猜到和邀请码有关。
https://s2.ax1x.com/2020/01/20/1ikyQg.png
然后我在/invite页打开控制台运行一哈这个函数
https://s2.ax1x.com/2020/01/20/1ikhF0.png
得到一串base64,解码后内容如下:

In order to generate the invite code, make a POST request to /api/invite/generate
翻译:为了生成邀请码,请对 /api/invite/generate发出POST请求。

解码后就是邀请码,返回/register注册就可以啦,需要人机验证:
https://s2.ax1x.com/2020/01/20/1iAimd.png

ps:默认头像也太丑啦,第一件事自己先换一个。


WEB-Fuzzy

题目描述:
 We have gained access to some infrastructure which we believe is connected to the internal network of our target. We need you to help obtain the administrator password for the website they are currently developing. 
蹩脚翻译:
我们已经获得了一些我们认为与我们目标的内部网络相连的基础设施。我们需要您帮助获取他们正在开发的网站的管理员密码。 

这道题主要倚靠强大的字典(。
粗略的浏览了一遍什么都没发现,尝试扫描目录:
https://s2.ax1x.com/2020/01/22/1AoCod.png
跟进api目录会有意外发现:
https://s2.ax1x.com/2020/01/22/1Aosl6.png
访问/api/action.php提示Error: Parameter not set( 错误:参数未设置 )。
使用bp爆破参数得到reset(字典是自带的那个服务器端变量名称):
https://s2.ax1x.com/2020/01/22/1AH20U.png
接下来爆破值,响应包中有flag:
https://s2.ax1x.com/2020/01/22/1AO3E8.png