PH_Rule_SIGMA_1076
Enabled
Detects the usage of the direct syscall of NtOpenProcess which might be done from a CobaltStrike BOF. This rule is adapted from https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_access/proc_access_win_direct_syscall_ntopenprocess.yml
7
Security
Execution
Execution consists of techniques that result in adversary-controlled code running on a local or remote system. Techniques that run malicious code are often paired with techniques from all other tactics to achieve broader goals, like exploring a network or stealing data. For example, an adversary might use a remote access tool to run a PowerShell script that does Remote System Discovery.
https://attack.mitre.org/tactics/TA0002T1106
Native API
Adversaries may directly interact with the native OS application programming interface (API) to execute behaviors. Native APIs provide a controlled means of calling low-level OS services within the kernel, such as those involving hardware/devices, memory, and processes. These native APIs are leveraged by the OS during system boot (when other system components are not yet initialized) as well as carrying out tasks and requests during routine operations. Adversaries may abuse these native API functions as a means of executing behaviors.
https://attack.mitre.org/techniques/T1106Server
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-10-ProcessAccess" AND procPath REGEXP "^UNKNOWN" AND ((targetProcName!="C:\\Program Files\\Cylance\\Desktop\\CylanceUI.exe" OR procName!="C:\\Windows\\Explorer.EXE") AND (targetProcName!="C:\\Program Files (x86)\\Microsoft\\EdgeUpdate\\MicrosoftEdgeUpdate.exe" OR procName NOT REGEXP "^C:\\Program Files \(x86\)\\Microsoft\\Temp\\" OR procName NOT REGEXP "\\MicrosoftEdgeUpdate\.exe$") AND (targetProcName NOT REGEXP "vcredist_x64\.exe$" OR procName NOT REGEXP "vcredist_x64\.exe$") AND (targetProcName!="C:\\Windows\\system32\\systeminfo.exe" OR procName NOT REGEXP "setup64\.exe$") AND (targetProcName NOT REGEXP "AmazonSSMAgentSetup\.exe$" OR procName NOT REGEXP "AmazonSSMAgentSetup\.exe$") AND (targetProcName NOT REGEXP "C:\\Program Files\\Mozilla Firefox\\firefox\.exe$" OR procName NOT REGEXP "C:\\Program Files\\Mozilla Firefox\\firefox\.exe$") AND (targetProcName NOT REGEXP "\\AppData\\Local\\Programs\\Microsoft VS Code\\Code\.exe$" OR procName NOT REGEXP "\\AppData\\Local\\Programs\\Microsoft VS Code\\Code\.exe$") AND (targetProcName NOT REGEXP "C:\\Program Files\\Google\\Chrome\\Application\\chrome\.exe$" OR procName NOT REGEXP "C:\\Program Files\\Google\\Chrome\\Application\\chrome\.exe$") AND (targetProcName NOT REGEXP "C:\\Program Files \(x86\)\\Google\\Update\\GoogleUpdate\.exe$" OR procName NOT REGEXP "C:\\Program Files \(x86\)\\Google\\Update\\GoogleUpdate\.exe$") AND (targetProcName NOT REGEXP "\\AppData\\Local\\Microsoft\\Teams\\current\\Teams\.exe$" OR procName NOT REGEXP "\\AppData\\Local\\Microsoft\\Teams\\current\\Teams\.exe$") AND (targetProcName!="C:\\Windows\\System32\\backgroundTaskHost.exe" OR procName!="C:\\Windows\\System32\\backgroundTaskHost.exe") AND (targetProcName!="C:\\Program Files (x86)\\CCleaner Browser\\Application\\CCleanerBrowser.exe" OR procName!="C:\\Program Files (x86)\\CCleaner Browser\\Application\\CCleanerBrowser.exe") AND (targetProcName NOT REGEXP "^C:\\Users\\" OR targetProcName NOT REGEXP ".*\\AppData\\Local\\Discord\\.*" OR targetProcName NOT REGEXP "\\Discord\.exe$") AND (targetProcName!="C:\\WINDOWS\\system32\\AUDIODG.EXE") AND (procName NOT REGEXP "^C:\\Users\\" OR procName NOT REGEXP ".*\\AppData\\Local\\yammerdesktop\\app-.*" OR procName NOT REGEXP "\\Yammer\.exe$" OR targetProcName NOT REGEXP "^C:\\Users\\" OR targetProcName NOT REGEXP ".*\\AppData\\Local\\yammerdesktop\\app-.*" OR targetProcName NOT REGEXP "\\Yammer\.exe$" OR accessKeyId!="0x1000") AND (targetProcName NOT REGEXP "\\Evernote\\Evernote\.exe$"))
This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID
accessKeyId,hostName,procName,procPath,targetProcName
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
accessKeyId = Filter.accessKeyId,
hostName = Filter.hostName,
procName = Filter.procName,
procPath = Filter.procPath,
targetProcName = Filter.targetProcName