Detect Baron Samedit CVE-2021-3156 via OSQuery

Original Source: [splunk source]
Name:Detect Baron Samedit CVE-2021-3156 via OSQuery
id:1de31d5d-8fa6-4ee0-af89-17069134118a
version:4
date:2024-10-17
author:Shannon Davis, Splunk
status:experimental
type:TTP
Description:The following analytic detects the execution of the "sudoedit -s *" command, which is associated with the Baron Samedit CVE-2021-3156 heap-based buffer overflow vulnerability. This detection leverages the `osquery_process` data source to identify instances where this specific command is run. This activity is significant because it indicates an attempt to exploit a known vulnerability that allows privilege escalation. If confirmed malicious, an attacker could gain full control of the system, execute arbitrary code, or access sensitive data, leading to potential data breaches and system disruptions.
Data_source:
search:`osquery_process`
| search "columns.cmdline"="sudoedit -s \\*"
| `detect_baron_samedit_cve_2021_3156_via_osquery_filter`


how_to_implement:OSQuery installed and configured to pick up process events (info at https://osquery.io) as well as using the Splunk OSQuery Add-on https://splunkbase.splunk.com/app/4402. The vulnerability is exposed when a non privledged user tries passing in a single \ character at the end of the command while using the shell and edit flags.
known_false_positives:unknown
References:
drilldown_searches:
  :
tags:
  analytic_story:
    - 'Baron Samedit CVE-2021-3156'
  asset_type:Endpoint
  confidence:50
  cve:
    - 'CVE-2021-3156'
  impact:50
  message:tbd
  mitre_attack_id:
    - 'T1068'
  observable:
    name:'dest'
    type:'Other'
    - role:
      - 'Victim'
  product:
    - 'Splunk Enterprise'
    - 'Splunk Enterprise Security'
    - 'Splunk Cloud'
  required_fields:
    - '_time'
    - 'columns.cmdline'
  risk_score:25
  security_domain:endpoint

tests:
  :
manual_test:None

Related Analytic Stories


Baron Samedit CVE-2021-3156