hackmyvm-isengard
扫描发现只开放了80端口
It is the small things, everyday deeds of ordinary folk that keeps the darkness at bay. Simple acts of love and kidness.
The world is not in your books and maps... It is out there!
图面名称是awizardisneverlate.jpg a wizard is never late
扫了一遍完全没扫出来,再看看隐蔽点maIn.css 发现里面居然有注释,这也太隐蔽了
/* btw: in the robots.txt i have to put the url /y0ush4lln0tp4ss */
main.css又有提示,说/* looking for something? */
所以是要访问http://192.168.69.28/y0ush4lln0tp4ss/east/
这个是魔戒里经典的门,开门暗号是mellon
后面就全是魔戒梗了,不能按常规靶机来看待,就随便打打好了
http://192.168.69.28/y0ush4lln0tp4ss/east/mellon.php?frodo=pwd 可以命令执行
直接反弹shell
www-data@isengard:/home$ ls -alt ls -alt total 12 drwx------ 3 sauron sauron 4096 Nov 11 2021 sauron drwxr-xr-x 3 root root 4096 Nov 11 2021 . drwxr-xr-x 18 root root 4096 Nov 11 2021 .. www-data@isengard:/home$
在此处有个隐藏文件
解开来内容是yXKMw5wpSArL2CLX
su到sauron,获得user.txt - HMV{Y0uc4nN0tp4sS}
sudo有个curl ,直接可以curl root.txt获得flag HMV{Y0uD3stR0y3dTh3r1nG}
也可以想办法使用sudo curl $URL -o $LFILE
写个.ssh,但没开22端口,写了也不是很方便用,就不提权到root了
摘要提取:
-
初始扫描
-
仅开放80端口,发现图片资源 awizardisneverlate.jpg
(《指环王》主题提示)。 -
隐蔽信息发现
-
在
main.css
中找到注释线索:/* btw: in the robots.txt i have to put the url /y0ush4lln0tp4ss */ /* looking for something? */
-
访问
http://192.168.69.28/y0ush4lln0tp4ss/east/
,出现《指环王》经典石门,暗号为mellon
。 -
命令执行漏洞
-
通过链接 http://192.168.69.28/y0ush4lln0tp4ss/east/mellon.php?frodo=pwd
实现命令执行,反弹Shell获取www-data
权限。 -
用户提权(sauron)
-
在 /home/sauron
发现隐藏文件,解密后得到密码yXKMw5wpSArL2CLX
,切换至用户sauron
,获取User Flag:HMV{Y0uc4nN0tp4sS} -
Root权限获取
-
利用 sudo curl
漏洞直接读取root.txt
,得到Root Flag:HMV{Y0uD3stR0y3dTh3r1nG} -
可通过写入SSH密钥进一步提权,但因22端口未开放未实施。
关键点总结
-
渗透路径:CSS注释 → robots.txt → 隐蔽目录 → 《指环王》主题漏洞利用。
-
漏洞利用:PHP参数注入、sudo权限滥用(Curl)。
-
Flag:
-
User: HMV{Y0uc4nN0tp4sS}
-
Root: HMV{Y0uD3stR0y3dTh3r1nG}
-
备注:靶机设计大量引用《指环王》梗,需结合非常规思路突破。
原文始发于微信公众号(BlueIris):hackmyvm-isengard
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论