Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msfconsole won't open #8956

Closed
MrRedPushTRedButton opened this issue Sep 12, 2017 · 24 comments
Closed

Msfconsole won't open #8956

MrRedPushTRedButton opened this issue Sep 12, 2017 · 24 comments

Comments

@MrRedPushTRedButton
Copy link

MrRedPushTRedButton commented Sep 12, 2017

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
Copy link
Member

busterb commented Sep 12, 2017

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 busterb closed this as completed Sep 12, 2017
@busterb
Copy link
Member

busterb commented Sep 12, 2017

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
Copy link
Author

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
Copy link
Member

busterb commented Sep 12, 2017

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
Copy link
Author

I came up with the exact same result as you.

@h00die
Copy link
Contributor

h00die commented Sep 12, 2017

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

@busterb
Copy link
Member

busterb commented Sep 13, 2017

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

@gc9n
Copy link

gc9n commented May 18, 2018

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

@Ranjeet20
Copy link

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

@bcoles
Copy link
Contributor

bcoles commented Jun 29, 2018

@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
Copy link

fallenreaper commented Jun 30, 2018

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
Copy link

Using nethunter and apt clean aint even working

@fallenreaper
Copy link

@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
Copy link

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

@fallenreaper
Copy link

fallenreaper commented Jul 18, 2018 via email

@SphiwokuhleS
Copy link

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

@spawankumar
Copy link

@0x00eh
Copy link

0x00eh commented Feb 8, 2020

$ sudo msfconsole

@ASMFahim71
Copy link

I'm facing the same problem!
any solution?

@Wolverinepb007
Copy link

image
Can anyone help me woth this one!!

@bcoles
Copy link
Contributor

bcoles commented Jul 18, 2020

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

@Wolverinepb007
Copy link

still having the same issue after reinstalling

@Muxitdinovich
Copy link

help

@yoinkas
Copy link

yoinkas commented Apr 6, 2024

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

smart guy thanks for the help!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests