Skip to content

Commit 856baf5

Browse files
authored
Merge pull request #4 from wvu-r7/pr/6934
Add setsid to persist the shell
2 parents cfb034f + ea988ea commit 856baf5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/exploits/linux/http/op5_config_exec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,9 @@ def execute_command(cmd, opts)
124124
fail_with(Failure::Unreachable, "#{peer} - Could not connect to the web service")
125125
end
126126
end
127+
128+
def on_new_session(session)
129+
super
130+
session.shell_command_token('setsid $SHELL')
131+
end
127132
end

0 commit comments

Comments
 (0)