Detectionlowtest

Container Residence Discovery Via Proc Virtual FS

Detects potential container discovery via listing of certain kernel features in the "/proc" virtual filesystem

Convert In Phoenix Studio

Open this Sigma rule in the converter with the YAML preloaded and ready for backend selection.

Launch
Seth HanfordCreated Wed Aug 23746c86fb-ccda-4816-8997-01386263acc4linux
Log Source
LinuxProcess Creation
ProductLinux← raw: linux
CategoryProcess Creation← raw: process_creation

Events generated when a new process is spawned on the system. Covers command-line arguments, parent/child relationships, and process metadata.

Detection Logic
Detection Logic3 selectors
detection:
    selection_tools:
        Image|endswith:
            - 'awk'
            - '/cat'
            - 'grep'
            - '/head'
            - '/less'
            - '/more'
            - '/nl'
            - '/tail'
    selection_procfs_kthreadd:  # outside containers, PID 2 == kthreadd
        CommandLine|contains: '/proc/2/'
    selection_procfs_target:
        CommandLine|contains: '/proc/'
        CommandLine|endswith:
            - '/cgroup'  # cgroups end in ':/' outside containers
            - '/sched'   # PID mismatch when run in containers
    condition: selection_tools and 1 of selection_procfs_*
False Positives

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

Rule Metadata
Rule ID
746c86fb-ccda-4816-8997-01386263acc4
Status
test
Level
low
Type
Detection
Created
Wed Aug 23
Path
rules/linux/process_creation/proc_creation_lnx_susp_container_residence_discovery.yml
Raw Tags
attack.discoveryattack.t1082
View on GitHub