Created on
10-07-2025
12:23 AM
Edited on
10-07-2025
12:24 AM
By
Jean-Philippe_P
Description | This article describes how to log and search for PowerShell commands executed in interactive mode in Threat Hunting. |
Scope | FortiEDR version 5.2 and above. |
Solution |
With FortiEDR, it is possible to log and search for PowerShell commands executed in interactive mode using Threat Hunting functionality.
To parse event ID 4104, configure the following:
Once the new event ID 4104 entry is generated on the device, it will be recorded in the Threat Hunting Repository and can be queried with the query: 'EventLog.EventID: ("4104")':
To filter the exact event, i.e., related to a specific security event, use the part of the command as the search condition. In the sample event network connection to the specific IP was initiated:
It is possible to filter the event log entry containing the command by using the correct event ID and destination as the conditions: 'EventLog.EventID: ("4104")' and *<destination_ip>*:
|
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.