Potential Container Discovery Via Inodes Listing

Detects listing of the inodes of the "/" directory to determine if the we are running inside of a container.

Sigma rule (View on GitHub)

 1title: Potential Container Discovery Via Inodes Listing
 2id: 43e26eb5-cd58-48d1-8ce9-a273f5d298d8
 3status: experimental
 4description: Detects listing of the inodes of the "/" directory to determine if the we are running inside of a container.
 5references:
 6    - https://blog.skyplabs.net/posts/container-detection/
 7    - https://stackoverflow.com/questions/20010199/how-to-determine-if-a-process-runs-inside-lxc-docker
 8tags:
 9    - attack.discovery
10    - attack.t1082
11author: Seth Hanford
12date: 2023/08/23
13logsource:
14    category: process_creation
15    product: linux
16detection:
17    selection:
18        # inode outside containers low, inside high
19        Image|endswith: '/ls'
20        CommandLine|contains|all:
21            - ' -*i'              # -i finds inode number
22            - ' -*d'              # -d gets directory itself, not contents
23        CommandLine|endswith: ' /'
24    condition: selection
25falsepositives:
26    - Legitimate system administrator usage of these commands
27    - Some container tools or deployments may use these techniques natively to determine how they proceed with execution, and will need to be filtered
28level: low

References

Related rules

to-top