Skip to content

Commit a9fa1b6

Browse files
author
zerosum0x0
committed
catch TypeError for matched pairs Frag leak
1 parent bbeccdd commit a9fa1b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/msf/core/exploit/smb/client/psexec_ms17_010.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,11 @@ def find_accessible_named_pipe()
311311

312312
# todo: spice it up with EternalSynergy output
313313
def exploit_matched_pairs(pipe_handle)
314-
leak_frag_size(pipe_handle.file_id)
314+
begin
315+
leak_frag_size(pipe_handle.file_id)
316+
rescue TypeError => e
317+
raise MS17_010_Error 'TypeError leaking initial Frag size, is the target patched?'
318+
end
315319

316320
# we have all info for offsets now
317321
#@ctx = @ctx.merge(OS_ARCH_INFO[@ctx['os']][@ctx['arch']])

0 commit comments

Comments
 (0)