Detection rules › Sigma
Potential Remote Command Execution In Pod Container
Detects attempts to execute remote commands, within a Pod's container using e.g. the "kubectl exec" command.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | T1609 Container Administration Command |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Kubernetes-pods | create-pods-exec | create pods/exec |
Rules detecting the same action
Other rules on this platform that filter on the same API call or operation.
- Container With A hostPath Mount Created (Sigma)
- Creation Of Pod In System Namespace (Sigma)
- Kubernetes Anonymous User Create/Update/Patch Pods Request (Elastic)
- Kubernetes Container Created with Excessive Linux Capabilities (Elastic)
- Kubernetes Create or Update Privileged Pod (Splunk)
- Kubernetes Pod Created in Default Namespace (Splunk)
- Kubernetes Pod Created with a Sensitive hostPath Volume (Elastic)
- Kubernetes Pod Created With HostIPC (Elastic)
Rule body yaml
title: Potential Remote Command Execution In Pod Container
id: a1b0ca4e-7835-413e-8471-3ff2b8a66be6
status: test
description: |
Detects attempts to execute remote commands, within a Pod's container using e.g. the "kubectl exec" command.
references:
- https://microsoft.github.io/Threat-Matrix-for-Kubernetes/techniques/Exec%20into%20container/
author: Leo Tsaousis (@laripping)
date: 2024-03-26
tags:
- attack.t1609
- attack.execution
logsource:
category: application
product: kubernetes
service: audit
detection:
selection:
verb: 'create'
objectRef.resource: 'pods'
objectRef.subresource: 'exec'
condition: selection
falsepositives:
- Legitimate debugging activity. Investigate the identity performing the requests and their authorization.
level: medium
Stages and Predicates
Stage 0: condition
selectionStage 1: selection
selection:
verb: 'create'
objectRef.resource: 'pods'
objectRef.subresource: 'exec'
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
objectRef.resource | eq |
|
objectRef.subresource | eq |
|
verb | eq |
|