# Source: https://docs.datadoghq.com/security/default_rules/1d5-6cd-162.md

---
title: User Exec into a Pod
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Datadog Security > OOTB Rules > User Exec into a Pod
---

# User Exec into a Pod
Classification:attackTactic:[TA0002-execution](https://attack.mitre.org/tactics/TA0002)Technique:[T1059-command-and-scripting-interpreter](https://attack.mitre.org/techniques/T1059) 
## Goal{% #goal %}

Detect when a user execs into a pod.

## Strategy{% #strategy %}

This rule monitors when a user execs (`@objectRef.subresource:exec`) into to a pod (`@objectRef.resource:pods`).

A user should not need to exec into a pod. Execing into a pod allows a user to execute any process in container which is not already running. It is most common to execute the bash process to gain an interactive shell. If this is an attacker, they can access any data which the pod has permissions to, including secrets.

## Triage and response{% #triage-and-response %}

Determine if the user should be execing into a running container.

## Changelog{% #changelog %}

- 7 May 2024 - Updated detection query to include logs from Azure Kubernetes Service.
- 17 July 2024 - Updated detection query to include logs from Google Kubernetes Engine.
- 5 March 2025 - Updated detection query for Google Kubernetes Engine to include the event `io.k8s.core.v1.pods.exec.get` and exclude system accounts.