Files
2021-07-20 21:12:30 +00:00

80 lines
2.9 KiB
YAML

name: Suspicious msbuild path
id: f5198224-551c-11eb-ae93-0242ac130002
version: 1
date: '2021-01-12'
author: Michael Haag, Splunk
type: batch
datamodel:
- Endpoint
description: The following analytic identifies msbuild.exe executing from a non-standard
path. Msbuild.exe is natively found in C:\Windows\Microsoft.NET\Framework\v4.0.30319
and C:\Windows\Microsoft.NET\Framework64\v4.0.30319. Instances of Visual Studio
will run a copy of msbuild.exe. A moved instance of MSBuild is suspicious, however
there are instances of build applications that will move or use a copy of MSBuild.
search: '| tstats `security_content_summariesonly` count values(Processes.process_name)
as process_name values(Processes.process) as process min(_time) as firstTime max(_time)
as lastTime from datamodel=Endpoint.Processes where Processes.process_name=msbuild.exe
AND (Processes.process_path!=c:\\windows\\microsoft.net\\framework*\\v*\\*) by Processes.dest
Processes.parent_process Processes.user | `drop_dm_object_name(Processes)` | `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)`| `suspicious_msbuild_path_filter`'
how_to_implement: To successfully implement this search you need to be ingesting information
on process that include the name of the process responsible for the changes from
your endpoints into the `Endpoint` datamodel in the `Processes` node.
known_false_positives: Some legitimate applications may use a moved copy of msbuild.exe,
triggering a false positive. Baselining of MSBuild.exe usage is recommended to better
understand it's path usage. Visual Studio runs an instance out of a path that will
need to be filtered on.
references:
- https://lolbas-project.github.io/lolbas/Binaries/Msbuild/
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1127.001/T1127.001.md
tags:
analytic_story:
- Trusted Developer Utilities Proxy Execution MSBuild
- Cobalt Strike
- Masquerading - Rename System Utilities
asset_type: Endpoint
automated_detection_testing: passed
cis20:
- CIS 8
confidence: 70
context:
- Source:Endpoint
- Stage:Defense Evasion
- Stage:Execution
- Stage:Defense Evasion
dataset:
- https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1127.001/windows-sysmon.log
impact: 70
kill_chain_phases:
- Exploitation
message: Msbuild.exe ran from an uncommon path on $dest$ execyted by $user$
mitre_attack_id:
- T1127.001
- T1036.003
nist:
- PR.PT
- DE.CM
observable:
- name: dest
type: Endpoint
role:
- Victim
- name: User
type: User
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
required_fields:
- _time
- Processes.process_name
- Processes.process
- Processes.process_path
- Processes.dest
- Processes.parent_process
- Processes.user
risk_score: 49
security_domain: endpoint