Skip to content

Commit b894050

Browse files
committed
Fix local/pxeexploit datastore
1 parent 9e71708 commit b894050

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

modules/exploits/windows/local/pxeexploit.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ def initialize
4747
],
4848
'Privileged' => true,
4949
'Stance' => Msf::Exploit::Stance::Passive,
50-
'DefaultTarget' => 0
50+
'DefaultTarget' => 0,
51+
'DefaultOptions' => {
52+
'FILENAME' => 'update1',
53+
'SERVEONCE' => true # once they reboot; don't infect again - you'll kill them!
54+
}
5155
)
5256

5357
register_options(
@@ -57,7 +61,8 @@ def initialize
5761

5862
register_advanced_options(
5963
[
60-
OptString.new('TFTPROOT', [ false, 'The TFTP root directory to serve files from' ]),
64+
OptString.new('TFTPROOT', [ false, 'The TFTP root directory to serve files from',
65+
File.join(Msf::Config.data_directory, 'exploits', 'pxexploit')]),
6166
OptString.new('SRVHOST', [ false, 'The IP of the DHCP server' ]),
6267
OptString.new('NETMASK', [ false, 'The netmask of the local subnet', '255.255.255.0' ]),
6368
OptBool.new('RESETPXE', [ true, 'Resets the server to re-exploit already targeted hosts', false ]),
@@ -67,12 +72,6 @@ def initialize
6772
end
6873

6974
def exploit
70-
if not datastore['TFTPROOT']
71-
datastore['TFTPROOT'] = File.join(Msf::Config.data_directory, 'exploits', 'pxexploit')
72-
end
73-
datastore['FILENAME'] = "update1"
74-
datastore['SERVEONCE'] = true # once they reboot; don't infect again - you'll kill them!
75-
7675
# Prepare payload
7776
print_status("Creating initrd")
7877
initrd = IO.read(File.join(Msf::Config.data_directory, 'exploits', 'pxexploit','updatecustom'))

0 commit comments

Comments
 (0)