对于图形交互界面的msf我个人不是很习惯,但是msf终端对于新手来说友好性还是差了很多,但是我还是决定从msf终端入手,但是要细心:Festinatione facit vastum。 溯回传送门
root@kali:~# msfconsole
Failed to connect to the database: could not connect to server: Connection refused Is the server running on host xxxxxxxx.
在msf控制台输入:
msf > help search
查看所有帮助:命令、命令参数等。
针对Linux metasploittable靶机环境中存在的Samba服务漏洞进行渗透攻击测试。 1、首先使用search命令,从Metasploit众多强大的渗透代码库中找到攻击Samba服务的模块:
msf > search samba
2、从中找到针对usermap_script安全漏洞的渗透攻击模块名称为multi/samba/usermap_script,然后运行:
msf > use multi/samba/usermap_script
3、输入show payload查看与该渗透攻击模块相兼容的攻击载荷。执行set payload cmd/unix/bind_netcat选择bind_netcat,即使用netcat工具在渗透攻击成功后执行Shell,并通过netcat绑定在一个监听端口。再选择show options来查看需要设置哪些参数,具体操作如下:
4、一键开始,在设定好所有参数后,输入以下命令开始:
msf exploit(usermap_script) > exploit