Overview
TheExplorerRunCommands command enumerates recent commands executed via the Windows Explorer “Run” dialog (Win+R). This reveals commands, scripts, and applications that users have recently launched, providing insight into user activities and system usage patterns.
Important: User commands run for the current user if not elevated and for ALL users if elevated.
Syntax
Output
The command returns:- Commands executed via the Run dialog
- Full command strings including arguments
- Execution order (MRU ranking)
- User context for each command
- Paths to executables, scripts, or network resources
Use Cases
Red Team
- Command History: Discover administrative tools and scripts users have executed
- Credential Discovery: Find commands that may have included passwords or sensitive data
- Network Mapping: Identify network shares and remote systems accessed via Run
- Tool Detection: Discover security tools or monitoring software in use
- Lateral Movement: Find remote system access patterns and administrative commands
Blue Team
- Security Auditing: Review commands for suspicious or unauthorized activity
- Incident Response: Track user actions during security events
- Compliance Monitoring: Ensure commands align with security policies
- User Training: Identify users executing risky commands
- Threat Hunting: Search for malicious command patterns or indicators of compromise
Example Output
Privilege Context
- Non-Elevated: Returns Run command history for the current user only
- Elevated: Returns Run command history for ALL users on the system, providing comprehensive visibility of executed commands across all user accounts
Remote Execution
This command supports remote execution (marked with + in the command list). Remote syntax:Detection Considerations
Indicators
- Registry enumeration of RunMRU keys
- Access to user registry hives (HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU)
- Reading command history data
- Enumeration across multiple user profiles
Defensive Monitoring
- Monitor registry access to RunMRU keys
- Alert on automated enumeration of command history
- Track processes reading Run dialog history
- Log unusual access patterns to Explorer MRU data
- Detect reconnaissance tools querying command history
- Monitor for suspicious command patterns in Run history
- Alert on commands containing credentials or sensitive data
Suspicious Command Indicators
- Commands with encoded or obfuscated content
- PowerShell with execution policy bypass flags
- Remote execution tools (psexec, wmic, etc.)
- Network path access to administrative shares
- Registry editor or system tool access
- Commands accessing sensitive directories
Related Commands
- ExplorerMRUs: Shows recently used files in Explorer
- PowerShellHistory: Searches PowerShell console history
- ProcessCreationEvents: Shows process creation event logs
- EnvironmentVariables: May reveal command paths and configurations