[bug report] bind_shell/reverse_shell will drop privilege in some cases
Closed this issue · 2 comments
bash-c commented
Both bind_shell and reverse_shell will execute /bin/sh
for an interactive shell, however, sh
in some cases will drop privilege.
Add the following snippet will fix this
if geteuid() == 0:
setresuid(0, 0, 0);
setresgid(0, 0, 0);
spawn /bin/sh and others