Metasploit-framework: msfconsole throwing error after installing

Created on 9 Apr 2016  路  8Comments  路  Source: rapid7/metasploit-framework

Steps to reproduce

How'd you do it?

  1. ...
  2. ...

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?
root@debian-pentest:~# msfconsole

Metasploit Park, System Security Interface
Version 4.0.5, Alpha E
Ready...

access security
access: PERMISSION DENIED.
access security grid
access: PERMISSION DENIED.
access main security grid
access: PERMISSION DENIED....and...
YOU DIDN'T SAY THE MAGIC WORD!
YOU DIDN'T SAY THE MAGIC WORD!
YOU DIDN'T SAY THE MAGIC WORD!
YOU DIDN'T SAY THE MAGIC WORD!
YOU DIDN'T SAY THE MAGIC WORD!
YOU DIDN'T SAY THE MAGIC WORD!
YOU DIDN'T SAY THE MAGIC WORD!

   =[ metasploit v4.11.21-dev-16c599866cd501d0c619ce12248a2b0127ceaf93]
  • -- --=[ 1530 exploits - 893 auxiliary - 264 post ]
  • -- --=[ 436 payloads - 38 encoders - 8 nops ]
  • -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

/opt/metasploit-framework/embedded/lib/ruby/gems/2.1.0/gems/activesupport-4.0.13/lib/active_support/core_ext/kernel/agnostics.rb:7:in ': Cannot allocate memory - infocmp (Errno::ENOMEM) from /opt/metasploit-framework/embedded/lib/ruby/gems/2.1.0/gems/activesupport-4.0.13/lib/active_support/core_ext/kernel/agnostics.rb:7:in'
from /opt/metasploit-framework/embedded/lib/ruby/gems/2.1.0/gems/rb-readline-r7-0.5.2.0/lib/rbreadline.rb:1815:in get_term_capabilities' from /opt/metasploit-framework/embedded/lib/ruby/gems/2.1.0/gems/rb-readline-r7-0.5.2.0/lib/rbreadline.rb:2027:in_rl_init_terminal_io'
from /opt/metasploit-framework/embedded/lib/ruby/gems/2.1.0/gems/rb-readline-r7-0.5.2.0/lib/rbreadline.rb:2519:in readline_initialize_everything' from /opt/metasploit-framework/embedded/lib/ruby/gems/2.1.0/gems/rb-readline-r7-0.5.2.0/lib/rbreadline.rb:3804:inrl_initialize'
from /opt/metasploit-framework/embedded/lib/ruby/gems/2.1.0/gems/rb-readline-r7-0.5.2.0/lib/rbreadline.rb:4823:in readline' from /opt/metasploit-framework/embedded/framework/lib/rex/ui/text/input/readline.rb:132:inreadline_with_output'
from /opt/metasploit-framework/embedded/framework/lib/rex/ui/text/input/readline.rb:86:in pgets' from /opt/metasploit-framework/embedded/framework/lib/rex/ui/text/shell.rb:187:inrun'
from /opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/console.rb:48:in start' from /opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/base.rb:82:instart'
from /opt/metasploit-framework/bin/../embedded/framework/msfconsole:48:in `

'

Current behavior

What happens instead?

You might also want to check the last ~1k lines of
/opt/metasploit/apps/pro/engine/config/logs/framework.log or
~/.msf4/logs/framework.log for relevant stack traces

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:

  • [ ] Kali package via apt
  • [x] Omnibus installer (nightly)
  • [ ] Commercial/Community installer (from http://www.rapid7.com/products/metasploit/download.jsp)
  • [ ] Source install (please specify ruby version)

    OS

What OS are you running Metasploit on?

ubuntu 14

Most helpful comment

You probably installed Metasploit on a system without enough memory. Create some swap space and try running msfconsole again.
Follow this guide:
https://www.optiv.com/blog/create-a-budget-friendly-virtual-private-server-with-a-metasploit-instance

He's using a DO droplet, but the steps to create swap space are the same. Follow the steps from this point "First Attempt at Running MSF (FAIL)".

All 8 comments

You probably installed Metasploit on a system without enough memory. Create some swap space and try running msfconsole again.
Follow this guide:
https://www.optiv.com/blog/create-a-budget-friendly-virtual-private-server-with-a-metasploit-instance

He's using a DO droplet, but the steps to create swap space are the same. Follow the steps from this point "First Attempt at Running MSF (FAIL)".

@AliBawazeEer Nice report, but @P5I is correct - the stacktrace indicates your environment has run out of memory, so you will need to change that on your end. This doesn't look like a bug in Framework, so I will go ahead and close this ticket. But if for some reason that's not the case, feel free to ping me and I will be more than happy to reopen. Thanks.

Hi all ,
this issue can be resolved , resolution swap file created

i have this error after install msf console
/opt/metasploit-framework/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/core_ext/kernel/agnostics.rb:7:in ': Cannot allocate memory - infocmp (Errno::ENOMEM) from /opt/metasploit-framework/embedded/lib/ruby/gems/2.4.0/gems/activesupport-4.2.10/lib/active_support/core_ext/kernel/agnostics.rb:7:in'
from /opt/metasploit-framework/embedded/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:1815:in get_term_capabilities' from /opt/metasploit-framework/embedded/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:2027:in_rl_init_terminal_io'
from /opt/metasploit-framework/embedded/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:2564:in readline_initialize_everything' from /opt/metasploit-framework/embedded/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:3849:inrl_initialize'
from /opt/metasploit-framework/embedded/lib/ruby/gems/2.4.0/gems/rb-readline-0.5.5/lib/rbreadline.rb:4868:in readline' from /opt/metasploit-framework/embedded/framework/lib/rex/ui/text/input/readline.rb:162:inreadline_with_output'
from /opt/metasploit-framework/embedded/framework/lib/rex/ui/text/input/readline.rb:100:in pgets' from /opt/metasploit-framework/embedded/framework/lib/rex/ui/text/shell.rb:189:inrun'
from /opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/console.rb:48:in start' from /opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/base.rb:82:instart'
from /opt/metasploit-framework/bin/../embedded/framework/msfconsole:48:in `

'

how can i fix

Please don't comment on closed tickets. If you read the first response above, I believe that will help find an answer for the ENOMEM your installation hit, @vicky121998.

ayn谋 hata bende de oldu yard谋m edebilecek var m谋?

Probleme: not enough swap space
Solution Create SWAP

free ## to check your swap space
cd /var/
ls
touch swap.img
chmod 600 s
chmod 600 swap.img
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img

Was this page helpful?
0 / 5 - 0 ratings

Related issues

miholtz picture miholtz  路  3Comments

Funeoz picture Funeoz  路  3Comments

0x27 picture 0x27  路  3Comments

adrianmihalko picture adrianmihalko  路  3Comments

verapex picture verapex  路  3Comments