← Back to SOC feed Coverage →

Docker Container Discovery Via Dockerenv Listing

sigma LOW SigmaHQ
T1082
imProcessCreate
This rule was pulled from an open-source repository and enriched with AI. Validate in a test environment before deploying to production.
View original rule at SigmaHQ →
Retrieved: 2026-03-25T02:50:08Z · Confidence: medium

Hunt Hypothesis

Adversaries may use Docker environment listing to gather information about running containers, which can aid in lateral movement or privilege escalation. SOC teams should proactively hunt for this behavior in Azure Sentinel to identify potential reconnaissance activities and mitigate early-stage threats.

Detection Rule

Sigma (Original)

title: Docker Container Discovery Via Dockerenv Listing
id: 11701de9-d5a5-44aa-8238-84252f131895
status: test
description: Detects listing or file reading of ".dockerenv" which can be a sing of potential container discovery
references:
    - https://blog.skyplabs.net/posts/container-detection/
    - https://stackoverflow.com/questions/20010199/how-to-determine-if-a-process-runs-inside-lxc-docker
tags:
    - attack.discovery
    - attack.t1082
author: Seth Hanford
date: 2023-08-23
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith:
            # Note: add additional tools and utilities to increase coverage
            - '/cat'
            - '/dir'
            - '/find'
            - '/ls'
            - '/stat'
            - '/test'
            - 'grep'
        CommandLine|endswith: '.dockerenv'
    condition: selection
falsepositives:
    - Legitimate system administrator usage of these commands
    - Some container tools or deployments may use these techniques natively to determine how they proceed with execution, and will need to be filtered
level: low

KQL (Azure Sentinel)

imProcessCreate
| where (TargetProcessName endswith "/cat" or TargetProcessName endswith "/dir" or TargetProcessName endswith "/find" or TargetProcessName endswith "/ls" or TargetProcessName endswith "/stat" or TargetProcessName endswith "/test" or TargetProcessName endswith "grep") and TargetProcessCommandLine endswith ".dockerenv"

False Positive Guidance

MITRE ATT&CK Context

Original source: https://github.com/SigmaHQ/sigma/blob/master/rules/linux/process_creation/proc_creation_lnx_susp_dockerenv_recon.yml