CAPECattack pattern

CAPEC-69 Target Programs with Elevated Privileges

Very High Official page ↗
Abstraction
Standard
Status
Draft
Likelihood of attack
High
Typical severity
Very High
CAPEC version
3.9

Description

This attack targets programs running with elevated privileges. The adversary tries to leverage a vulnerability in the running program and get arbitrary code to execute with elevated privileges.

Execution flow

1. [Explore] [Find programs with elevated priveleges] The adversary probes for programs running with elevated privileges. 2. [Explore] [Find vulnerability in running program] The adversary looks for a vulnerability in the running program that would allow for arbitrary code execution with the privilege of the running program. 3. [Exploit] [Execute arbitrary code] The adversary exploits the vulnerability that they have found. For instance, they can try to inject and execute arbitrary code or write to OS resources.

Prerequisites

• The targeted program runs with elevated OS privileges. • The targeted program accepts input data from the user or from another program. • The targeted program is giving away information about itself. Before performing such attack, an eventual attacker may need to gather information about the services running on the host target. The more the host target is verbose about the services that are running (version number of application, etc.) the more information can be gather by an attacker. • This attack often requires communicating with the host target services directly. For instance Telnet may be enough to communicate with the host target.

Skills required

• [Low] An attacker can use a tool to scan and automatically launch an attack against known issues. A tool can also repeat a sequence of instructions and try to brute force the service on the host target, an example of that would be the flooding technique. • [Medium] More advanced attack may require knowledge of the protocol spoken by the host service.

Consequences

• Confidentiality, Integrity, Availability: Execute Unauthorized Commands • Confidentiality, Access Control, Authorization: Gain Privileges • Availability: Resource Consumption

Mitigations

• Apply the principle of least privilege. • Validate all untrusted data. • Apply the latest patches. • Scan your services and disable the ones which are not needed and are exposed unnecessarily. Exposing programs increases the attack surface. Only expose the services which are needed and have security mechanisms such as authentication built around them. • Avoid revealing information about your system (e.g., version of the program) to anonymous users. • Make sure that your program or service fail safely. What happen if the communication protocol is interrupted suddenly? What happen if a parameter is missing? Does your system have resistance and resilience to attack? Fail safely when a resource exhaustion occurs. • If possible use a sandbox model which limits the actions that programs can take. A sandbox restricts a program to a set of privileges and commands that make it difficult or impossible for the program to cause any damage. • Check your program for buffer overflow and format String vulnerabilities which can lead to execution of malicious code. • Monitor traffic and resource usage and pay attention if resource exhaustion occurs. • Protect your log file from unauthorized modification and log forging.

Related

Can precede · CAPEC (4)

  • CAPEC-10 Buffer Overflow via Environment Variables attack pattern
  • CAPEC-67 String Format Overflow in syslog() attack pattern
  • CAPEC-8 Buffer Overflow in an API Call attack pattern
  • CAPEC-9 Buffer Overflow in Local Command-Line Utilities attack pattern

Child of · CAPEC (1)

  • CAPEC-233 Privilege Escalation attack pattern

Weakness · CWE (2)

  • CWE-15 External Control of System or Configuration Setting weakness
  • CWE-250 Execution with Unnecessary Privileges weakness

Referenced by CWE · attack pattern (2)

  • CWE-15 External Control of System or Configuration Setting weakness
  • CWE-250 Execution with Unnecessary Privileges weakness