AnyDesk
Author: Andrew Rathbun, Scott Hanson, and Nicole Jao
description
AnyDesk
paths
C:\Users\%user%\AppData\Roaming\AnyDesk\*.traceCollects the trace logs for AnyDesk from a user profile
C:\ProgramData\AnyDesk\*.traceCollects the trace logs for AnyDesk from ProgramData
C:\Users\%user%\AppData\Roaming\AnyDesk\*.confCollects the conf logs for AnyDesk from a user profile
C:\ProgramData\AnyDesk\*.confCollects the conf logs for AnyDesk from ProgramData
C:\Users\%user%\Videos\AnyDesk\*.anydeskCollects any session recordings made by the user while using AnyDesk
C:\Users\%user%\AppData\Roaming\AnyDesk\connection_trace.txtCollects the connection trace log from user profile
C:\ProgramData\AnyDesk\connection_trace.txtCollects the connection trace log from ProgramData
C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\AnyDesk\Collects the logs associated with the System user account
C:\Users\%user%\AppData\Roaming\AnyDesk\chat*.txtCollects chat logs associated with the user profile
C:\Users\%user%\AppData\Roaming\AnyDeskfile_transfer_trace.txtCollects file transfer logs that occur when running in portable mode
C:\ProgramData\AnyDesk\file_transfer_trace.txtCollects file transfer logs that occur when running as an installed service
collection commands
# PowerShell Artifact Collection Script
# Target: AnyDesk
# Run as Administrator
#Requires -RunAsAdministrator
$ErrorActionPreference = "SilentlyContinue"
$DestBase = "D:\Evidence"
# Function to handle directory creation and copying
function Collect-Artifact {
param (
[string]$SourcePath,
[string]$FolderName
)
$FullDest = Join-Path -Path $DestBase -ChildPath $FolderName
if (-not (Test-Path -Path $FullDest)) {
New-Item -ItemType Directory -Path $FullDest -Force | Out-Null
}
Copy-Item -Path $SourcePath -Destination $FullDest -Recurse -Force
}
# 1. AnyDesk Logs - User Profile - *.trace
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\AnyDesk\"
Collect-Artifact -SourcePath "$UserPath\*.trace" -FolderName "AnyDesk_Logs___User_Profile_____trace"
# 2. AnyDesk Logs - ProgramData - *.trace
Collect-Artifact -SourcePath "C:\ProgramData\AnyDesk\\*.trace" -FolderName "AnyDesk_Logs___ProgramData_____trace"
# 3. AnyDesk Logs - User Profile - *.conf
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\AnyDesk\"
Collect-Artifact -SourcePath "$UserPath\*.conf" -FolderName "AnyDesk_Logs___User_Profile_____conf"
# 4. AnyDesk Logs - ProgramData - *.conf
Collect-Artifact -SourcePath "C:\ProgramData\AnyDesk\\*.conf" -FolderName "AnyDesk_Logs___ProgramData_____conf"
# 5. AnyDesk Videos
$UserPath = Join-Path $env:USERPROFILE "Videos\AnyDesk\"
Collect-Artifact -SourcePath "$UserPath\*.anydesk" -FolderName "AnyDesk_Videos"
# 6. AnyDesk Logs - User Profile - connection_trace.txt
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\AnyDesk\"
Collect-Artifact -SourcePath "$UserPath\connection_trace.txt" -FolderName "AnyDesk_Logs___User_Profile___connection_trace_txt"
# 7. AnyDesk Logs - ProgramData - connection_trace.txt
Collect-Artifact -SourcePath "C:\ProgramData\AnyDesk\\connection_trace.txt" -FolderName "AnyDesk_Logs___ProgramData___connection_trace_txt"
# 8. AnyDesk Logs - System User Account
Collect-Artifact -SourcePath "C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\AnyDesk\\*" -FolderName "AnyDesk_Logs___System_User_Account"
# 9. AnyDesk Chat Logs - User Profile
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\AnyDesk\chat"
Collect-Artifact -SourcePath "$UserPath\*.txt" -FolderName "AnyDesk_Chat_Logs___User_Profile"
# 10. AnyDesk File Transfer Logs - Running in portable mode
$UserPath = Join-Path $env:USERPROFILE "AppData\Roaming\AnyDesk"
Collect-Artifact -SourcePath "$UserPath\file_transfer_trace.txt" -FolderName "AnyDesk_File_Transfer_Logs___Running_in_portable_mode"
# 11. AnyDesk File Transfer Logs - Installed as a Service
Collect-Artifact -SourcePath "C:\ProgramData\AnyDesk\\file_transfer_trace.txt" -FolderName "AnyDesk_File_Transfer_Logs___Installed_as_a_Service"
Write-Host "Collection complete!" -ForegroundColor Green› Save as .ps1 and run as Administrator. Use: powershell -ExecutionPolicy Bypass -File script.ps1