heroui logo

Potential Privilege Escalation via Recently Compiled Executable

Elastic Detection Rules

View Source
Summary
The rule titled "Potential Privilege Escalation via Recently Compiled Executable" is focused on detecting a sequence of events indicative of potential privilege escalation in Linux environments. The rule monitors the workflow where a non-root user compiles a program using common compilers (i.e., gcc, g++, cc), subsequently executes it, and later attempts to change their user ID (UID) permissions to root (UID 0). The rule utilizes EQL (Event Query Language) to capture these event sequences, analyzing process actions and UID changes within a maximum span of one minute. It alerts on suspicious patterns that could signify an attempt to exploit vulnerabilities to gain elevated privileges. A risk score of 47 indicates a medium severity with potential for exploitation. The setup requires Elastic Defend integration. The use case covers scenarios where legitimate development behavior may trigger false positives. Thus, it emphasizes the need for careful validation of suspicious activities detected by the rule, especially during legitimate development operations, automated build processes, or educational activities, while providing guidelines for triage and response actions to mitigate potential security threats effectively. By implementing this rule, organizations enhance their detection capabilities against potential exploitation strategies aimed at privilege escalation.
Categories
  • Linux
  • Endpoint
  • On-Premise
  • Infrastructure
Data Sources
  • Process
  • File
  • Script
  • Application Log
ATT&CK Techniques
  • T1068
Created: 2023-08-28