rapid7 / metasploit-framework

Metasploit Framework
https://www.metasploit.com/
Other
34.07k stars 13.95k forks source link

Msfconsole won't open #8956

Closed MrRedPushTRedButton closed 7 years ago

MrRedPushTRedButton commented 7 years ago

Steps to reproduce

How'd you do it?

  1. All I did was an apt-get update and an apt-get upgrade Afterward I started receiving errors.

This section should also tell us any relevant information about the environment; for example, if an exploit that used to work is failing, tell us the victim operating system and service versions.

Expected behavior

What should happen?

When running msfconsole it should open the metasploit shell.

Current behavior

What happens instead?

When I run msfconsole in the shell it comes up with the error below:

root:~# msfconsole
/usr/share/metasploit-framework/lib/msf/core/payload/android.rb:98:in `generate_jar': android/meterpreter.dex not found (RuntimeError)
    from /usr/share/metasploit-framework/modules/payloads/singles/android/meterpreter_reverse_tcp.rb:44:in `generate_jar'
    from /usr/share/metasploit-framework/lib/msf/core/payload/android.rb:38:in `generate'
    from /usr/share/metasploit-framework/lib/msf/core/payload.rb:204:in `size'
    from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:91:in `block in recalculate'
    from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:78:in `each_pair'
    from /usr/share/metasploit-framework/lib/msf/core/payload_set.rb:78:in `recalculate'
    from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:251:in `block in load_modules'
    from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:248:in `each'
    from /usr/share/metasploit-framework/lib/msf/core/modules/loader/base.rb:248:in `load_modules'
    from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:119:in `block in load_modules'
    from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:117:in `each'
    from /usr/share/metasploit-framework/lib/msf/core/module_manager/loading.rb:117:in `load_modules'
    from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:41:in `block in add_module_path'
    from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in `each'
    from /usr/share/metasploit-framework/lib/msf/core/module_manager/module_paths.rb:40:in `add_module_path'
    from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:50:in `block in init_module_paths'
    from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in `each'
    from /usr/share/metasploit-framework/lib/msf/base/simple/framework/module_paths.rb:49:in `init_module_paths'
    from /usr/share/metasploit-framework/lib/msf/ui/console/driver.rb:219:in `initialize'
    from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in `new'
    from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:62:in `driver'
    from /usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
    from /usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
    from /usr/bin/msfconsole:48:in `<main>'

System stuff

Metasploit version

Get this with the version command in msfconsole (or git log -1 --pretty=oneline for a source install).

I installed Metasploit with:

It was pre-installed with the Kali OS.

OS

What OS are you running Metasploit on? Kali Linux Kali GNU/Linux Rolling \n \l

busterb commented 7 years ago

Looks like a file is missing from Kali's package, but it is not missing in our nightly installer packages or in master. Kali Linux is responsible for packaging and QA for Metasploit on that distribution. I would suggest raising the issue on the Kali linux bug tracker. Thanks!

busterb commented 7 years ago

Hmm, I just upgraded my copy of Kali and it works fine. I'd suggest you do a full Kali upgrade first: 'sudo apt dist-upgrade' - in case your dependencies are way out of date elsewhere.

MrRedPushTRedButton commented 7 years ago

Thank you for the suggestion.

I did already try that earlier and just now to no avail.

I will go ahead and raise the issue on the Kali linux bug tracker.

busterb commented 7 years ago

Do dpkg -l |grep metasploit-framework

I have:

ii  metasploit-framework                                             4.16.6-0kali1                     amd64        Framework for exploit development and vulnerability research

Maybe you got a bad package? Did you perhaps run out of disk space and the package was not able to fully unpack?

MrRedPushTRedButton commented 7 years ago

I came up with the exact same result as you.

h00die commented 7 years ago

Just updated and had same result as @busterb on my Kali as well.

busterb commented 7 years ago

you might try: apt clean followed by apt install --reinstall metasploit-framework

gc9n commented 6 years ago

for guys like me searching for solution.. Close your AntiVirus and try again!

Ranjeet20 commented 6 years ago

my metsaploit is not working...what can I do....any one please help

bcoles commented 6 years ago

@Ranjeet20 This issue is closed. Please create a new issue with more information. not working is not enough information for us to help. Consider also dropping by the IRC or Slack channels.

fallenreaper commented 6 years ago

I was having some issues myself, it took me some time, but it seems I resolved this issue with the following commands:

apt update
apt upgrade
apt clean
apt install --reinstall metasploit-framework

This will take some time and upgrade will require some user input. I allowed it to toggle services, but everything else I just ran the default value, usually N

mind you, if you have any shared folders across Host/VM and you would need to reset that up.

UPDATE: Just reinstalling the msf framework should work. You dont need to do a full upgrade. You may need to re set up folder sharing permissions on the VM if you use it that way, and you may need to check pregressql to make sure that service is running (so msfconsole can properly run)

SphiwokuhleS commented 6 years ago

Using nethunter and apt clean aint even working

fallenreaper commented 6 years ago

@sphiwokuhleS, I haven't used nethunter yet, but is it related to this msfconsole bug? I believe it is outside the scope. If it isn't please add more info.

SphiwokuhleS commented 6 years ago

@fallenreaper i'm having this msfconsole bug on my nethunter device, my msf started working when i started my postgresql service

fallenreaper commented 6 years ago

Good to know. On Jul 18, 2018 17:32, "SphiwokuhleS" notifications@github.com wrote:

@fallenreaper https://github.com/fallenreaper i'm having this msfconsole bug on my nethunter device, my msf started working when i started my postgresql service

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/rapid7/metasploit-framework/issues/8956#issuecomment-406081083, or mute the thread https://github.com/notifications/unsubscribe-auth/AATP5_UB02OpNf90eyJNBBURaia_Wnydks5uH6mKgaJpZM4PVK3X .

SphiwokuhleS commented 6 years ago

Actually starting postgres doesn't help, it was just luck, bugs are back

spawankumar commented 6 years ago

Hope this post helps https://kb.help.rapid7.com/discuss/5b351dd0c6901e0003deb559

0x00eh commented 4 years ago

$ sudo msfconsole

ASMFahim71 commented 4 years ago

I'm facing the same problem! any solution?

Wolverinepb007 commented 4 years ago

image Can anyone help me woth this one!!

bcoles commented 4 years ago

@Wolverinepb007 disable your anti-virus software and reinstall Metasploit.

Wolverinepb007 commented 4 years ago

still having the same issue after reinstalling

Muxitdinovich commented 1 year ago

help

yoinkas commented 6 months ago

git log -1 --pretty=oneline for a source install

smart guy thanks for the help!!