如何在 Ubuntu 中安装 metasploit 和 armitage?

如何在 Ubuntu 中安装 metasploit 和 armitage?

我在使用 Armitage 和 Metasploit 时遇到了问题。我尝试使用以下命令来安装它们

sudo nano /etc/apt/sources.list

然后粘贴此并保存列表

deb http://
http.kali.org/kali kali main non-free contrib

deb http://
security.kali.org/kali-security kali/updates main contrib non-free

deb-src http://
http.kali.org/kali kali main non-free contrib
deb-src http://
security.kali.org/kali-security kali/updates main contrib

然后我用

sudo apt-get update
sudo apt-get install armitage

一切都顺利完成了。Armitage 运行良好,metasploit 也运行良好,但我不知道我做了什么,我无法再次启动它们,所以我尝试更新并再次安装它们,但我遇到了这个问题

Reading package lists... Done
Building dependency tree       
Reading state information... Done
armitage is already the newest version.
The following packages were automatically installed and are no longer required:
  kde-l10n-ar kde-l10n-engb
Use 'apt-get autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 310 not to upgrade.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up metasploit (4.11.2-2015051401-1kali0) ...
 * Starting Metasploit rpc server prosvc                                                                                 [ OK ] 
 * Starting Metasploit web server thin                                                                                          /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find rake-10.4.2 in any of the sources (Bundler::GemNotFound)
    from /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler/spec_set.rb:85:in `map!'
    from /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler/spec_set.rb:85:in `materialize'
    from /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler/definition.rb:132:in `specs'
    from /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler/definition.rb:177:in `specs_for'
    from /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler/definition.rb:166:in `requested_specs'
    from /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler/environment.rb:18:in `requested_specs'
    from /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler/runtime.rb:13:in `setup'
    from /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler.rb:122:in `setup'
    from /var/lib/gems/1.9.1/gems/bundler-1.9.9/lib/bundler/setup.rb:18:in `<top (required)>'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:30:in `start_thin'
    from /opt/metasploit/apps/pro/ui/scripts/ctl.rb:47:in `<main>'
invoke-rc.d: initscript metasploit, action "start" failed.
dpkg: error processing package metasploit (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of armitage:
 armitage depends on metasploit; however:
  Package metasploit is not configured yet.

dpkg: error processing package armitage (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                                                                                                            Errors were encountered while processing:
 metasploit
 armitage
E: Sub-process /usr/bin/dpkg returned an error code (1)

我该如何修复它?

注意:我的 Linux 版本是 Ubuntu 14.0.4 64 位

答案1

首先,正如人们已经说过的,不要混合存储库!

因此首先重新安装 Ubuntu,然后这里是 armitage 的链接。

http://www.fastandeasyhacking.com/download/<-- 这是他们的网站,下载.tgz 版本,因为它是 Linux 版本。

在执行任何操作之前,请安装 Java

sudo apt install openjdk-8-jdk

打开它,里面有一个名为“armitage”的文件,打开终端并转到文件夹所在的部分。然后输入./armitage

这应该运行该程序。

对于 metasploit,你可以下载它来自我的 Dropbox

要安装它,只需进入文件夹并运行

chmod +x metasploit-latest-linux-x64-installer.run

进而

./metasploit-latest-linux-x64-installer.run

您可能需要拥有 sudo 权限才能使其正常工作。

答案2

不建议使用其他发行版的软件包,但是我发现了一个关于如何在 Debian 和 Ubuntu 上安装它们的很好的教程,我真的必须推荐: http://www.darkoperator.com/

github 上还有一个 katoolin 脚本:

https://github.com/LionSec/katoolin

谨慎使用!再次强调不是建议使用其他发行版的任意存储库

相关内容