Skip to content
WETNav

Lateral movement · Windows

mstsc.exe

Remote Desktop Connection client

The Remote Desktop client. Launching it, especially with a saved credential or an .rdp file, is part of interactive lateral movement across hosts.

Legitimate use

Used daily to connect to remote desktops and servers.

Worst caseMedium

Switches

/v<value>

The server to connect to (/v:host).

Low
/admin

Connects to the admin session of the server.

Low
/restrictedadmin

Connects without sending credentials to the host. Can be used to pass a hash to RDP.

Medium
/f

Starts full screen.

Info
/multimon

Uses multiple monitors.

Info

Command lines to worry about

  • Medium

    RDP in Restricted Admin mode

    Restricted Admin mode does not send a password, which allows pass-the-hash to RDP. Legitimate for some admin setups, so confirm the account and source.

    Detection regexmstsc(\.exe)?\s+.*\/restrictedadmin\b

    T1021.001T1550.002

Where it is recorded

  • Security4688Process creation with the full command line, when command-line auditing is enabled.
  • Sysmon1Process creation with command line, hashes and parent process.
  • Security4624Logon Type 10 on the target for the RDP session.
  • RDP connections1149RDP connection authenticated, with the source user and address, on the target.
  • RDP client1024Outbound RDP connection attempt logged on the source host, naming the target.

Community detections

4 SigmaHQ rules for mstsc.exe. The explainer checks every pasted command line against all of them.

  • High
    Mstsc.EXE Execution From Uncommon Parent

    Detects potential RDP connection via Mstsc using a local ".rdp" file located in suspicious locations.

    by Nasreddine Bencherchali (Nextron Systems)

  • High
    Suspicious Mstsc.EXE Execution With Local RDP File

    Detects potential RDP connection via Mstsc using a local ".rdp" file located in suspicious locations.

    T1219.002by Nasreddine Bencherchali (Nextron Systems)

  • Medium
    New Remote Desktop Connection Initiated Via Mstsc.EXE

    Detects the usage of "mstsc.exe" with the "/v" flag to initiate a connection to a remote server. Adversaries may use valid accounts to log into a computer using the Remote Desktop Protocol (RDP). The adversary may then perform actions as the logged-on user.

    T1021.001by frack113

  • Low
    Mstsc.EXE Execution With Local RDP File

    Detects potential RDP connection via Mstsc using a local ".rdp" file

    T1219.002by Nasreddine Bencherchali (Nextron Systems), Christopher Peacock @securepeacock

Rules from SigmaHQ (rules/windows/process_creation), Detection Rule License (DRL) 1.1. Each rule links to its source and credits its authors.