SUNSET MIDNIGHT

https://download.vulnhub.com/sunset/midnight.7z

靶场IP:192.168.2.4

扫描对外端口

┌──(root㉿kali)-[~/Desktop]
└─# nmap -p1-65535 -sV 192.168.2.4
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-04 07:13 EDT
Nmap scan report for 192.168.2.4
Host is up (0.000080s latency).
Not shown: 65532 closed tcp ports (reset)
PORT     STATE SERVICE VERSION
22/tcp   open  ssh     OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)
80/tcp   open  http    Apache httpd 2.4.38 ((Debian))
3306/tcp open  mysql   MySQL 5.5.5-10.3.22-MariaDB-0+deb10u1
MAC Address: 08:00:27:05:08:38 (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 9.24 seconds

浏览器访问80端口,发现配置本地hosts

image-20220904191517941
image-20220904191627991

对wordpress进行暴力破解,发现无法爆破。

于是爆破MySQL端口,找到账号密码:root/robert

image-20220904204449398

查询wordpress的后台登录密码

image-20220904204533158

不过无法破解到密码,于是直接更改密码的哈希的密码为password

登录wordpress后台

image-20220904204812696

在插件添加一句话木马

image-20220904204946646

但是无法保存成功。

image-20220904205104164

使用WordPress 木马插件

https://github.com/wetw0rk/malicious-wordpress-plugin.git

QQ录屏20220904205517

访问:http://sunset-midnight/wp-content/plugins/malicious/wetw0rk_maybe.php,即可连接反弹shell

或者/wp-content/plugins/malicious/QwertyRocks.php

image-20220904205914558

查看wp-config.php

切换到jose用户

image-20220904210456110

查找suid

提权

查看flag

image-20230208160628254

最后更新于

这有帮助吗?