PowerShell Logging: How to Identify Suspicious Activity

PowerShell Logging requires reading the full event, not just the Event ID: time, computer, user, Logon ID, Process, network source, and organizational context. The conclusion is formed by correlating several sources.
Investigating Windows and Identity relies on a combination of authentication events, process creation, permission changes, Sysmon Telemetry, and organizational context. A single event almost never provides a complete conclusion. This article focuses on PowerShell Logging and is intended for SOC analysts and Windows investigators. The goal is to provide a working method that can be applied in practice, during a professional interview, and in a work environment, without settling for a dictionary definition.
The main challenge is that data is almost always partial. Event 4104 Script Block Logging, Event 4103 Module Logging, and the Operational channel can indicate a direction, but their meaning depends on the time, asset, user, and expected activity. Therefore, we will build the investigation around an investigative question, required evidence, and clear termination criteria.
The practical scenario in the article is: investigating a simulated script that downloads a file in a lab. All examples are lab data or process descriptions. When it comes to Penetration Testing, Web, or Cloud, one should only work with explicit authorization, a defined Scope, and the ability to stop the test.




