Malicious PowerShell Use of EncodedCommand Parameter
Detection of PowerShell processes using the EncodedCommand parameter, often used by adversaries to obfuscate malicious scripts for unauthorized access, privilege escalation, or persistence.
CVE search metadata
CVE search record: CVE-2025-59287. Severity: critical. CVSS: 9.8. EPSS: 71.40%. KEV: yes. Product: Active Directory Certificate Services, Cortex Cloud Identity Security, Cortex XDR, Cortex XSIAM. Brief: Malicious PowerShell Use of EncodedCommand Parameter. Brief link: https://feed.craftedsignal.io/briefs/2024-01-02-powershell-encoded-command/
CVE search record: CVE-2022-26923. Severity: high. CVSS: 8.8. EPSS: 91.44%. KEV: yes. Product: Active Directory Certificate Services, Cortex Cloud Identity Security, Cortex XDR, Cortex XSIAM. Brief: Malicious PowerShell Use of EncodedCommand Parameter. Brief link: https://feed.craftedsignal.io/briefs/2024-01-02-powershell-encoded-command/
Triage facts
Revision 1- Applicability
- Active Directory Certificate Services, Cortex Cloud Identity Security +2
- Evidence
- Confirmed activeHigh confidence
- Severity
- High
- Sources
- 8 public sources
- Freshness
- Revision 1Jan 2, 12:00 UTC
- Detection
- 2 rules
- Vulnerabilities
- 2 CVEs
What's new
- 1. exploited:true; KEV CVE-2025-59287; KEV CVE-2022-26923 Nov 20, 03:10 via cisa-kev
- 2. poc_available; added CVE-2022-26923 +1; OS windows May 11, 22:05 via unit42
Overview
Attackers frequently use the PowerShell EncodedCommand parameter to obfuscate malicious scripts, making detection challenging. This technique allows for the execution of Base64-encoded commands, effectively hiding the true nature of the script from cursory inspection. Defenders should be wary of PowerShell processes using EncodedCommand because successful exploitation can lead to unauthorized access, privilege escalation, and persistent threats. This behavior has been observed across various campaigns, including those targeting SolarWinds WHD (post-exploitation), Ukraine (WhisperGate), and US critical infrastructure (Volt Typhoon). The CVE-2025-59287, affecting Microsoft WSUS, also highlights the risk of PowerShell-based attacks.
Attack Chain
- Initial Access: The attacker gains initial access through various means, such as exploiting a vulnerability or using stolen credentials.
- PowerShell Execution: PowerShell is invoked on the compromised system.
- EncodedCommand Parameter: The attacker uses the
-EncodedCommand(or shortened variations) parameter to pass a Base64-encoded script to PowerShell. - Obfuscation: The encoded script contains malicious commands that are obfuscated to avoid detection by signature-based antivirus solutions.
- Payload Delivery: The decoded script executes, downloading and installing a secondary payload, such as a backdoor or remote access trojan (RAT).
- Privilege Escalation: The payload attempts to escalate privileges on the system, potentially using techniques like exploiting vulnerable services or bypassing User Account Control (UAC).
- Lateral Movement: With elevated privileges, the attacker moves laterally to other systems on the network, often using techniques like Pass-the-Hash or Pass-the-Ticket.
- Objective Achieved: The attacker achieves their objective, such as data exfiltration, ransomware deployment, or system disruption.
Impact
Successful exploitation can result in a range of impacts, including unauthorized access to sensitive data, the deployment of ransomware, and the disruption of critical services. Organizations across various sectors have been targeted, including critical infrastructure (Volt Typhoon) and government entities (WhisperGate). A single successful attack can cost millions of dollars in recovery efforts, lost productivity, and reputational damage.
Recommendation
- Deploy the Sigma rule
Detect PowerShell Encoded Commandto your SIEM to identify suspicious PowerShell processes using theEncodedCommandparameter and tune for your environment. - Enable Sysmon process-creation logging to capture the command-line arguments of PowerShell processes, which is required for the Sigma rule above.
- Investigate any alerts generated by the Sigma rule
Detect PowerShell Encoded Commandto determine if the activity is malicious. - Patch CVE-2025-59287 on all affected Windows systems, especially WSUS servers, to prevent exploitation via PowerShell-based attacks.
Detection coverage 2
Detect PowerShell Encoded Command
highDetects PowerShell processes using the EncodedCommand parameter to execute Base64-encoded commands, a common technique for obfuscating malicious scripts.
Detect PowerShell Encoded Command with Shortened Parameter
mediumDetects PowerShell processes using shortened variations of the EncodedCommand parameter to execute Base64-encoded commands.
Detection queries are available on the platform. Get full rules →