PH_Rule_SIGMA_585
Enabled
Detects the execution of powershell, a WebClient object creation and the invocation of DownloadFile in a single command line. This rule is adapted from https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_powershell_susp_ps_downloadfile.yml
7
Security
Command And Control
T1059.001
Command and Scripting Interpreter: PowerShell
Adversaries may abuse PowerShell commands and scripts for execution. Adversaries can use PowerShell to perform a number of actions, including discovery of information and execution of code.
https://attack.mitre.org/techniques/T1059/001T1104
Multi-Stage Channels
Adversaries may create multiple stages for command and control that are employed under different conditions or for certain functions. Remote access tools will call back to the first-stage command and control server for instructions. The first stage may have automated capabilities to collect basic host information, update tools, and upload additional files. A second remote access tool (RAT) could be uploaded at that point to redirect the host to the second-stage command and control server. Use of multiple stages may obfuscate the command and control channel to make detection more difficult.
https://attack.mitre.org/techniques/T1104T1105
Ingress Tool Transfer
Adversaries may transfer tools or other files from an external system into a compromised environment. Files may be copied from an external adversary controlled system through the command and control channel to bring tools into the victim network or through alternate protocols with another tool such as FTP. Files can also be copied over on Mac and Linux with native tools like scp, rsync, and sftp.
https://attack.mitre.org/techniques/T1105Server
Windows Sysmon via FortiSIEM Agent
Correlation
No remediation guidance specified
If the following pattern or patterns match an ingested event within the given time window in seconds, trigger an incident.
300 seconds
If the following defined pattern/s occur within a 300 second time window.
Filter
This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.
This is the query logic that matches incoming events
eventType="Win-Sysmon-1-Create-Process" AND command REGEXP ".*powershell.*" AND command REGEXP ".*\.DownloadFile.*" AND command REGEXP ".*System\.Net\.WebClient.*"
This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID
command,hostName
This is most typically a numerical constraint that defines when the rule should trigger an incident
COUNT(*) >= 1
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
command = Filter.command,
hostName = Filter.hostName