Skip to content

Commit b0b979c

Browse files
committed
Meterpreter sessions won't get root in this way
1 parent a2ce2bf commit b0b979c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

modules/exploits/linux/antivirus/escan_password_exec.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,7 @@ def check
7878
def cmd_exec(session, cmd)
7979
case session.type
8080
when /meterpreter/
81-
process = session.sys.process.execute(cmd, nil, {'Hidden' => true, 'Channelized' => true})
82-
o = ""
83-
while (d = process.channel.read)
84-
break if d == ""
85-
o << d
86-
end
87-
process.channel.close
88-
process.close
81+
print_warning("#{peer} - Use a shell payload in order to get root!")
8982
when /shell/
9083
o = session.shell_command_token(cmd)
9184
o.chomp! if o

0 commit comments

Comments
 (0)