Skip to content

Commit 56c692f

Browse files
committed
example persistence cleanup updates
1 parent 2b249d5 commit 56c692f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/exploits/example_linux_persistence.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ def initialize(info = {})
6767
[ 'OSVDB', '12345' ],
6868
[ 'EDB', '12345' ],
6969
[ 'URL', 'http://www.example.com'],
70-
[ 'CVE', '1978-1234']
70+
[ 'CVE', '1978-1234'],
71+
['ATT&CK', Mitre::Attack::Technique::T1547_013_XDG_AUTOSTART_ENTRIES], # https://github.com/rapid7/metasploit-framework/pull/20289
7172
],
7273
'DisclosureDate' => '2023-11-29',
7374
# Note that DefaultTarget refers to the index of an item in Targets, rather than name.
@@ -114,8 +115,8 @@ def install_persistence
114115
else
115116
upload_and_chmodx backdoor, generate_payload_exe
116117
end
117-
# add removing the file to the cleanup script
118-
@clean_up_rc << "rm #{backdoor}\n"
118+
# add removing the file to the cleanup script. The script starts as nil, so we want to overwrite it to a string
119+
@clean_up_rc = "rm #{backdoor}\n"
119120

120121
# back up an example file that we're going to write into so we can restore it
121122
# in our cleanup efforts

0 commit comments

Comments
 (0)