端口扫描

对其进行端口扫描nmap -Pn -sV 10.11.1.8

Pasted_image_20240731210731.png

为了省事,直接routescan直接扫描常见的几个端口
Pasted_image_20240731210824.png

WEB端口

发现存在web端口,那就看看是什么样子。

Pasted_image_20240731211018.png

主页是一个静态页面,通过访问robots.txt文件,发现2个目录
Pasted_image_20240731211059.png

其中,tmp目录不存在,internal页面也是一个静态页面。
Pasted_image_20240731211135.png

评论处好像也不存在注入之类的:
Pasted_image_20240731211204.png

FTP

直接nc访问ftp端口试一试:

Pasted_image_20240731211245.png

vsftpd 2.0.1的版本,尝试2.3.4版本的后门漏洞(笑脸漏洞:任意用户名后加 
Pasted_image_20240731211353.png
 字符串::)会开启6200端口)进行攻击。
参考连接 https://www.exploit-db.com/exploits/49757 (发现不行,不存在漏洞)
Pasted_image_20240731211549.png

好在存在匿名登陆。如下:
Pasted_image_20240731211751.png

最后却无法显示列表,此路不通!

MYSQL

检测mysql常见的漏洞,同样不存在任何漏洞

Pasted_image_20240731211839.png

再次?

重写一次扫描端口,这次发现了631端口,直接访问为403状态码

Pasted_image_20240731211953.png

Pasted_image_20240731212028.png

重新审视80端口,发现评论是使用的Advanced Comment System 系统,管理后台路径 /internal/advanced_comment_system/admin.php
Pasted_image_20240731212123.png

默认是admin密码,但是没啥用。
通过搜索引擎发现相关漏洞 https://packetstormsecurity.com/files/165108/Advanced-Comment-System-1.0-Remote-Command-Execution.html
可以执行命令:
Pasted_image_20240731212206.png

提权

搜索suid权限程序有没有问题

Pasted_image_20240731212246.png

通过反弹shell进行
Pasted_image_20240731212323.png

Pasted_image_20240731212351.png

通过查看内核版本,发现内核版本在脏牛漏洞范围内
Pasted_image_20240731212613.png

使用内核漏洞进行提权 https://www.exploit-db.com/exploits/9542
其中,目标系统glibc版本太低,在网上下载了centos 4.8的系统镜像进行编译
编译后的文件: https://github.com/wrysunny/Linux-Kernel-2.6-2.6.19-Ring0-Privilege-Escalation
使用base64进行编码,然后使用php的base64_decode进行解码写文件
Pasted_image_20240731212455.png

Pasted_image_20240731212539.png

获取到了proof.txt及其内容 f56a325ef00d4553a4046b7eacc5d667
Pasted_image_20240731212646.png