Yellow - Containers

Yellow - Containers

Container Management

CLI Tools

Web Tools

Logging and Monitoring

Container logging and analysis revolves around 3 areas:

  • Container Service Logs - Service daemons record key events

    • Daemon events - Errors, status, and general events

    • Remote calls to APIs

    • Creation/Modification/Deletion of containers

  • Host operating system/platform logs

    • Amazon EKS offers logging events to Cloudwatch

  • Service logs

Logging Methods

  • Persistent data volume or bind mount - Log data is sent to a persistent location outside of the container. Often with syslog directly to the host OS

  • Application inside container - If the application itself has logging capabilities, they can be logged to locations outside of the container

  • Monitoring container (Sidecar) - A container for collecting logs from other containers

  • Daemon log drivers - Captures stdout and stderr of containers

Container Defense

Tools

  • Security Auditing and Vulnerability Scanners

    • Clairarrow-up-right - Vulnerability Static Analysis for Containers

    • WhaleScanarrow-up-right - Whalescan is a vulnerability scanner for Windows containers, which performs several benchmark checks, as well as checking for CVEs/vulnerable packages on the container

    • Trivyarrow-up-right - Scanner for vulnerabilities in container images, file systems, and Git repositories, as well as for configuration issues

    • SecretScannerarrow-up-right - Find secrets and passwords in container images and file systems

  • DFIR

  • Container Management

Container Pen Testing

  • Container Escapes

    • Container Breakout - PTFM: Container Breakout - pg. 145

  • Tools

    • kubesploitarrow-up-right - Kubesploit is a cross-platform post-exploitation HTTP/2 Command & Control server and agent written in Golang, focused on containerized environments.

Docker

Dockerarrow-up-right - A Docker container is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.

  • Operator Handbook: Docker Commands - pg. 61

  • Offensive Testing

    • deepcearrow-up-right - Docker Enumeration, Escalation of Privileges and Container Escapes (DEEPCE)

    • Operator Handbook: Docker Exploit- pg. 64

  • Defense and Hardening

    • docker-bench-securityarrow-up-right - The Docker Bench for Security is a script that checks for dozens of common best-practices around deploying Docker containers in production.

    • Anchorearrow-up-right - A service that analyzes docker images and applies user-defined acceptance policies to allow automated container image validation and certification

  • Misc

Tools

  • Container Management

  • Offensive tools

    • peiratesarrow-up-right - a Kubernetes penetration tool, enables an attacker to escalate privilege and pivot through a Kubernetes cluster. It automates known techniques to steal and collect service accounts, obtain further code execution, and gain control of the cluster.

    • Kubestroyerarrow-up-right - Kubestroyer aims to exploit Kubernetes clusters misconfigurations and be the swiss army knife of your Kubernetes pentests

  • Security auditing

Resources

PreviousYellow - CloudNextYellow - Code and CLI

Last updated 1 year ago