Files
splunk-security_content/detections/endpoint/suspicious_msbuild_path.yml
2022-03-16 12:45:03 -07:00

90 lines
3.2 KiB
YAML

name: Suspicious msbuild path
id: f5198224-551c-11eb-ae93-0242ac130002
version: 3
date: '2022-03-08'
author: Michael Haag, Splunk
type: TTP
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 `process_msbuild` AND (Processes.process_path!=*\\framework*\\v*\\*)
by Processes.dest Processes.original_file_name 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. In addition,
confirm the latest CIM App 4.20 or higher is installed and the latest TA for the
endpoint product.
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
- Living Off The Land
asset_type: Endpoint
cis20:
- CIS 8
confidence: 70
context:
- Source:Endpoint
- Stage:Defense Evasion
- Stage:Execution
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:
- T1036
- T1127
- T1036.003
- T1127.001
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.dest
- Processes.user
- Processes.parent_process_name
- Processes.parent_process
- Processes.original_file_name
- Processes.process_name
- Processes.process
- Processes.process_id
- Processes.parent_process_path
- Processes.process_path
- Processes.parent_process_id
risk_score: 49
security_domain: endpoint
supported_tas:
- Splunk_TA_microsoft_sysmon