Detect Graphical User Interface in Splunk
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.
MITRE ATT&CK
- Tactic
- Execution
- Canonical reference
- https://attack.mitre.org/techniques/T1061/
SPL Detection Query
| union
[
search index=wineventlog sourcetype="WinEventLog:Security" EventCode=4624 Logon_Type=10
| eval event_type="remote_interactive_logon"
| eval src_ip=Source_Network_Address
| where src_ip != "-" AND src_ip != "127.0.0.1" AND src_ip != "::1"
| where NOT match(Account_Name, "\$$")
| eval logon_time=_time
| table _time, host, Account_Name, Account_Domain, Logon_Type, src_ip, src_port, event_type, logon_time
],
[
search 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="*\\certutil.exe" OR Image="*\\net.exe"
OR Image="*\\whoami.exe" OR Image="*\\nltest.exe" OR Image="*\\wmic.exe"
OR Image="*\\mimikatz.exe" OR Image="*\\procdump.exe" OR Image="*\\psexec.exe")
| eval event_type="gui_spawned_suspicious_process"
| eval process_time=_time
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine, event_type, process_time
]
| eval normed_host=lower(host)
| stats
values(src_ip) as src_ips,
values(Account_Name) as logon_accounts,
values(Image) as spawned_processes,
values(CommandLine) as command_lines,
values(event_type) as event_types,
min(logon_time) as first_logon,
min(process_time) as first_process,
count by normed_host
| eval time_delta_minutes=round((first_process - first_logon) / 60, 1)
| where time_delta_minutes >= 0 AND time_delta_minutes <= 60
| where mvcount(event_types) > 1
| table normed_host, src_ips, logon_accounts, spawned_processes, command_lines,
first_logon, first_process, time_delta_minutes, count
| sort - count Detects suspicious GUI-based execution by correlating Windows Security Event ID 4624 (Logon Type 10 remote interactive) with Sysmon Event ID 1 process creation events where explorer.exe spawns suspicious tools. Joins on hostname and correlates events within a 60-minute window, requiring both a remote interactive logon and subsequent suspicious process execution to reduce false positives. The time_delta_minutes field helps analysts understand how quickly post-logon activity occurred.
Data Sources
Required Sourcetypes
False Positives & Tuning
- Legitimate IT administrators using RDP to remote into systems and then launching administrative tools via GUI shortcuts or Start menu
- Automated RDP-based provisioning or configuration management solutions that launch tools interactively
- Help desk staff performing interactive troubleshooting via remote desktop sessions and running diagnostic utilities
- Software testers running GUI-based test automation that connects via RDP and executes command-line tooling
Other platforms for T1061
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.
- 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.
- 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.
- 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.
- 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.
- 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.
References (9)
- https://attack.mitre.org/techniques/T1061/
- https://attack.mitre.org/techniques/T1021/001/
- https://en.wikipedia.org/wiki/Run_command
- https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-client-faq
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceprocessevents-table
- https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/event-4624
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1021.001/T1021.001.md
- https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4624
- https://github.com/JPCERTCC/LogonTracer
Unlock Pro Content
Get the full detection package for T1061 including response playbook, investigation guide, and atomic red team tests.