Post

AnyDesk Trace File Forensics

Research findings on AnyDesk trace file artifacts, authentication methods, and forensic data extraction for incident response.

AnyDesk Trace File Forensics

AnyDesk trace files contain rich forensic data for incident response investigations. This post documents research findings on what data is available, how authentication is logged, and which artifacts matter most for detecting unauthorized remote access.

Trace File Locations

AnyDesk stores trace files differently depending on installation type.

Installed Mode (Program Files):

1
2
C:\ProgramData\AnyDesk\ad_svc.trace          # Service trace (primary)
C:\Users\<user>\AppData\Roaming\AnyDesk\ad.trace   # User trace (supplemental)

Portable Mode (standalone executable):

1
<exe_directory>\ad.trace                      # Single trace file

The service trace (ad_svc.trace) contains network and authentication events. The user trace (ad.trace) contains session metadata like remote alias, OS, and version. In portable mode, both types of data appear in a single file.

Authentication Methods

AnyDesk supports multiple authentication methods, each logged differently in trace files.

Official Authentication Types

MethodDescription
Manual AcceptUser clicks “Allow” on connection prompt
Unattended PasswordPre-configured password for remote access
Token (Auto-login)Saved token from previous successful auth
2FATOTP code in addition to password

Trace File Patterns

The service trace logs authentication events with specific patterns:

Log PatternMeaning
Authenticated by local user (elevated)User accepted with admin elevation
Authenticated by local userUser clicked Allow
Authenticated by passwordUnattended password used
Authenticated with permanent tokenSaved token authentication
Authenticated with correct passphrasePassphrase authentication

For forensic purposes, these can be grouped into three categories:

CategoryPatternsForensic Significance
user_acceptedby local userSomeone was at the keyboard
user_accepted_elevatedby local user (elevated)Admin consent given
unattended_passwordby password, with permanent token, with correct passphraseNon-interactive access (higher risk)

Unattended authentication is particularly significant in investigations. It indicates the attacker had pre-configured credentials, suggesting prior compromise or insider access.

Forensic Data Fields

The trace files contain several fields valuable for incident response.

Network Indicators

FieldLog PatternExample
Remote IPLogged in from X.X.X.X:portLogged in from 203.0.113.45:7070
Relay IPUsing IPv4: X.X.X.XUsing IPv4: 185.20.97.12
Connection TypeRoute type: direct (LAN)?Route type: direct

The remote IP is the attacker’s actual IP address. The relay IP is AnyDesk’s infrastructure used for signaling, even on direct connections.

Remote Client Identifiers

FieldLog PatternExample
Client IDClient-ID: X (FPR: Y)Client-ID: 1810556864
FingerprintClient-ID: X (FPR: Y)FPR: a1b2c3d4e5f6...
Remote AliasIncoming session request: Name (ID)Incoming session request: Alex (1810556864)

The fingerprint is particularly useful for correlation. It persists across IP changes and can link sessions from the same remote AnyDesk installation.

Session Metadata

FieldLog PatternExample
Remote OSRemote OS: XRemote OS: Windows
Remote VersionRemote version: X.X.XRemote version: 8.2.0
Session StartTimestamp from Accept request from2026-01-30 14:23:45.123

Connection Type Detection

AnyDesk connections fall into three categories:

TypeLog IndicatorMeaning
direct_lanRoute type: direct (LAN)Same local network
direct_wanRoute type: direct (no LAN)Direct internet connection
relayNo “direct” route typeTraffic routed through AnyDesk servers

Direct LAN connections are particularly interesting in investigations. They indicate the attacker was on the same network as the victim, suggesting internal threat or lateral movement.

Session State Detection

A critical forensic consideration is detecting in-progress sessions. The pattern works by comparing timestamps:

1
2
Accept request from ... (timestamp A)
Authenticated ...       (timestamp B)
  • If A > B (accept is newer than auth): Session is establishing, auth hasn’t completed yet
  • If B > A (auth is newer than accept): Session is fully established

This matters for live response. During active sessions, you may see the accept event but not yet the authentication event.

Data Source Comparison

AnyDesk creates multiple log files. Here’s what each contains:

FileContentParsing Value
ad_svc.traceNetwork events, authentication, IPsHigh (primary source)
ad.traceUI events, remote alias, OS, versionMedium (supplemental)
connection_trace.txtStructured connection logMedium (less detail than .trace)
user.conf / system.confConfiguration onlyLow (no session data)

The .trace files provide richer data than connection_trace.txt, making them the preferred source for forensic parsing.

Artifacts Not Covered

Some AnyDesk artifacts require separate analysis:

ArtifactLocationUse Case
File transfersTrace files (different patterns)Data exfiltration detection
Chat logsTrace filesCommunication analysis
ScreenshotsNot loggedUnavailable

File transfer detection is a separate use case with different patterns and would warrant its own parsing logic.

Implementation Notes

When building automated parsing:

  1. Handle both install types - Check process path to determine if installed (Program Files) or portable
  2. Merge data sources - In installed mode, combine service trace (network/auth) with user trace (metadata)
  3. Use last-match logic - For repeating patterns, the most recent entry reflects the current/latest session
  4. Generate session hashes - SHA256(client_id|session_start)[:16] provides a correlation key across workflows

Sources

This post is licensed under CC BY 4.0 by the author.