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


对wordpress进行暴力破解,发现无法爆破。
于是爆破MySQL端口,找到账号密码:root/robert

查询wordpress的后台登录密码

不过无法破解到密码,于是直接更改密码的哈希的密码为password。
登录wordpress后台

在插件添加一句话木马

但是无法保存成功。

使用WordPress 木马插件
https://github.com/wetw0rk/malicious-wordpress-plugin.git

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

查看wp-config.php
切换到jose用户

查找suid
提权
查看flag

最后更新于
这有帮助吗?