We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66c1dac commit f7fd84bCopy full SHA for f7fd84b
modules/exploits/linux/local/udev_persistence.rb
@@ -60,7 +60,7 @@ def get_command
60
def exploit
61
@payload_path = datastore['PAYLOAD_PATH'].blank? ? '/usr/bin/' + Rex::Text.rand_text_alphanumeric(8) : datastore['PAYLOAD_PATH']
62
63
- @backdoor_path = datastore['BACKDOOR_PATH'].blank? ? '/lib/udev/rules.d/' + Rex::Text.rand_text_alphanumeric(8) + '.rules' : datastore['BACKDOOR_PATH']
+ @backdoor_path = datastore['BACKDOOR_PATH'].blank? ? '/lib/udev/rules.d/' + Rex::Text.rand_text_numeric(2) + '-' + Rex::Text.rand_text_alphanumeric(8) + '.rules' : datastore['BACKDOOR_PATH']
64
65
unless writable? File.dirname(@backdoor_path)
66
fail_with Failure::BadConfig, "#{@backdoor_path} is not writable"
0 commit comments