WindowsAudit Backdoor: Inside a .NET RAT That Hides in Discord
BlogMalware Analysis

WindowsAudit Backdoor: Inside a .NET RAT That Hides in Discord

Advisory: Profero has observed this campaign active across multiple environments, and based on observed patterns and tradecraft, it may be positioning for escalation toward a broader ransomware operation. Profero has notified the Israeli National Cyber Directorate (INCD) of this activity. Organizations that identify any of the indicators of compromise (IOCs) listed below in their environments are encouraged to take prompt investigative action. If you would like to confirm whether your organization appears among the environments where this activity has been observed, or to discuss the IOCs further, please contact our team at contact@profero.io.

Executive Summary

In April 2026, Profero IRT identified a .NET 8 backdoor named WindowsAudit.exe on a victim host. The binary is a modular C# RAT (version v1.5.77) that uses Discord as its primary C2 channel, MQTT as a secondary, and Telegram as an optional fallback. It runs as a Windows Service under LocalSystem, drops a companion persistence binary (WinSATSvc / WinSATTemp.exe), and covers credential theft, Active Directory abuse, Safe Mode EDR removal, WireGuard tunneling, screen and webcam capture, and keylogging.

Binary: unsigned, 101 MB, .NET single-file bundle, compiled 19 March 2026.


What Happened

Profero IRT recovered WindowsAudit.exe from a victim host and reverse engineered it. The binary is a .NET native apphost — a statically-linked native loader that stages and runs an embedded managed DLL with its dependencies. Extracting and decompiling WindowsAudit.dll to C# yielded a ~28,000-line remote administration framework with clean separation between command dispatch, C2 transports, and feature modules.

On startup the agent:

  1. Patches Windows Defender with an Add-MpPreference exclusion for its install path and process name
  2. Registers itself as a Windows Service (WindowsAudit)
  3. Drops a self-backup at %CommonProgramData%\Microsoft\Windows\WinSAT\WinSATTemp.exe
  4. Adds a WMI event subscription
  5. Writes registry Run keys
  6. Registers a RemoteAdminEdrCleanup scheduled task that re-arms the operator after a Safe Mode reboot

The single-instance guard is the mutex Global\WindowsAuditSingleInstance.


Command-and-Control Architecture

WindowsAudit ships three independent C2 transports. The agent fails open to the next channel if one is unavailable, and all three blend with legitimate enterprise traffic.

Discord (Primary)

  • Authenticates with a hardcoded bot token using gateway intents 33281 (GuildMessages, GuildMessageReactions, MessageContent, GuildMembers, GuildPresences)
  • Polls two channels in a single guild: a bus channel for tasking and a store channel for results and large file transfers (up to 25 MB per attachment)
  • Registers Discord slash commands on connect; operators task agents by exact hostname, partial hostname, Machine GUID, GUID prefix, or "all" for broadcast
  • Reconnects with randomized 15–30 second back-off

MQTT (Secondary)

  • Connects to a public HiveMQ Cloud broker on port 8883 over TLS
  • Tasks published to remoteadmin/commands, results to remoteadmin/results
  • Client ID format ra-agent-{MachineName}-{short-guid} leaks hostname to the broker audit log
  • Supports retained messages for offline agents

Telegram (Optional)

If configured, the agent accepts a reduced command set over Telegram: ping, exec, ps, screenshot, record, browse, sysinfo, netscan, kerbrenew, service, process, inventory, wol, registry.


Persistence Mechanisms

MechanismDetail
Windows ServiceWindowsAudit, LocalSystem, start=auto, failure recovery at 5s / 10s / 30s
WMI SubscriptionRegistered via EnsureWmiSubscriptionAsync for redundant persistence
Defender ExclusionAdd-MpPreference adds install path and process name to exclusion list
Self-BackupCopies itself to %CommonProgramData%\Microsoft\Windows\WinSAT\WinSATTemp.exe
Registry Run KeysWinSATService and WindowsAuditSvc under HKCU\...\CurrentVersion\Run
Scheduled TaskRemoteAdminEdrCleanup runs at startup in Safe Mode to scrub EDR services

Companion Dropper: WinSATSvc

A second .NET 8 binary — WinSATSvc.exe — masquerades as the legitimate Windows System Assessment Tool service. On a 3-minute loop it checks whether the primary agent process is running. If not, it polls the same Discord channels for a restore_manifest message, pulls GZip-compressed restore_chunk attachments, and reassembles them into WinSATTemp.exe — a fresh copy of the primary WindowsAudit.exe agent, not the watchdog itself — then launches it. Requests are keyed by a 12-character hex requestId. The dropper uses 120-second HTTP timeouts over Discord API v10.


Credential Access

MethodDetail
LSASS dumpcomsvcs.dll!MiniDumpWriteDump to disk
SAM/SYSTEM/SECURITY hive dumpVolume Shadow Copy extraction
DPAPI browser credentialsChrome, Edge, Brave; embedded chromelevator.exe fallback
Credential ManagerWindows DPAPI dump
Kerberos attacksKerberoasting, AS-REP roasting, Pass-the-Hash, Pass-the-Ticket
WiFi profilesPlaintext PSK extraction
Token abuseProcess token enumeration, impersonation, steal-from-PID

Active Directory Abuse

The agent ships a near-complete AD attack toolkit:

CategoryCapability
Discoveryad_users, ad_user, local_users, user_logons, dc_logons, enum_spns, enum_gpo, netscan, smbscan, enum_shares, enum_sessions (via NetSessionEnum across the domain)
ACL abuseForced password change, add member, take ownership, grant DCSync via ACL write
Delegation abuseRBCD (Resource-Based Constrained Delegation)
ACL graphingBloodHound-style ACL path enumeration

From SYSTEM, domain takeover is one command.


Execution, Evasion, and EDR Tear-Down

Userland Hook Bypass (Hell’s Gate)

The agent detects user-mode hooks on NT APIs and recovers original syscall numbers (SSNs) so syscalls bypass EDR userland instrumentation entirely.

EDR Removal

Targets CrowdStrike, SentinelOne, Carbon Black, Cylance, Symantec, McAfee, Trellix, Sophos, ESET, Kaspersky, Trend Micro, Cortex XDR, Cybereason, Bitdefender, Webroot, and Malwarebytes — detected by registry uninstall key, service name, and install directory.

Removal sequence:

  1. Silent uninstall via registry-parsed uninstall strings
  2. sc.exe force-stop + takeown.exe / icacls.exe / rd /s /q on install directories
  3. If both fail: reboot into Safe Mode (bcdedit /set {current} safeboot minimal), run RemoteAdminEdrCleanup scheduled task, remove EDR SafeBoot registry entries, restore normal boot, reboot again

In-Process Patches

PatchDetail
AMSIPatches amsi!AmsiScanBuffer in-process, defeating script-content scanning
ETWPatches ntdll!EtwEventWrite to suppress event tracing telemetry

Execution Primitives

The agent supports four execution methods:

  • exec — CMD shell
  • ps — PowerShell
  • shell_start / shell_input / shell_stop — interactive shell sessions over Discord threads
  • smb_exec — remote execution via WMI/SMB on remote hosts

Process Manipulation

  • APC injection / process hollowing (process_hollow)
  • Parent PID spoofing (ppid_spoof)
  • PE header zeroing (pe_stomp) in self, by name, or by PID

Surveillance Capabilities

CapabilityCommand
Screenshotscreenshot
Screen recording (H.264 MP4)record
Live screen stream to Discordstream_start / stream_stop
Webcam capture (MediaFoundation)cam_start / cam_stop
Microphone recordingmic_record
Keylogger (WH_KEYBOARD_LL + window title)keylog
Monitor blackoutblackout
Keyboard/mouse lockinput_lock
Windows Geolocationgeolocation

VPN, Tunneling, and Lateral Movement

MethodDetail
WireGuard serverAuto-installed from wireguard[.]com; stands up 10[.]13[.]37[.]1/24 with a New-NetNat split-tunnel rule; operator receives a generated client config
OpenVPN clientConnects to an operator-supplied .ovpn config
SOCKS5 proxyOn-agent SOCKS5 server; combined with a Discord relay proxy, routes traffic through the agent without opening any inbound port
TCP tunnelsBidirectional TCP tunnels through the agent; agent-to-agent relay sessions over Discord via AgentRelayManager
Agent deploymentdeploy_agent pushes the binary to a target via SMB + sc.exe using a relay agent on the same network

Indicators of Compromise

Hashes, the Discord bot token, channel/guild IDs, and the MQTT broker hostname and credentials are redacted here. The full IOC set is available from contact@profero.io.

Note on IPs: IP addresses below resolved to Discord and Cloudflare CDN endpoints at analysis time. They rotate and are not safe to block outright. Use them for retrospective hunting; base prevention on domain and TLS-SNI indicators.

File System

PathDescription
%CommonProgramData%\Microsoft\Windows\WinSAT\WinSATTemp.exePrimary agent self-backup
%CommonProgramData%\Microsoft\Windows\WinSAT\WinSATSvc.exeCompanion dropper

Services

NameDescription
WindowsAuditPrimary RAT service (LocalSystem, auto start)
WinSATSvcCompanion dropper service

Registry

KeyValueData
HKCU\...\CurrentVersion\RunWinSATServicePath to WinSATSvc.exe
HKCU\...\CurrentVersion\RunWindowsAuditSvcPath to primary agent

Scheduled Tasks

NameTrigger
RemoteAdminEdrCleanupOn startup (Safe Mode)

Mutex

Global\WindowsAuditSingleInstance

Network (DNS / TLS SNI)

IndicatorTypeNote
discord[.]comDomainPrimary C2
gateway[.]discord[.]ggDomainWebSocket gateway
*[.]hivemq[.]cloudDomainMQTT secondary C2 (port 8883)
api[.]ipify[.]orgDomainPublic IP probe
download[.]wireguard[.]comDomainWireGuard installer source
r13[.]c[.]lencr[.]orgDomainLet’s Encrypt CRL (execution timing correlator)

Other Artifacts

ArtifactValue
Internal version stringv1.5.77
Discord bot “Now Playing” statusv1.5.77
WireGuard server subnet10[.]13[.]37[.]1/24
Public IP probe URLhxxps://api[.]ipify[.]org

Detection Guidance

  1. Service creation — Alert on any service with display name "Windows Audit", description "Windows security audit and compliance monitoring service", or where binPath points outside %SystemRoot% or Program Files.

  2. Defender exclusion — EDR rule for Add-MpPreference -ExclusionPath ... -ExclusionProcess WindowsAudit.exe; flag any Add-MpPreference issued from a non-administrative process tree.

  3. Safe Mode pivot — Alert on bcdedit /set {current} safeboot minimal, creation of the RemoteAdminEdrCleanup scheduled task, or deletion of SafeBoot registry entries for EDR services.

  4. Discord/MQTT egress — Block or alert on TLS connections from server VLANs to discord[.]com, gateway[.]discord[.]gg, and *[.]hivemq[.]cloud. Specific guild and channel IDs for alerting available on request.

  5. Persistence triplet — Hunt for simultaneous presence of the WindowsAudit service + WinSATTemp.exe in the WinSAT directory + both HKCU Run keys. No legitimate software leaves this combination.

  6. Mutex — Any endpoint tool that enumerates kernel objects will find Global\WindowsAuditSingleInstance on infected hosts.


MITRE ATT&CK Mapping (Selected)

TechniqueIDTactic
Signed Binary Proxy ExecutionT1218Defense Evasion
AMSI BypassT1562.001Defense Evasion
ETW TamperingT1562.006Defense Evasion
Safe Mode BootT1562.009Defense Evasion
Process Injection (APC)T1055.004Defense Evasion / Privilege Escalation
Parent PID SpoofingT1134.004Defense Evasion
LSASS Memory DumpT1003.001Credential Access
SAM/SYSTEM/SECURITY Hive DumpT1003.002Credential Access
DPAPI Credential TheftT1555.004Credential Access
KerberoastingT1558.003Credential Access
AS-REP RoastingT1558.004Credential Access
Windows ServiceT1543.003Persistence
WMI SubscriptionT1546.003Persistence
Registry Run KeysT1547.001Persistence
Scheduled TaskT1053.005Persistence
Discord C2T1102.002Command and Control
Web Service (MQTT)T1102Command and Control
KeyloggingT1056.001Collection
Screen CaptureT1113Collection
Audio CaptureT1123Collection
Video CaptureT1125Collection
DCSyncT1003.006Credential Access
RBCD Delegation AbuseT1484.001Privilege Escalation

For the full IOC set including hashes, Discord identifiers, and MQTT broker details, contact contact@profero.io.