hackmyvm-isengard

admin 2025年4月8日00:10:23评论0 views字数 1646阅读5分29秒阅读模式

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!

hackmyvm-isengard

图面名称是awizardisneverlate.jpg a wizard is never late

扫了一遍完全没扫出来,再看看隐蔽点maIn.css 发现里面居然有注释,这也太隐蔽了

/* btw: in the robots.txt i have to put the url /y0ush4lln0tp4ss */

hackmyvm-isengard

main.css又有提示,说/* looking for something? */

所以是要访问http://192.168.69.28/y0ush4lln0tp4ss/east/

hackmyvm-isengard

这个是魔戒里经典的门,开门暗号是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$

在此处有个隐藏文件

hackmyvm-isengard

解开来内容是yXKMw5wpSArL2CLX

su到sauron,获得user.txt - HMV{Y0uc4nN0tp4sS}

hackmyvm-isengard
hackmyvm-isengard

sudo有个curl ,直接可以curl root.txt获得flag HMV{Y0uD3stR0y3dTh3r1nG}

hackmyvm-isengard

也可以想办法使用sudo curl $URL -o $LFILE 写个.ssh,但没开22端口,写了也不是很方便用,就不提权到root了

摘要提取:

  1. 初始扫描

    • 仅开放80端口,发现图片资源 awizardisneverlate.jpg(《指环王》主题提示)。
  2. 隐蔽信息发现

    • 在 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

  3. 命令执行漏洞

    • 通过链接 http://192.168.69.28/y0ush4lln0tp4ss/east/mellon.php?frodo=pwd 实现命令执行,反弹Shell获取 www-data 权限。
  4. 用户提权(sauron)

    • 在 /home/sauron 发现隐藏文件,解密后得到密码 yXKMw5wpSArL2CLX,切换至用户 sauron,获取User Flag:HMV{Y0uc4nN0tp4sS}
  5. 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

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2025年4月8日00:10:23
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   hackmyvm-isengardhttp://cn-sec.com/archives/3926783.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息