File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
documentation/modules/exploit/linux/persistence
modules/exploits/linux/persistence Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Verified on Ubuntu 22.04 and 18.04 desktop with Gnome
1010
11111 . Start ` msfconsole `
12122 . Get a Meterpreter session
13- 3 . ` use exploit/linux/local/bash_profile_persistence `
13+ 3 . ` use exploit/linux/persistence/bash_profile `
14144 . ` set SESSION [SESSION] `
15155 . ` run `
16166 . On victim, open a new Bash terminal
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ def profile_path
8383 end
8484
8585 def check
86+ print_warning ( 'Payloads in /tmp will only last until reboot, you want to choose elsewhere.' ) if datastore [ 'WritableDir' ] . start_with? ( '/tmp' )
8687 ppath = profile_path
8788
8889 # check that target Bash profile file exists
@@ -125,7 +126,7 @@ def install_persistence
125126 vprint_status ( 'Created Bash profile persistence' )
126127 print_good ( 'Payload will be triggered when target opens a Bash terminal' )
127128
128- @clean_up_rc << "rm #{ payload_path } \n "
129+ @clean_up_rc = "rm #{ payload_path } \n "
129130 @clean_up_rc << "upload #{ backup_profile_path } #{ ppath } "
130131 end
131132end
You can’t perform that action at this time.
0 commit comments