我正在写一个脚本来自动化metasploit现在我的脚本工作得很好,直到我需要在终端上运行命令,但当我尝试运行我必须在metasploit控制台中执行的命令时,脚本将停止,直到我手动退出控制台,然后它将从下一行继续运行。
当您运行metasploit时,它会在终端中打开一个控制台(msfconsole),您可以在其中运行命令。
如何在脚本中添加特定命令以在控制台内运行??
以下是我要运行的命令:
msfconsole (this command starts the metasploit console, this command works fine in the script)
searc
使用windows/smb/ as 08_067_netapi和windows/meterpreter/反向_tcp作为有效负载,这就是我得到的:
msf payload(reverse_tcp) > generate -f ~/Desktop/rootkit.exe -p windows -t exe
[*] Writing 73802 bytes to ~/Desktop/rootkit.exe...
[-] Error while running command generate: No such file or directory @ rb_sysopen - ~/Desktop
我开始阅读一本metasploit指南,所以我在VirtualBox中设置了2台用于笔试的机器(主机- BT 5,第二台- WinXP SP2)。当我m trying to scan open ports with NMAP on the Windows machine, it appears that all ports are closed, even if I turn off the Firewall. I试图通过网络连接中心打开SMB端口时,它也没有帮助。为什么所有的端口都关闭了,我如何打开其中的一些端口(至少是最常见的- SMB、HTTP等)?
编辑:这两台机器在NAT (10.0
我正在尝试在OS X Yosemite上安装Metasploit框架,同时运行bundle install,安装程序在尝试安装metasploit-framework -v '4.10.1.pre.dev‘时卡住了。
当我自己运行gem install metasploit-framework -v '4.10.1.pre.dev'时,我得到了这个错误:
ERROR: Could not find a valid gem 'metasploit-framework' (= 4.10.1.pre.dev) in any repository
ERROR:
我是黑客的初学者。我一直试图使用metasploit中的netapi漏洞攻击Windows XP,但每次最后,我都会得到一个错误:
Exploit failed [unreachable]: Rex::ConnectionRefused The connection was refused
Exploit completed but no session was created.
我甚至试着关闭防火墙,尝试用kali打开我的XP机器,它做得很好。有人能帮我解决这个问题吗?
我正在遵循这个指南。
我是这样做的:
cd /opt
git clone https://github.com/rapid7/metasploit-framework.git
cd metasploit-framework
当我在做:
git clone https://github.com/rapid7/metasploit-framework.git
我得到了以下错误:
fatal: could not create work tree dir 'metasploit-framework'.: Permission denied
我正在扫描一台打开UDP端口161的机器,在返回时我无法对它运行snmpwalk,因为返回时会出现错误:
Timeout: No Response from <IP>
我试着运行onesixtyone工具,用不同的单词列表野蛮地使用社区字符串,但没有成功。
在这种情况下还有什么可以做的吗?是否有其他方式猜测社区字符串,以便能够与snmpwalk一起使用它?
这是我的第一篇文章,所以我可能会把格式弄错。无论如何,在网上搜索了一个解决方案(我找不到)后,我求助于在这里询问。
在几天前启动我的msfconsole时,我开始收到所有这些以前没有显示的警告/错误。
$ sudo msfconsole
[!] The following modules could not be loaded!..\
[!] /usr/share/metasploit-framework/modules/auxiliary/scanner/msmail/host_id.go
[!] /usr/s
我在使用termux安装metasploit时,它显示:
~ $ ls <br>
metasploit-framework storage wiki-termux<br>
~ $ cd metasploit-framework<br>
~/metasploit-framework $ ruby msfconsole<br>
Could not find Ascii85-1.1.0 in any of the sources<br>
Run bundle install to install missing gems.<br&