Skip to content
Deep dive into AnyDesk Investigation & Forensics on Windows

Deep dive into AnyDesk Investigation & Forensics on Windows

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

Hello everyone! Chicken0248 here again. In this blog, I'll share my research on investigating AnyDesk, covering its normal behavior, basic CLI usage, how it can be abused to set up quick persistence, and how to investigate AnyDesk connection and file transfer activity.

The goal of this research is to understand what "normal" AnyDesk activity looks like, and how we can investigate it when it is misused. But before diving into the technical details, let's start with a simple question: What is AnyDesk?

AnyDesk is a cross-platform remote desktop software (often considered an RMM or remote access tool) that allows users to remotely control another device over a network by specifying the target device's AnyDesk ID (displayed as "Address" in the AnyDesk interface). Because it is cross-platform, the remote device does not need to run the same operating system as the controlling device. As long as AnyDesk is installed and the correct ID is provided, a remote session can be established regardless of the OS.

Since AnyDesk is easy to use and reliable, threat actors including scammers often use it to gain full control over the victim device. It's free and only takes one EXE file with a couple of clicks to allow remote access on the victim device. With the Unattended Access feature, it allows the threat actor to come back to that device anytime as long as it connects to the internet and is turned on.

AnyDesk website download page
Download AnyDesk from its website

AnyDesk can be downloaded via the web browser at https://anydesk.com/en/downloads/, depending on your user-agent, it will redirect you to the compatible installer, or you can manually specify which installer you want for each OS.

Download AnyDesk via CLI
Download AnyDesk via CLI

AnyDesk can also be downloaded using CLI by requesting a file at http://download.anydesk.com/AnyDesk.exe. In the next section, we will talk about normal AnyDesk usage and its behavior to understand the baseline before we jump into the forensics part.

AnyDesk Usage and Behavior (Without Remote Connection)

To demonstrate AnyDesk usages, I will use my Kali Linux as the "local device" (initiating connections) while my Windows VM acts as the "remote device" (receiving connections).

Binary and File Metadata

AnyDesk binary signed by AnyDesk Software GmbH
AnyDesk binary metadata, signed by AnyDesk Software GmbH

The Windows executable is signed by "AnyDesk Software GmbH" and the version of AnyDesk is also displayed in the file metadata.

AnyDesk GUI showing unique device ID
AnyDesk GUI displaying the unique device ID

Once the software is started, you are presented with the unique ID of the device. Giving this unique ID to anyone with AnyDesk allows them to request a remote connection to this device.

gcapi.dll downloaded alongside AnyDesk executable
gcapi.dll is downloaded once AnyDesk starts

Upon executing the AnyDesk executable on Windows, a DLL file named gcapi.dll (Google Cloud API DLL) is also downloaded and created in the same folder as the executable. This Dynamic Link Library allows AnyDesk to communicate with Google Cloud API.

AppData Artifacts

AppData Roaming AnyDesk folder structure
C:\\Users\\%username%\\AppData\\Roaming\\AnyDesk folder structure

By just launching AnyDesk software, a new folder named AnyDesk along with its contents is created under C:\Users\%username%\AppData\Roaming\. These are very important artifacts for investigating AnyDesk usage and activity.

ad.trace main log file
ad.trace, the primary AnyDesk log file

ad.trace is the main log file for AnyDesk, we can expect most events to come from this file.

system.conf showing AnyDesk ID and relay address
system.conf containing the unique AnyDesk ID and last relay address

The unique ID is stored in system.conf under the variable name ad.anynet.id. In order for AnyDesk to connect to a target and look up this unique ID, both devices must connect to AnyDesk servers to find the matching ID, then proceed to create a session via the AnyDesk Relay infrastructure. The last relay address is also present in system.conf.

If your ID is leaked, you can remove the entire C:\Users\%username%\AppData\Roaming\AnyDesk folder and restart AnyDesk, it will retrieve a new unique ID from AnyDesk servers.

Screenshots and Recordings Folders

Screenshot and screen recording folders created in Pictures and Videos
Folders for screenshots and screen recordings created in user's Pictures and Videos directories
Screenshot and screen recording folders created in Pictures and Videos
Folders for screenshots and screen recordings created in user's Pictures and Videos directories

Two folders for screenshots and screen recordings are also created in the user's Pictures and Videos folders respectively.

Installation Behavior

AnyDesk prompts for installation requiring admin privileges
AnyDesk installation prompt, requires local administrator privileges

When closing the portable AnyDesk, it will prompt you to install it. Installation is only possible with at least local administrator permissions on the device.

AnyDesk executable copied to Program Files x86
AnyDesk installed to C:\\Program Files (x86)\\AnyDesk

Once installed, AnyDesk copies its executable to C:\Program Files (x86)\AnyDesk.

AnyDesk Remote Printer installation
AnyDesk installs a Remote Printer by default
AnyDesk service in services.msc
AnyDesk service in services.msc

In the default configuration, AnyDesk also installs AnyDesk Printers, used with the "Remote Printing" feature to print documents remotely.

Service and Multi-Instance Behavior

AnyDesk service created with --service flag
AnyDesk service creation, starts with --service flag

A new service named "AnyDesk Service" is created to start AnyDesk with the --service flag on system startup. This is essential for the Unattended Access feature, allowing any remote device to connect without requiring manual acceptance. This service creation triggers Event ID 7045 in the Windows System event log.

ProgramData AnyDesk folder created for SYSTEM context
C:\\ProgramData\\AnyDesk folder, created when AnyDesk runs as SYSTEM

When AnyDesk runs in the context of SYSTEM, the AnyDesk folder is created under C:\ProgramData.

AnyDesk shortcut in global startup folder
AnyDesk shortcut in global startup folder, launches AnyDesk for every user logon

A shortcut to start AnyDesk is also created inside the global startup folder, ensuring AnyDesk runs in each user's context on every logon.

AnyDesk instances
AnyDesk instances

At any point in time on a device with AnyDesk installed, there will be at least two AnyDesk instances running: one in SYSTEM context (from the service) and one in user context (from the startup folder). Even if the user context instance is not running, the SYSTEM context instance can still connect to AnyDesk servers using the same unique ID and will display the remote request when someone specifies that ID.

Managing AnyDesk via CLI

What makes AnyDesk special is that it can be installed and managed via CLI, enabling automation of the installation process with Unattended Access setup.

cmd
# Retrieve the device's unique AnyDesk ID anydesk.exe --get-id # Configure unattended access with a password echo <my_password> | anydesk.exe --set-password # Install AnyDesk as a service anydesk.exe --install
Conti's leak
Conti's leak

To give a real-world example, the Conti ransomware gang leak revealed their playbook included creating a new backdoor user and installing AnyDesk with Unattended Access as a persistence mechanism, demonstrating actual malicious use of AnyDesk CLI for automation.

Investigate AnyDesk Connection
AnyDesk quick start guide documentation
AnyDesk quick start guide, support.anydesk.com
AnyDesk GUI interface on Linux
AnyDesk GUI interface on Linux (used as the connecting/remote device)

To start a remote connection, the device that will take control over another device must specify the AnyDesk ID of the remote device (and password if Unattended Access is set up). The remote device must have at least one AnyDesk instance running when a request is made.

Connection Request and Permissions

AnyDesk request when service was installed and SYSTEM instance handles connection
AnyDesk connection request, service installed, SYSTEM instance handles it
AnyDesk request without service installed
AnyDesk connection request, portable version, no service

In normal circumstances, when a request is made, a popup appears on the end device showing the ID and potentially the profile name of the requesting device. Users can Accept or Dismiss the request.

AnyDesk permissions window
AnyDesk permission settings for an incoming connection

The remote device can manage which permissions are allowed: Allow to take control, Allow to use file manager, Allow to use clipboard, Allow to hear sound, Record session, Allow to draw on screen. These can be changed at any time before and during the session. Without session establishment, users on both devices can also communicate via the built-in Chat feature.

Session Logging in ad.trace

Session started log when AnyDesk runs as SYSTEM
'Session started' logged, AnyDesk running as SYSTEM handles the connection
Session started log for user context AnyDesk
'Session started' logged, AnyDesk running as normal user

When a remote connection is established, a "Session started" message is logged. We can see the duration of the session and investigators can calculate it by comparing the accept and termination timestamps.

connection_trace.txt

connection_trace.txt from ProgramData AnyDesk
connection_trace.txt, C:\\ProgramData\\AnyDesk (service-based installation)
connection_trace.txt from User AppData AnyDesk
connection_trace.txt, C:\\Users\\%username%\\AppData\\Roaming\\AnyDesk (portable)

connection_trace.txt logs all incoming connections:

  • If AnyDesk is installed (service-based): C:\ProgramData\AnyDesk\connection_trace.txt
  • If using portable AnyDesk (user context): C:\Users\%username%\AppData\Roaming\AnyDesk\connection_trace.txt

Timestamps are in UTC format (YYYY-MM-DD, HH:MM). The authentication type field can have three values:

Auth TypeDescription
UserRemote user manually accepted the connection request (clicked Accept)
PasswdPassword configured for unattended access, requesting device supplied correct password
TokenConnection authenticated using stored credentials from a previous session between these devices

The final field in each log entry contains the AnyDesk ID of the device that initiated the connection request. As a general rule: if AnyDesk is installed, artifacts are in C:\ProgramData\AnyDesk; if only the portable version is used, they are in C:\Users\%username%\AppData\Roaming\AnyDesk. The presence of artifacts in either location helps determine whether AnyDesk was used for initial access or as a persistence mechanism.

Detailed Connection Logs in ad.trace

ad.trace showing profile name and AnyDesk ID of connecting device
ad.trace, profile name and AnyDesk ID of the requesting device
ad.trace additional connection details
ad.trace, further connection detail entries

In the ad.trace log file, when a request is made, we can find the profile name, AnyDesk ID, OS and version of the requesting device.

ad.trace Accept request with public and private IP
ad.trace, 'Accept request' logged with both public and private IP addresses
ad_svc.trace for service-based connection
ad_svc.trace, connection handled by AnyDesk service instance
ad_svc.trace additional service connection logs
ad_svc.trace, additional service connection entries

After the user accepts the request, "Accept request" is logged along with the AnyDesk ID, and both public and private IP addresses of the connecting device. If AnyDesk is installed as a service, the connection is handled by the SYSTEM instance and all connection logs are written to ad_svc.trace instead of ad.trace.

Session termination logs in ad.trace
Session termination logged, use timestamps to calculate session duration

When a session is terminated, the termination logs appear in the respective .trace file. Comparing the acceptance and termination timestamps gives us the exact session duration.

Chat Logs

chat log
chat log

If either party uses the chat feature during a session, chat logs are created inside the chat folder within the respective AnyDesk directory. Each chat log file is named after the AnyDesk ID of the connecting device and accumulates entries across multiple sessions with the same ID.

Investigate File Transfer Activity over AnyDesk
File transfer is enabled by default in AnyDesk
File transfer is enabled by default when a remote connection is established

When a remote connection is established, the user on the remote side can disable file transfer (enabled by default). With the default settings, both devices can transfer files via the built-in File Manager, allowing the requesting device to freely browse the file system of the end device, upload, download, and delete files. If clipboard is enabled, AnyDesk also supports file transfers over clipboard.

Upload Activity

Uploading a file via AnyDesk File Manager
Uploading a shellcode loader to the Windows VM via AnyDesk File Manager
File transfer displayed as Download on end device
File upload from remote perspective is displayed as 'Download' on the end device

A file uploaded from the remote device to the end device is displayed in the File Transfer pane. From the end device's perspective, it is logged as a Download (the file was downloaded to this device).

Download file from local to remote
Download file from local to remote
File download from end device shown as Upload
File download from end device is displayed as 'Upload' (exfiltration from end device)

Conversely, file download from the end device to the remote device is displayed as an Upload from the end device's perspective.

file_transfer_trace.txt

file_transfer_trace.txt showing upload and download events with timestamps
file_transfer_trace.txt, timestamps for both start and completion of transfers

A file_transfer_trace.txt file is created and logs all upload/download activities with timestamps for both start and completion:

  • Installed AnyDesk: C:\ProgramData\AnyDesk\file_transfer_trace.txt
  • Portable AnyDesk: C:\Users\%username%\AppData\Roaming\AnyDesk\file_transfer_trace.txt
ad.trace logs for file transfer activities
ad.trace, file transfer activities also logged here with file paths (for uploads/exfiltration)

Both activities are also logged in the respective .trace file. The download log (file arriving at the end device) does not include the file path, only the filename and size from file_transfer_trace.txt. However, the upload log (file leaving the end device) explicitly includes the file path, so combining it with file_transfer_trace.txt gives us exactly which file was exfiltrated.

Anti-forensics consideration: Deleting file_transfer_trace.txt removes direct transfer evidence. Correlate with file creation events and network logs to compensate.

File Deletion via File Manager

Deleting a file via AnyDesk file manager
File deletion via AnyDesk file manager
Deletion activity display on the client
Deletion activity display on the client
Deletion logged in ad.trace
Deletion logged in ad.trace, path shown, 'Deleting x files' message

Files can also be deleted via the file manager. Deletion is not logged in file_transfer_trace.txt (since it's not a "transfer"), but the .trace file does log the file path with an explicit "Deleting x files" message, including whether the deletion completed successfully.

You might wonder why a threat actor with full control over the device would bother using the file manager to delete files. However, if full control is disabled but file manager is enabled, the file manager and chat are the only available options, making this a relevant forensic artifact to look for.

Investigate AnyDesk Connection via Unattended Access

Unattended Access is frequently abused as a persistence mechanism in the wild, which is why it warrants its own dedicated section.

Setting Up Unattended Access

Configuring AnyDesk unattended access via GUI
Configuring AnyDesk unattended access via GUI
Setting AnyDesk unattended access password via CLI
Setting unattended access password via CLI

Unattended Access can be configured via GUI or CLI, both requiring administrator privileges. Once set up, any device with the correct AnyDesk ID and password can connect without manual acceptance.

CLI command logged in ad.trace
ad.trace logs the entire AnyDesk command line, CLI password setup is forensically visible

When the password is set via CLI, the command line is logged in ad.trace (AnyDesk logs every CLI command invocation), making it a forensic artifact that confirms the persistence mechanism was set up via automation.

Retrieving the AnyDesk ID (Attacker Simulation)

PowerShell script to retrieve AnyDesk ID
PowerShell: retrieving AnyDesk ID from config file or via --get-id flag
powershell
# From configuration file Get-Content "$env:ProgramData\AnyDesk\system.conf" | Select-String "ad.anynet.id" # Using --get-id flag $p = New-Object System.Diagnostics.Process $p.StartInfo = @{ FileName="C:\Program Files (x86)\AnyDesk\AnyDesk.exe" Arguments="--get-id" RedirectStandardOutput=$true UseShellExecute=$false CreateNoWindow=$true } $p.Start() | Out-Null $p.WaitForExit() $p.StandardOutput.ReadToEnd().Trim()

These PowerShell snippets are typically automated in attacker scripts. The --get-id flag was designed specifically for scripting purposes.

Connecting via Unattended Access

AnyDesk service runs at boot enabling unattended access
AnyDesk service starts at boot, no user login required for unattended access

Since the AnyDesk service runs at boot, no login or user interaction is required on the end device. The threat actor only needs the correct ID and password to connect.

Threat actor still needs valid credentials to fully interact
Valid Windows credentials still required for full system interaction

However, the threat actor still needs valid credentials to log in and fully interact with the system. This is why many AnyDesk backdoor scripts also create a new local administrator account, allowing the threat actor to return to the compromised machine with high privileges.

Artifacts from Unattended Sessions

connection_trace.txt showing Passwd authentication for unattended access
connection_trace.txt, auth type 'Passwd' indicates unattended access
ad_svc.trace during unattended access session
ad_svc.trace, unattended sessions handled by service instance
Additional service trace entries
Additional ad_svc.trace entries during unattended session

In Unattended Access, the connection is handled by the AnyDesk service instance. Key artifacts:

ArtifactPathNotes
Connection logC:\ProgramData\AnyDesk\connection_trace.txtAuth type shows Passwd
Service traceC:\ProgramData\AnyDesk\ad_svc.traceAll session events for service-based connections
File transfersC:\ProgramData\AnyDesk\file_transfer_trace.txtFile manager transfer activity
Chat logsC:\Users\%username%\AppData\Roaming\AnyDesk\chat\Still in user context, potential social engineering evidence
file_transfer_trace.txt for unattended access file transfers
file_transfer_trace.txt, file transfers during unattended session logged in ProgramData

File transfers via the file manager during unattended sessions are logged in C:\ProgramData\AnyDesk\file_transfer_trace.txt. Chat logs remain in the user context path, relevant if the threat actor uses the chat feature for social engineering (e.g., impersonating IT support while the machine is in use).

There are many more events in the .trace files beyond what is covered here. Explore ad.trace and ad_svc.trace thoroughly during investigations. See the AnyDesk Forensics Cheatsheet on GitHub for a full artifact reference.

← ALL RESEARCH | ↑ BACK TO TOP
); }; ReactDOM.createRoot(document.getElementById('root')).render();