• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

War Room

Shells From Above

RSM logo

  • Home
  • About
  • Blog
  • Talks/Whitepapers
  • Tools
  • Recreation
Home > Offense > Launch rdesktop from Metasploit

Launch rdesktop from Metasploit

October 26, 2015 By RSM Author

I often resort to remote desktop sessions when pillaging or attempting lateral escalation.  Remote desktop provides an easy way to look for important data, get an idea of what applications are in use, run scripts or programs, and transfer data between my host and the target system.  Since the Windows “Remote Desktop Connection” program keeps track of IP addresses and makes it easy to redirect local resources to the remote machine, I tend to default towards using it.

However, my Metasploit database also keeps track of target IP addresses, not to mention credentials I’ve acquired and hosts running RDP.  Therefore, it occurred to me that using metasploit to launch the Linux rdesktop client would be an easy way to facilitate gui-based pillaging without leaving the comfort of the console.  Hence the launch_rdesktop module:

The module is a simple wrapper for rdesktop.  If you have rdesktop installed, the module should be able to find it on its own.  It requires an IP address and can take a domain, username, and password as arguments as well.  It also supports redirecting a local disk to the target system as a share via the LPATH option.

For a simple example of the module in use, let’s say I’m testing credentials I’ve obtained to see if and where they have administrative rights:

oct_blog_screen1

Finding a host, I’ll check the nmap results I imported previously to see if that system happens to be running RDP:

oct_blog_screen2

We’re in luck. Now I’ll pop over to the launch_rdesktop module.  Using the up arrow I can quickly re-enter most of the pertinent options from the smb_login module:

oct_blog_screen3

The module returns you to the msfconsole prompt but spawns a new process for rdesktop as seen below:

oct_blog_screen4

By allowing one to easily change select parameters via the options and being closer to the metasploit database, this module should expedite the process of making remote desktop connections and facilitate pillaging.  With so many organizations using remote desktop and sharing credentials, speeding up that process can be a valuable time saver.

Thanks to steiner for helping make the code clean and efficient.

 

RSM Author

Primary Sidebar

Categories

  • Defense
  • Forensics
  • Offense
  • Physical
  • R&D

Most Viewed Posts

  • DLL Injection Part 1: SetWindowsHookEx 11.1k views
  • Sophos UTM Home Edition – 3 – The Setup 10.9k views
  • Leveraging MS16-032 with PowerShell Empire 10.1k views
  • Bypassing Gmail’s Malicious Macro Signatures 10k views
  • How to Bypass SEP with Admin Access 9.1k views

Footer

  • Facebook
  • LinkedIn
  • Twitter
  • Tools
  • About
  • RSM US LLP

(312) 634-3400

30 S. Wacker Drive Suite 3300
Chicago, IL 60606

Copyright © 2026 RSM US LLP. All rights reserved. RSM US LLP is a limited liability partnership and the U.S. member firm of RSM International, a global network of independent audit, tax and consulting firms. The member firms of RSM International collaborate to provide services to global clients, but are separate and distinct legal entities that cannot obligate each other. Each member firm is responsible only for its own acts and omissions, and not those of any other party. Visit for more information regarding RSM US LLP and RSM International.