Skip to content
Deep dive into RustDesk RMM Investigation & Forensics on Windows

Deep dive into RustDesk RMM Investigation & Forensics on Windows

January 29, 2026Digital Forensics
Author
Chicken0248
Published
January 29, 2026
Originally on
Medium ↗
Category
Digital Forensics
Introduction

Hello everyone, it's me Chicken0248 again. In this blog I'll share my research on investigating RustDesk RMM, covering its normal behavior, installation artifacts, CLI capabilities, connection forensics, file transfer investigation, and configuration decryption.

RustDesk is an open-source cross-platform remote desktop software written in Rust that also offers self-hosting capability. It allows users to remotely control another device over a network by specifying the target device's ID. Because it is cross-platform, the remote device does not need to run the same OS, as long as RustDesk is installed and running with the correct ID provided, a remote session can be established regardless of the OS.

Dr.Web research: fraudsters use remote administration software to steal money
Fraudsters steal money using remote administration software, Dr.Web research

Since RustDesk is practically free, easy to use, and reliable, it can be abused for initial access by scammers and in some cases for persistence. There are documented cases of fraudsters tricking users into installing RustDesk to steal money and sensitive data, making RustDesk forensics knowledge valuable for any investigator.

RustDesk GitHub releases page with scammer disclaimer
RustDesk GitHub releases, open source, CLI-downloadable; developers added a scammer disclaimer

Being open source, RustDesk is available on its GitHub releases page and downloadable via CLI, perfect for automation scripts. Both EXE (32-bit) and MSI (64-bit) installers are available for Windows, and this blog covers both.

Terminology

Key terms used throughout this blog:

TermDefinition
Remote deviceThe device that requests a connection to take control over another device, in this research, Kali Linux
End deviceThe local device that accepts a connection request, in this research, Windows VM
IDThe unique identifier for each RustDesk instance, required to establish connections between devices
Examining RustDesk Usage and Behavior

This blog focuses on RustDesk's core functionality relevant to DFIR analysis, not a full feature guide.

Basic Behavior and File Metadata

RustDesk x86-64, x86-32, and MSI installer binaries
RustDesk Windows binaries downloaded from GitHub releases: x86-64, x86-32, and MSI installer

The metadata of RustDesk binaries contains the product name, file description, version, original filename, and copyright information.

RustDesk digitally signed by Open Source Developer Huabing Zhou
All RustDesk binaries are digitally signed by 'Open Source Developer, Huabing Zhou'

All examined binaries are digitally signed, with the signer listed as "Open Source Developer, Huabing Zhou".

MSI installer created with WiX Toolset, author PURSLANE
MSI installer metadata, created with WiX Toolset, author listed as 'PURSLANE'

The MSI installer was created using the WiX Toolset and lists "PURSLANE" as the author.

RustDesk UI showing device ID and one-time password
RustDesk UI, device ID and one-time password (OTP) displayed on launch

Once launched, RustDesk displays an ID and a one-time password (OTP). These can be used to access the target system without requiring manual acceptance. The forensic implications are discussed in the connections section.

AppData Local rustdesk directory created after launching
C:\\Users\\%username%\\AppData\\Local\\rustdesk, created after first launch, contains all required files

After launching, RustDesk creates C:\Users\%username%\AppData\Local\rustdesk containing all required files.

rustdesk.exe extracted to AppData Local and becomes primary binary
rustdesk.exe extracted to AppData\\Local\\rustdesk, becomes the primary binary for all operations

RustDesk then executes rustdesk.exe from C:\Users\%username%\AppData\Local\rustdesk. This directory is a key forensic artifact to determine if RustDesk was ever run on the system.

Log and Configuration Files

AppData Roaming RustDesk with config and log subdirectories
C:\\Users\\%username%\\AppData\\Roaming\\RustDesk, config and log subdirectories

RustDesk also creates a folder under C:\Users\%username%\AppData\Roaming, organized into config and log subdirectories.

RustDesk.toml containing encrypted unique ID, password, and salt
RustDesk.toml, unique ID stored encrypted with password and salt

The RustDesk.toml file in the config directory stores the device's unique ID in encrypted form with a corresponding password and salt. Decryption is covered in the final section.

Log directory with rustdesk_rCURRENT.log and PID-TID-timestamp files
Log directory, rustdesk_rCURRENT.log plus per-process files named by PID, TID, and UNIX timestamp

Once rustdesk.exe runs, a log file is created under the log directory. Additional configuration files are named using the PID, TID, and execution timestamp of the running instance.

rustdesk_rCURRENT.log with local timezone timestamps and component info
rustdesk_rCURRENT.log, main access log, timestamps in local timezone

rustdesk_rCURRENT.log is the primary log file. Events are timestamped in the system's local timezone and include which RustDesk component triggered each event. Compared to AnyDesk, RustDesk's logging is relatively limited.

RustDesk FAQ page showing log file locations per OS
RustDesk documentation, log file locations vary by operating system

Log file locations vary across operating systems per the RustDesk documentation.

Installation Behavior, EXE Installer

RustDesk installation via GUI or CLI requiring admin privileges
RustDesk installation requires administrator privileges, available via GUI or CLI

Installation requires administrator privileges. Default installation path: C:\Program Files\RustDesk (both EXE and MSI use the same path).

RustDesk_install.bat in TEMP running reg add, sc.exe, netsh, VBScript
RustDesk_install.bat in %TEMP%, performs reg add, sc.exe, netsh, and VBScript shortcut creation

During installation, RustDesk_install.bat is created in %TEMP% and executed. It performs:

  • reg add commands to create the RustDesk uninstall entry
  • Three VBScript files to create shortcuts: RustDesk_mk_shortcut.vbs, RustDesk_uninstall_shortcut.vbs, RustDesk_tray_shortcut.vbs
  • sc.exe to remove any existing service, create a new one (initial config phase), then create it again with --service flag for normal operation
  • netsh to add firewall rules for RustDesk.exe
HKCR registry key and netsh firewall rule created by installer
Installer creates HKCR registry key and netsh firewall rule

Two service creation events using the same service name occur during EXE installation, resulting in two Event ID 7045 entries.

Event ID 7045 Service Installed for RustDesk in System.evtx
System.evtx, Event ID 7045 (Service Installed) for RustDesk
Second Event ID 7045 during EXE installation
Two Event ID 7045 entries are expected during EXE installation (config import + normal service)
RustDesk Service in services.msc
'RustDesk Service' visible in services.msc
Tray icon shortcut in global startup folder
Tray icon shortcut created in global startup folder
install folder in AppData Roaming RustDesk
'install' folder in AppData\\Roaming\\RustDesk, confirms which user account performed the installation

The install folder created during installation is a key indicator for confirming which user account installed RustDesk on the device.

Installed File Structure

RustDesk installation directory contents
Installation directory, largely identical to portable version except for the Uninstall shortcut
Uninstall shortcut runs rustdesk.exe --uninstall
Uninstall shortcut executes rustdesk.exe --uninstall
LocalService AppData with RustDesk config from service context
LocalService account AppData, RustDesk log and config files created when running as a Windows service

When RustDesk runs as a Windows service, additional log and config files are created under the Local Service account at C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\.

MSI installer behavior: no batch scripts, direct registry, single Event ID 7045
MSI installer, direct registry modification, single Event ID 7045 (no batch scripts)

The MSI installer performs similar actions but modifies registry directly without batch scripts, producing only a single Event ID 7045.

Uninstall Behavior

RustDesk uninstall via shortcut or --uninstall flag
Uninstall via shortcut or rustdesk.exe --uninstall
RustDesk_uninstall.bat created in TEMP
RustDesk_uninstall.bat in %TEMP%, removes service, certificate, printer, registry entries, shortcuts

EXE uninstallation creates RustDesk_uninstall.bat in %TEMP% which removes the service, certificate, printer, registry entries, and shortcuts.

MSI uninstallation via msiexec /X
MSI uninstallation via msiexec /X
RustDesk Command-Line Interface (CLI)
RustDesk official CLI documentation
RustDesk client documentation, documented CLI flags

RustDesk provides CLI functionality enabling automation of installation and execution, useful for legitimate administration but also an abuse vector for threat actors.

RustDesk source code showing additional undocumented CLI flags
RustDesk source code reveals additional CLI flags beyond the documentation

Reviewing the open-source code reveals additional undocumented commands:

  • --connect, Initiate a session to a specified RustDesk ID
  • --file-transfer, Start a file transfer-only session
  • --port-forward, Establish port forwarding
  • --elevate, Execute with elevated privileges
  • --run-as-system, Run under the SYSTEM account
  • --portable-service, Run as a portable service with elevation
  • --install-service, Install as a system service
  • --service, Run in service mode
RustDesk FAQ: no console output on Windows
RustDesk FAQ, no standard console output on Windows
Piping rustdesk output to more command
Pipe to 'more' to view CLI output: rustdesk.exe --get-id | more

RustDesk on Windows does not produce console output by default. Pipe output to another utility (e.g., | more) to view CLI results.

Investigate RustDesk Connection
Remote device entering RustDesk ID to initiate connection
Initiating a connection by specifying the target's RustDesk ID

To initiate a remote connection, the remote device must specify the correct RustDesk ID, and the RustDesk client must be actively running on the end device.

Prompt for password if the remote connection user has OTP or password for unattended access
Prompt for password if the remote connection user has OTP or password for unattended access

The connecting client first communicates with the relay/rendezvous server to locate the endpoint. If the connecting user has the OTP or if unattended access is configured, the connection can be established without manual acceptance.

Accept or Accept and elevate options on end device
End device prompt, 'Accept' or 'Accept and elevate' with administrator privileges

Connection Logging

Public IP already logged before session accepted
Public IP of connecting device is logged BEFORE the session is accepted

Even before a session is accepted, rustdesk_rCURRENT.log already records the public IP address of the connecting device or private IP address if it's happened to come from the same subnet.

Additional log entries after Accept, but no RustDesk ID logged
After Accept, more entries written, but RustDesk ID of connecting device is NOT logged

Unlike AnyDesk, RustDesk does not log the connecting device's RustDesk ID. The only external identifier consistently recorded is the public IP address.

Clipboard manager log created in AppData Roaming rustdesk log cm
Clipboard manager log at %APPDATA%\\rustdesk\\log\\cm, created when clipboard sync is used
Session termination log sequence
Session termination sequence in rustdesk_rCURRENT.log

Key search terms for rustdesk_rCURRENT.log:

KeywordSourceMeaning
Connection opened fromsrc/server/connection.rsPublic IP + timestamp of connection request
new wakelocksrc/platform/mod.rsSession established; require display on: true = screen-sharing session
drop wakelocksrc/server/connection.rsSession ended

RustDesk's limited logging significantly restricts investigative visibility. Supplement with Windows audit policies, Sysmon, and firewall/network logs.

Log Rotation

Old log renamed to timestamped filename on new RustDesk launch
On new RustDesk launch, old log renamed to rustdesk_rYYYY-MM-DD_HH-MM-SS.log
Same log rotation for clipboard manager logs
Log rotation also applies to clipboard manager logs

When RustDesk restarts, rustdesk_rCURRENT.log is renamed to rustdesk_rYYYY-MM-DD_HH-MM-SS.log. The same applies to all other logs including clipboard manager logs as shown in the image above as the example.

Investigate File Transfer Activity over RustDesk
RustDesk file transfer utility overview
RustDesk built-in file transfer utility

RustDesk has a built-in file transfer utility allowing file transfer between two devices.

File Transfer via File Manager

File transfer creates a separate session in the log
File transfer session creates a separate connection event in rustdesk_rCURRENT.log

File transfer creates a separate session from the remote-control session, a new connection request event appears in the log.

RustDesk file manager UI
RustDesk file manager, browse, upload, download, create folders, delete files
Demo of file operations on end device
Demo: download, upload, new folder, delete file on end device
new read File entry in log showing path and size of downloaded file
'new read File:' in access log, full path and size of file downloaded from end device

When a file is downloaded from the end device, the access log records the full path and size with new read File:. Note: there are no explicit log entries for folder creation or file deletion.

new write File in clipboard manager log for file uploaded to end device
Clipboard manager log, 'new write File:' for files uploaded to the end device

When a file is uploaded to the end device, it is logged in the clipboard manager log with new write File:.

File transfer session closed log
File transfer session closed, no monitor exit events (differentiates from remote-control session)

File Transfer via Clipboard

Clipboard-based file transfer log events
Clipboard-based transfer, no file path logged, but transfer events are detectable

File transfer via clipboard leaves no file path in logs, but you can detect it:

  • server_file_content_request + client_file_content_response → file sent to remote device
  • client_file_contents_request + server_file_contents_response → file downloaded from remote

File Transfer via --file-transfer CLI

rustdesk --file-transfer ID command
rustdesk --file-transfer <ID>, requests a file transfer-only session
File transfer only session: no remote control
File transfer-only session: files transferred and deleted, but no remote control
Transfer chisel from remote system to target and download credential file from target to remote
Transfer chisel from remote system to target and download credential file from target to remote
File transfer activities event that could be seen from log file
File transfer activities event that could be seen from log file
File transferred from remote host logged in clipboard manager
File transferred from remote host logged in clipboard manager

rustdesk --file-transfer <ID> creates a file transfer-only session. The same logging methodology applies for identifying download/upload activity.

Clipboard-based transfers leave no file path in logs. Use file creation event monitoring and network activity analysis to compensate.

Investigate RustDesk Connection via Unattended Access
RustDesk permanent password setup via GUI
RustDesk permanent password setup, configurable via GUI or --password CLI flag

RustDesk supports Unattended Access via a permanent password (set via GUI or --password flag). The password is stored encrypted in RustDesk.toml.

RustDesk client deployment automation script in documentation
RustDesk docs provide client deployment scripts, threat actors can copy and abuse these directly

The RustDesk documentation provides ready-made automation scripts for client deployment, a threat actor can copy this script, set their desired password, and optionally add a local administrator account creation.

permanent-password update logged in LocalService RustDesk log
LocalService RustDesk log, explicit 'permanent-password' update event

When setting a password with the service installed, a log entry is written to C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\log\server\RustDesk_rCurrent.log, explicit enough to confirm a permanent password was configured.

Encrypted password stored in RustDesk.toml
Encrypted password stored in RustDesk.toml
Unattended access connection logged in LocalService service log
Unattended access connection logged in LocalService RustDesk service log (not user AppData)

Unattended connections are handled by the RustDesk service instance and logged at C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\RustDesk\log\server.

Self-Hosting and Custom Client Configuration
RustDesk pricing page showing free vs paid plans
RustDesk pricing, free self-hosting has limitations; paid plans unlock Custom Client Generator

The free self-hosting plan has these limitations: no audit logging, no web management console, no MFA/2FA, and limited device management. Paid plans unlock the Custom Client Generator.

RustDesk custom client configuration documentation
Custom Client Generator, embedded server config, custom branding, locked settings

From a threat modeling perspective, the Custom Client Generator enables threat actors to:

  • Create malicious clients connecting to attacker-controlled infrastructure
  • Deploy branded installers disguised as legitimate IT tools
  • Lock server configuration to prevent victims identifying the malicious backend
  • Bypass user suspicion with legitimate-looking software behavior

This blurs the boundary between legitimate RMM tools and malicious remote access implants.

Decrypt RustDesk Configuration (ID and Password)
RustDesk.toml showing encrypted ID with 00 prefix
RustDesk.toml, encrypted ID: 00 prefix + base64-encoded XSalsa20-Poly1305 ciphertext
Encrypted password in RustDesk.toml
Encrypted password in RustDesk.toml, same format as ID

RustDesk encrypts both the stored ID and password. Understanding this allows analysts to recover these values during a forensic investigation.

Encryption Process

  1. Retrieve the device ID or password value
  2. Encrypt using XSalsa20-Poly1305 cipher
  3. Derive the key from the machine UUID
  4. Use a static 24-byte nonce of all zeros (0x00 × 24)
  5. Encode the ciphertext with base64
  6. Prepend 00 to the base64 string
text
Format: 00<base64_encoded_ciphertext>
Python decryption script for RustDesk configuration
Python decryption script, requires Machine UUID and encrypted config string or file path

I wrote a Python decryption script available at github.com/ChickenLoner/rustdesk-decrypt. It requires the system Machine UUID and the path to the config file (or the encrypted string directly).

Critical limitation: You need the Machine UUID of the specific compromised system to decrypt its RustDesk config. Obtain it from: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\MachineGuid.

Bonus: Folder Creation by Flag

Wrong flag causes folder named -- to be created
Even a wrong CLI flag causes RustDesk to create a folder named '--', useful for MFT analysis

Even providing an incorrect flag causes RustDesk to create a folder named --. Use MFT analysis or file creation monitoring to identify what CLI flags were used with RustDesk.