Detection of PsExec Execution with the Accepteula Flag
The execution of PsExec with the 'accepteula' flag is a common indicator of unauthorized remote code execution and lateral movement activity by threat actors.
PsExec is a legitimate administrative tool from the Sysinternals suite, frequently abused by threat actors for lateral movement and remote code execution within compromised environments. The use of the 'accepteula' flag is a specific artifact indicating that the tool is being executed on a host for the first time by a user, as it programmatically accepts the End User License Agreement. In a production environment, this event is highly unusual and often signals that an attacker is staging tools or establishing a foothold on a newly compromised system. Detection of this command-line argument provides high-fidelity insight into unauthorized administrative activity, which is a precursor to further exploitation, data exfiltration, or ransomware deployment by various advanced threat groups.
Impact
Successful abuse of PsExec allows an adversary to gain remote command execution capabilities under the context of the user running the tool. This frequently leads to lateral movement throughout the network, credential harvesting, and the potential deployment of ransomware. The capability is associated with numerous threat actors and ransomware campaigns, including but not limited to HAFNIUM, Volt Typhoon, Sandworm, and various ransomware groups such as Rhysida, Medusa, and DarkSide.
Recommendation
- Deploy the provided Sigma rule to detect the execution of PsExec with the 'accepteula' flag.
- Ensure endpoint logs (Sysmon Event ID 1 or Windows Event Log 4688) include full command-line arguments to facilitate this detection.
- Investigate all alerts generated by this rule, as legitimate administrative use of PsExec with 'accepteula' should be infrequent on production systems.
- Use the provided drilldown searches to correlate this process execution with other risk events for the involved user and destination host.
Immediate actions
Deploy the Sigma rule for PsExec detection
Threat Hunt
Search for historical instances of psexec.exe usage in EDR logs
Data: Process creation events
Mitigations
Restrict usage of administrative tools to authorized jump servers only
T1021.002
Detection coverage 1
Detect PsExec With Accepteula Flag
mediumDetects the execution of PsExec or PsExec64 with the accepteula flag, indicating first-time usage which may suggest unauthorized remote activity.
Detection queries are available on the platform. Get full rules →