FortiSIEM Rules

Windows: Powershell opening TCP Connection

Rule ID

PH_Rule_TH_ES_WINDOWS_9

Default Status

Enabled

Description

Detects Windows Powershell opening TCP Connection

Severity

7

Category

Security

MITRE ATT&CK® Tactics

Command and Control

Command and Control consists of techniques that adversaries may use to communicate with systems under their control within a victim network. Adversaries commonly attempt to mimic normal, expected traffic to avoid detection. There are many ways an adversary can establish command and control with various levels of stealth depending on the victim’s network structure and defenses.

https://attack.mitre.org/tactics/TA0011

MITRE ATT&CK® Techniques

No Technique Specified

Impacts

Network

Data Source

Windows App Log / Agent or OMI

Detection

Correlation

Remediation Guidance

No remediation guidance specified

Time Window

If the following pattern or patterns match an ingested event within the given time window in seconds, trigger an incident.

300 seconds

Trigger Conditions

If the following defined pattern/s occur within a 300 second time window.

Hafnium

SubPattern Definitions

SubPattern Name: Hafnium

This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.

SubPattern Query

This is the query logic that matches incoming events

eventType="Win-PowerShell-4104" AND msg REGEXP ( ".*Invoke-PowerShellTCP.*" )

Group by Attributes

This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID

hostName

Aggregate Constraint

This is most typically a numerical constraint that defines when the rule should trigger an incident

COUNT(*) >= 1

Incident Attribute Mapping

This section defines which fields in matching raw events should be mapped to the incident attributes in the resulting incident.

The available raw event attributes to map are limited to the group by attributes and the aggregate event constraint fields for each subpattern

 hostName = Hafnium.hostName