Born2Root:1

https://download.vulnhub.com/born2root/born2root.ova

靶场IP:192.168.32.17

扫描对外端口服务

┌──(root㉿kali)-[~]
└─# nmap -sV -p1-65535 192.168.32.17
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-12 23:04 EDT
Nmap scan report for 192.168.32.17
Host is up (0.00018s latency).
Not shown: 65531 closed tcp ports (reset)
PORT      STATE SERVICE VERSION
22/tcp    open  ssh     OpenSSH 6.7p1 Debian 5+deb8u3 (protocol 2.0)
80/tcp    open  http    Apache httpd 2.4.10 ((Debian))
111/tcp   open  rpcbind 2-4 (RPC #100000)
49713/tcp open  status  1 (RPC #100024)
MAC Address: 08:00:27:30:22:B0 (Oracle VirtualBox virtual NIC)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 13.84 seconds

访问80端口

image-20220913110520866

爆破目录

访问:/robots.txt

image-20220913110707452

访问:/wordpress-blog

image-20220913110830838

访问:/files

image-20220913110849893

访问:/icons/

image-20220913111210353

找到:VDSoyuAXiO.txt,发现是一个私钥文件

根据首页发现几个用户名

使用martin进行ssh登录

ssh报错

image-20220913112154829

解决方法:

  • 保证id_rsa权限为600

  • cd ~/.ssh目录下

  • 创建文件config

  • 文件内容: PubkeyAcceptedKeyTypes +ssh-rsa,保存退出

查看计划任务,发现sekurity.py

设置反弹shell

由于 cron 作业设置为每五分钟执行一次脚本,因此需要一些时间。

image-20220913113133749

我们找不到任何可以帮助我们根机器的东西。现在我们使用第三个用户来root机器。我们知道第三个用户是 hadi。所以我们使用这个名字创建一个字典。

我们使用 bopscrk创建字典。

image-20220913120042179

使用SSH进行爆破

ssh登录

切换到root用户

image-20230208133855269

最后更新于

这有帮助吗?