Getting ready

  • The enumdesktops command will list all the accessible desktops and window stations:
meterpreter > enumdesktopsEnumerating all accessible desktops Desktops======== Session Station Name------- ------- ----0      WinSta0  Default0      WinSta0  Disconnect0      WinSta0  Winlogon

Here, you can see that all the available desktop stations are associated with session 0. We will see in a while exactly what we mean by session 0.

  • The getdesktop command returns the information of the current desktop in which our Meterpreter session is working:
meterpreter > getdesktopSession 0\S\D

You can relate the output of the getdesktop command with enumdesktops to understand more about the current desktop station in which we are working.

  • The setdesktop command ...

Get Metasploit Penetration Testing Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.