T1061

Graphical User Interface

Execution Last updated:

Adversaries may use a system's graphical user interface (GUI) during an operation, commonly through a remote interactive session such as Remote Desktop Protocol (RDP), instead of a command-line interpreter. GUI-based interaction allows adversaries to search for information, execute files via mouse double-click, use the Windows Run command, or perform other actions that may be more difficult to monitor than command-line activity. This technique has been deprecated in favor of Remote Services (T1021), but detection of suspicious interactive GUI sessions remains operationally relevant. Key indicators include remote interactive logon events (Logon Type 10), unexpected explorer.exe child processes, Run dialog command usage, and interactive sessions established outside of normal business hours or from unusual source IP addresses.

What is T1061 Graphical User Interface?

Graphical User Interface (T1061) maps to the Execution tactic — the adversary is trying to run malicious code in MITRE ATT&CK.

This page provides production-ready detection logic for Graphical User Interface, covering the data sources and telemetry it touches: Logon Session: Logon Session Creation, Process: Process Creation, Network Traffic: Network Connection Creation, Windows Security Event Log. The queries below are rated medium severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Execution
Canonical reference
https://attack.mitre.org/techniques/T1061/
Microsoft Sentinel / Defender
kusto
// T1061 - Graphical User Interface: Detect suspicious remote interactive (RDP) sessions and GUI-based execution patterns
let SuspiciousGUIProcesses = dynamic([
  "cmd.exe", "powershell.exe", "pwsh.exe", "mshta.exe", "wscript.exe", "cscript.exe",
  "regsvr32.exe", "rundll32.exe", "msbuild.exe", "certutil.exe", "bitsadmin.exe",
  "net.exe", "net1.exe", "whoami.exe", "ipconfig.exe", "nltest.exe",
  "mimikatz.exe", "procdump.exe", "psexec.exe", "wmic.exe"
]);
let RunDialogIndicators = dynamic([
  "shell:startup", "shell:common startup", "%temp%", "%appdata%",
  "cmd /c", "powershell", "wscript", "cscript", "mshta"
]);
// Branch 1: Remote interactive logon events (Logon Type 10 = RemoteInteractive)
let RemoteInteractiveLogons = SecurityEvent
| where TimeGenerated > ago(24h)
| where EventID == 4624
| where LogonType == 10
| where AccountName !endswith "$"
| where IpAddress != "-" and IpAddress != "127.0.0.1" and IpAddress != "::1"
| extend SessionType = "RemoteInteractive_RDP"
| project TimeGenerated, Computer, AccountName, AccountDomain, LogonType,
          IpAddress, IpPort, LogonProcessName, AuthenticationPackageName, SessionType;
// Branch 2: Suspicious processes spawned by explorer.exe (GUI double-click or Run dialog)
let ExplorerSpawnedSuspicious = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName =~ "explorer.exe"
| where FileName in~ (SuspiciousGUIProcesses)
| extend SessionType = "GUI_ExplorerChild"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine, SessionType;
// Branch 3: Run dialog (RunDlg32) invocations with suspicious content
let RunDialogExecution = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName =~ "explorer.exe"
| where FileName in~ ("rundll32.exe")
| where ProcessCommandLine has_all ("shell32.dll", "RunDlg32")
| extend SessionType = "RunDialog_Launch"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
          InitiatingProcessFileName, InitiatingProcessCommandLine, SessionType;
// Combine results
RemoteInteractiveLogons
| join kind=inner (
    ExplorerSpawnedSuspicious
    | extend TimeGenerated = Timestamp
    | union (RunDialogExecution | extend TimeGenerated = Timestamp)
) on $left.Computer == $right.DeviceName
| where datetime_diff('minute', TimeGenerated1, TimeGenerated) between (0 .. 60)
| project TimeGenerated, Computer, AccountName, IpAddress,
          SpawnedProcess = FileName, CommandLine = ProcessCommandLine,
          ParentProcess = InitiatingProcessFileName, SessionType, SessionType1
| sort by TimeGenerated desc

Detects suspicious GUI-based adversary activity by correlating remote interactive logon events (Logon Type 10, RDP) with subsequent suspicious process execution via explorer.exe child processes or Windows Run dialog. Uses SecurityEvent for logon tracking and DeviceProcessEvents for process genealogy. Flags interactive sessions from external IPs followed by execution of reconnaissance, credential dumping, or lateral movement tools launched through the GUI rather than a command shell.

medium severity medium confidence

Data Sources

Logon Session: Logon Session Creation Process: Process Creation Network Traffic: Network Connection Creation Windows Security Event Log

Required Tables

SecurityEvent DeviceProcessEvents

False Positives

  • Legitimate remote administration by IT staff connecting via RDP to manage servers and workstations
  • Help desk personnel using remote desktop to assist end users, spawning diagnostic tools like cmd.exe or PowerShell
  • Developers using interactive RDP sessions on build servers and launching development tools via GUI
  • Jump box or bastion host users who routinely access systems interactively and run standard administrative commands

Sigma rule & cross-platform mapping

The detection logic for Graphical User Interface (T1061) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: process_creation
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Remote Desktop Session with Suspicious Process Execution

    Expected signal: Security Event ID 4624 (Logon Type 10) on target host showing source IP 127.0.0.1 (loopback for local test). Sysmon Event ID 1: cmd.exe created with ParentImage=explorer.exe and CommandLine containing whoami, ipconfig, net. Security Event ID 4634/4647 on logoff.

  2. Test 2Windows Run Dialog Command Execution

    Expected signal: Sysmon Event ID 1: cmd.exe created with ParentImage=explorer.exe (Run dialog parent). Sysmon Event ID 13: Registry value set under HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU recording the executed command. File creation of gui_test.txt in TEMP.

  3. Test 3RDP Session Discovery Commands via GUI

    Expected signal: Sysmon Event ID 1 for cmd.exe spawned by explorer.exe, followed by child processes (whoami.exe, net.exe, ipconfig.exe, systeminfo.exe, tasklist.exe, netstat.exe, nltest.exe, reg.exe). Multiple process creation events within seconds from the same parent PID.

  4. Test 4Explorer File Double-Click Execution via GUI

    Expected signal: Sysmon Event ID 11: File creation of update_service.exe in TEMP. Sysmon Event ID 1: calc.exe (renamed update_service.exe) created with ParentImage=explorer.exe. The renamed binary parent-child relationship is a key indicator of GUI double-click execution.

  5. Test 5Enumerate Recent RDP Connection History

    Expected signal: Sysmon Event ID 1: reg.exe created with CommandLine querying Terminal Server Client registry paths. Sysmon Event ID 13: Registry value set under HKCU\Software\Microsoft\Terminal Server Client\Default for the simulated connection. Provides evidence of an adversary enumerating RDP history to identify lateral movement targets.


Response Playbook

Triage

  1. Identify the source IP of the remote interactive session — is it an internal corporate IP, a VPN egress node, a known jump box, or an external/residential IP? External IPs are high priority.
  2. Verify whether the account that established the RDP session is authorized for remote desktop access to this specific host. Check Active Directory group membership for 'Remote Desktop Users' and any exception lists.
  3. Review the timing of the logon — does it fall within normal business hours and the user's typical work pattern? Off-hours RDP from an unfamiliar IP is a strong indicator.
  4. Examine all processes created under explorer.exe during the session window. Legitimate admin activity typically involves known management tools; look for reconnaissance tools (whoami, nltest, ipconfig), credential tools (mimikatz, procdump), or scripting engines launched without prior scheduled task context.
  5. Check for Windows Run command usage by querying the RunMRU registry key on the target host — this records every command entered via Win+R during the session.
  6. Determine if the user was aware of this session by contacting them through an out-of-band channel (phone, Slack). If the user denies initiating the session, treat as confirmed compromise.
  7. Cross-reference the source IP against threat intelligence feeds and recent failed authentication attempts (Event ID 4625) from the same IP.

Containment

  1. If unauthorized RDP access is confirmed: immediately terminate the active RDP session and block the source IP at the perimeter firewall and network ACLs.
  2. Isolate the compromised endpoint from the network using EDR network isolation to prevent lateral movement while forensic investigation proceeds.
  3. Disable or reset the compromised account in Active Directory, invalidate all active Kerberos tickets (purge TGTs), and revoke SAML/OAuth tokens if SSO is in use.
  4. If credential dumping is suspected from the GUI session: initiate a forced password reset for all accounts whose hashes may have been exposed, prioritizing privileged and service accounts.
  5. Restrict RDP access at the firewall level to only authorized jump boxes or VPN ranges if not already enforced. Disable RDP on hosts that do not require it via Group Policy.
  6. Review and terminate any scheduled tasks, services, or persistence mechanisms created during the suspicious GUI session.

Evidence Collection

  1. Windows Security Event Log — Event ID 4624 (Logon Type 10) for session establishment, 4634/4647 for logoff, 4648 for explicit credential use during session. Correlate with 4688 (process creation with command line auditing enabled).
  2. Sysmon Event ID 1 — Full process creation records under explorer.exe during the session timeframe, including parent-child relationships and command lines.
  3. Sysmon Event ID 3 — Network connections initiated by processes launched during the GUI session, capturing C2 beacons or lateral movement traffic.
  4. Sysmon Event ID 11/12/13 — File and registry modifications made during the session, revealing dropped payloads, persistence installations, or configuration changes.
  5. Windows Registry — HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU records all Windows Run dialog commands entered during the session.
  6. Windows Registry — HKCU\Software\Microsoft\Terminal Server Client\Default and Servers entries on the attacker-side host (if accessible) record RDP connection history.
  7. RDP Bitmap Cache — %LOCALAPPDATA%\Microsoft\Terminal Server Client\Cache\ on the connecting machine may contain visual evidence of what the attacker viewed.
  8. Prefetch files — C:\Windows\Prefetch\ records execution timestamps for any binaries run during the GUI session.
  9. ETW traces — Microsoft-Windows-TerminalServices-LocalSessionManager/Operational (Event IDs 21, 22, 23, 24, 25) for full RDP session lifecycle.
  10. Network logs — Capture RDP traffic (TCP/3389 or alternate port) metadata from firewall/proxy logs to establish session duration and data volume.

Escalation Criteria

  • ! RDP session originates from an external IP address or a country inconsistent with the organization's operations.
  • ! Compromised account belongs to a privileged tier (Domain Admin, Enterprise Admin, service account with broad permissions).
  • ! Credential dumping tools or techniques are detected during the GUI session (procdump targeting lsass.exe, comsvcs.dll MiniDump, mimikatz artifacts).
  • ! Evidence of lateral movement from the compromised host following the GUI session (new RDP connections, SMB authentication events, PsExec service installation).
  • ! Persistence mechanisms installed during the session (new scheduled tasks, registry run keys, new services, startup folder files).
  • ! Data staging or exfiltration indicators: large file copies, archive creation (7z, zip), or outbound connections to non-corporate destinations from processes launched in the session.
  • ! Multiple hosts accessed via RDP from the same source IP within a short timeframe, indicating systematic network traversal.

Investigation Guide

Forensic Artifacts

  • > Registry: HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU — ordered list of all commands entered via Windows Run dialog (Win+R) with MRUList tracking order
  • > Registry: HKCU\Software\Microsoft\Terminal Server Client\Default — MRU list of recently connected RDP hosts from this machine as a client
  • > Registry: HKCU\Software\Microsoft\Terminal Server Client\Servers\ — per-host subkeys storing username hints for recent RDP connections
  • > File System: %LOCALAPPDATA%\Microsoft\Terminal Server Client\Cache\bcache*.bmc — RDP bitmap cache files on connecting machine, potentially reconstructable with tools like bmc-tools
  • > File System: C:\Windows\System32\winevt\Logs\Microsoft-Windows-TerminalServices-LocalSessionManager%4Operational.evtx — RDP session lifecycle events (21=logon, 22=shell start, 23=logoff, 24=disconnect, 25=reconnect)
  • > File System: C:\Windows\System32\winevt\Logs\Microsoft-Windows-TerminalServices-RemoteConnectionManager%4Operational.evtx — RDP connection attempt events including source IP
  • > File System: C:\Windows\Prefetch\ — execution evidence for any binaries run during the GUI session, with timestamps
  • > File System: %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Recent\ — recently accessed files via GUI interaction (Explorer LNK files)
  • > Event Log: Security Event ID 4624 Logon Type 10 (RemoteInteractive) and Type 7 (Unlock) in Security.evtx
  • > Event Log: Microsoft-Windows-Windows Defender/Operational — any real-time protection events triggered during the session
  • > Network: Firewall/proxy logs for TCP/3389 (default RDP) or alternate RDP port connections — session duration and byte count

Tuning Guidance

T1061 is a deprecated technique with broad overlap to T1021.001 (RDP). Tuning is primarily about reducing false positives from legitimate administrative RDP usage, which is common in enterprise environments. Start by building a baseline of authorized remote administrators: create an allowlist of (AccountName, SourceIP, TargetHost) tuples representing approved jump-box-to-server RDP paths. Suppress alerts where source IP is a known management VLAN or approved VPN egress range. For the explorer.exe child process detections, baseline which tools IT staff routinely launch interactively — cmd.exe and PowerShell from explorer.exe are common on developer and admin machines and should be allowlisted per host tier (workstations vs. servers vs. domain controllers). The Run dialog registry query is low-volume in enterprise environments and rarely generates false positives; tune by excluding automated configuration management agents that may touch HKCU hive during provisioning. Consider raising severity to 'high' for domain controllers and high-value servers where interactive logons should be extremely rare. The correlation-based queries (joining logon events to process events) have lower false positive rates than either signal alone — prefer these for production alerting and use single-signal queries for hunting only.


Hunting Queries

Hunt for remote interactive (RDP) logon sessions occurring outside business hours or on weekends, or accounts logging in from an unusually high number of distinct source IPs. These patterns are strong indicators of unauthorized access where an attacker operates outside the victim organization's normal active hours.

Hunting — KQL
kql
// Hunt for remote interactive sessions outside business hours or from unusual geographies
SecurityEvent
| where TimeGenerated > ago(7d)
| where EventID == 4624
| where LogonType == 10
| where AccountName !endswith "$"
| where IpAddress !in ("127.0.0.1", "::1", "-")
| extend HourOfDay = hourofday(TimeGenerated)
| extend DayOfWeek = dayofweek(TimeGenerated)
| extend OffHours = iff(HourOfDay < 7 or HourOfDay > 20, true, false)
| extend Weekend = iff(DayOfWeek == 0d or DayOfWeek == 6d, true, false)
| summarize
    SessionCount = count(),
    UniqueSourceIPs = dcount(IpAddress),
    SourceIPs = make_set(IpAddress, 20),
    OffHourSessions = countif(OffHours == true),
    WeekendSessions = countif(Weekend == true),
    FirstSeen = min(TimeGenerated),
    LastSeen = max(TimeGenerated)
  by Computer, AccountName
| where OffHourSessions > 0 or WeekendSessions > 0 or UniqueSourceIPs > 3
| sort by OffHourSessions desc
Hunting — SPL
spl
index=wineventlog sourcetype="WinEventLog:Security" EventCode=4624 Logon_Type=10
  NOT Account_Name="*$"
  NOT Source_Network_Address IN ("-", "127.0.0.1", "::1")
| eval hour=strftime(_time, "%H")
| eval dow=strftime(_time, "%w")
| eval off_hours=if(hour < "07" OR hour > "20", 1, 0)
| eval weekend=if(dow="0" OR dow="6", 1, 0)
| stats
    count as session_count,
    dc(Source_Network_Address) as unique_src_ips,
    values(Source_Network_Address) as src_ips,
    sum(off_hours) as off_hour_sessions,
    sum(weekend) as weekend_sessions,
    earliest(_time) as first_seen,
    latest(_time) as last_seen
  by host, Account_Name
| where off_hour_sessions > 0 OR weekend_sessions > 0 OR unique_src_ips > 3
| sort - off_hour_sessions

Hunt for clusters of suspicious process executions launched through explorer.exe within hourly windows. Groups by host and user to identify sessions with multiple tool executions suggesting systematic post-exploitation activity. Categorizes findings into reconnaissance tools, scripting engines, and LOLBins to help analysts assess severity without joining to logon events.

Hunting — KQL
kql
// Hunt for processes launched via explorer.exe during known RDP session windows - without requiring join
DeviceProcessEvents
| where Timestamp > ago(7d)
| where InitiatingProcessFileName =~ "explorer.exe"
| where FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "mshta.exe",
                       "wscript.exe", "cscript.exe", "regsvr32.exe", "rundll32.exe",
                       "net.exe", "net1.exe", "whoami.exe", "nltest.exe",
                       "certutil.exe", "bitsadmin.exe", "wmic.exe")
| extend IsReconTool = FileName in~ ("whoami.exe", "nltest.exe", "ipconfig.exe", "net.exe", "net1.exe", "wmic.exe")
| extend IsScriptingEngine = FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe", "mshta.exe")
| extend IsLOLBin = FileName in~ ("certutil.exe", "bitsadmin.exe", "regsvr32.exe", "rundll32.exe")
| summarize
    Count = count(),
    ReconCount = countif(IsReconTool),
    ScriptCount = countif(IsScriptingEngine),
    LOLBinCount = countif(IsLOLBin),
    UniqueProcesses = dcount(FileName),
    ProcessList = make_set(FileName),
    CommandLines = make_set(ProcessCommandLine, 10)
  by DeviceName, AccountName, bin(Timestamp, 1h)
| where ReconCount > 0 or ScriptCount > 1 or LOLBinCount > 0
| sort by Timestamp desc
Hunting — SPL
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
  ParentImage="*\\explorer.exe"
  (Image="*\\cmd.exe" OR Image="*\\powershell.exe" OR Image="*\\pwsh.exe"
   OR Image="*\\mshta.exe" OR Image="*\\wscript.exe" OR Image="*\\cscript.exe"
   OR Image="*\\regsvr32.exe" OR Image="*\\rundll32.exe" OR Image="*\\net.exe"
   OR Image="*\\net1.exe" OR Image="*\\whoami.exe" OR Image="*\\nltest.exe"
   OR Image="*\\certutil.exe" OR Image="*\\bitsadmin.exe" OR Image="*\\wmic.exe")
| eval is_recon=if(match(Image, "(whoami|nltest|ipconfig|net\.exe|net1|wmic)"), 1, 0)
| eval is_scripting=if(match(Image, "(cmd\.exe|powershell|pwsh|wscript|cscript|mshta)"), 1, 0)
| eval is_lolbin=if(match(Image, "(certutil|bitsadmin|regsvr32|rundll32)"), 1, 0)
| bin _time span=1h
| stats
    count as total,
    sum(is_recon) as recon_count,
    sum(is_scripting) as scripting_count,
    sum(is_lolbin) as lolbin_count,
    dc(Image) as unique_processes,
    values(Image) as process_list,
    values(CommandLine) as command_lines
  by _time, host, User
| where recon_count > 0 OR scripting_count > 1 OR lolbin_count > 0
| sort - _time

Hunt for Windows Run dialog usage by monitoring RunMRU registry key modifications. The RunMRU key under HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer records every command entered via the Win+R Run dialog. Frequent writes or unusual commands here (especially scripting engines, system tools, or UNC paths) indicate an adversary using the GUI Run dialog to execute tools rather than opening a terminal, a pattern sometimes used to evade command-line focused detections.

Hunting — KQL
kql
// Hunt for Windows Run dialog (RunMRU) registry access patterns — rare in enterprise environments
DeviceRegistryEvents
| where Timestamp > ago(7d)
| where RegistryKey has_all ("Explorer", "RunMRU")
| where ActionType in ("RegistryValueSet", "RegistryKeyCreated")
| project Timestamp, DeviceName, AccountName, ActionType, RegistryKey, RegistryValueName, RegistryValueData, InitiatingProcessFileName, InitiatingProcessCommandLine
| summarize
    RunCount = count(),
    Commands = make_set(RegistryValueData, 20),
    Processes = make_set(InitiatingProcessFileName)
  by DeviceName, AccountName, bin(Timestamp, 1h)
| where RunCount > 0
| sort by RunCount desc
Hunting — SPL
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" (EventCode=12 OR EventCode=13 OR EventCode=14)
  TargetObject="*\\Explorer\\RunMRU*"
| eval action=case(EventCode=12, "key_create", EventCode=13, "value_set", EventCode=14, "key_rename", true(), "unknown")
| bin _time span=1h
| stats
    count as run_count,
    values(Details) as commands_run,
    values(Image) as initiating_processes
  by _time, host, User, action
| sort - run_count

Atomic Red Team Tests

Test 1 Remote Desktop Session with Suspicious Process Execution
windows

Simulates an adversary establishing an RDP session and immediately launching reconnaissance tools via the Windows Run dialog. Generates Logon Type 10 event followed by explorer.exe spawning cmd.exe with discovery commands. Requires an RDP client and a test machine where RDP is enabled.

Command

powershell
mstsc /v:127.0.0.1 /w:1024 /h:768
:: After connection, in the RDP session run:
cmd.exe /c whoami && ipconfig /all && net user && net localgroup administrators

Cleanup

powershell
logoff

Expected Telemetry

Security Event ID 4624 (Logon Type 10) on target host showing source IP 127.0.0.1 (loopback for local test). Sysmon Event ID 1: cmd.exe created with ParentImage=explorer.exe and CommandLine containing whoami, ipconfig, net. Security Event ID 4634/4647 on logoff.

Expected Detection

KQL join query correlates Logon Type 10 event with explorer.exe spawning cmd.exe within 60-minute window. SPL correlation fires on matching host with both event_type values present. Hunting query 2 flags ReconCount > 0 for the session window.

Test 2 Windows Run Dialog Command Execution
windows

Simulates an adversary using the Windows Run dialog (Win+R) to execute a command — a GUI-based execution method that bypasses some command-line monitoring focused on terminal spawning. Writes to RunMRU registry key, which is a forensic artifact of this technique.

Command

powershell
powershell.exe -Command "$wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESC}'); Start-Sleep -Milliseconds 500; $wshell.SendKeys('^r'); Start-Sleep -Milliseconds 500; $wshell.SendKeys('cmd.exe /c whoami > %TEMP%\gui_test.txt'); $wshell.SendKeys('{ENTER}')"

Cleanup

powershell
Remove-Item $env:TEMP\gui_test.txt -ErrorAction SilentlyContinue

Expected Telemetry

Sysmon Event ID 1: cmd.exe created with ParentImage=explorer.exe (Run dialog parent). Sysmon Event ID 13: Registry value set under HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU recording the executed command. File creation of gui_test.txt in TEMP.

Expected Detection

Hunting query 3 (RunMRU registry hunt) detects the registry key modification. Explorer.exe child process hunt detects cmd.exe spawned from explorer.exe.

Test 3 RDP Session Discovery Commands via GUI
windows

Replicates the initial discovery phase an adversary performs after gaining GUI access via RDP — running multiple discovery commands through the Start menu search or Run dialog to map the environment. Generates a burst of explorer.exe child processes in a short window.

Command

powershell
cmd.exe /c "whoami /all & net user & net localgroup administrators & ipconfig /all & systeminfo & tasklist /v & netstat -ano & nltest /domain_trusts & reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"

Expected Telemetry

Sysmon Event ID 1 for cmd.exe spawned by explorer.exe, followed by child processes (whoami.exe, net.exe, ipconfig.exe, systeminfo.exe, tasklist.exe, netstat.exe, nltest.exe, reg.exe). Multiple process creation events within seconds from the same parent PID.

Expected Detection

Hunting query 2 fires: ReconCount > 0 within 1-hour window (whoami, nltest, net all flagged). Main KQL detection correlates with prior Logon Type 10 event if session was remote. SPL composite query shows scripting_count + recon_count elevated.

Test 4 Explorer File Double-Click Execution via GUI
windows

Simulates an adversary double-clicking a dropped executable through Windows Explorer GUI — a common pattern when attackers interact with a system visually rather than through the command line. The executable (a benign calc.exe invocation) is placed in a temp directory and launched via Explorer shell execute.

Command

powershell
powershell.exe -Command "Copy-Item C:\Windows\System32\calc.exe $env:TEMP\update_service.exe; $shell = New-Object -ComObject Shell.Application; $shell.ShellExecute(\"$env:TEMP\update_service.exe\")"

Cleanup

powershell
Remove-Item $env:TEMP\update_service.exe -ErrorAction SilentlyContinue; Stop-Process -Name 'CalculatorApp' -ErrorAction SilentlyContinue

Expected Telemetry

Sysmon Event ID 11: File creation of update_service.exe in TEMP. Sysmon Event ID 1: calc.exe (renamed update_service.exe) created with ParentImage=explorer.exe. The renamed binary parent-child relationship is a key indicator of GUI double-click execution.

Expected Detection

DeviceFileEvents picks up the suspicious binary drop in TEMP. DeviceProcessEvents records explorer.exe spawning the renamed executable. Combination of file drop in TEMP followed by immediate explorer.exe execution of that file is a high-fidelity pattern.

Test 5 Enumerate Recent RDP Connection History
windows

Reads the Terminal Server Client registry keys that record recent RDP connections — a forensic artifact that adversaries may access to identify previously connected hosts for lateral movement planning. Also simulates writing to these keys as would occur after an RDP connection.

Command

powershell
reg query "HKCU\Software\Microsoft\Terminal Server Client\Default" /v MRU0 2>nul & reg query "HKCU\Software\Microsoft\Terminal Server Client\Servers" 2>nul & reg add "HKCU\Software\Microsoft\Terminal Server Client\Default" /v MRU0 /t REG_SZ /d "192.168.1.100" /f

Cleanup

powershell
reg delete "HKCU\Software\Microsoft\Terminal Server Client\Default" /v MRU0 /f 2>nul

Expected Telemetry

Sysmon Event ID 1: reg.exe created with CommandLine querying Terminal Server Client registry paths. Sysmon Event ID 13: Registry value set under HKCU\Software\Microsoft\Terminal Server Client\Default for the simulated connection. Provides evidence of an adversary enumerating RDP history to identify lateral movement targets.

Expected Detection

DeviceRegistryEvents query for Terminal Server Client registry access. Process tree showing cmd.exe or PowerShell querying RDP MRU keys is a lateral movement planning indicator.

Related Detections

Tactic Hub