Metasploit把command shell转为meterpreter shell
获取command shell
使用metasploit工具,使用漏洞利用模块exploit/multi/samba/usermap_script拿到metasploitbale虚拟机的shell。(详细请点击)
这里的shell是普通的command shell
shell转换
ctrl+Z,选择y,则将当前shell放到后台。
输入sessions -l(小写的L)查看当前活跃的sessions
是刚才挂起的metasploitable的shell,当前的session id是2,执行下图命令
use post/multi/manage/shell_to_meterpreter
再次输入sessions -l 查看后台的sessions
多了一个Id为3的meterpreter shell,输入session -i 3,调用Id为3的shell,至此转换成功。