ThreatMapper – Identify vulnerabilities in running containers

superior_hosting_service

Deepfence Logo

Identify vulnerabilities in running containers, images, hosts and repositories


Deepfence Runtime Threat Mapper

The Deepfence Runtime Threat Mapper is a subset of the Deepfence cloud native workload protection platform, released as a community edition. This community edition empowers the users with following features:

  1. Visualization: Visualize kubernetes clusters, virtual machines, containers and images, running processes, and network connections in near real time.
  2. Runtime Vulnerability Management: Perform vulnerability scans on running containers & hosts as well as container images.
  3. Container Registry Scanning: Check for vulnerabilities in images stored on AWS ECR, Azure Container Registry, Google Container Registry, Docker Hub, Docker Self-Hosted Private Registry, Quay, Harbor, Gitlab and JFrog registries.
  4. CI/CD Scanning: Scan images as part of existing CI/CD Pipelines like CircleCI, Jenkins & GitLab.
  5. Integrations with SIEM, Notification Channels & Ticketing: Ready to use integrations with Slack, PagerDuty, HTTP endpoint, Jira, Splunk, ELK, Sumo Logic and Amazon S3.

Live Demo

https://deepfence.io/community-demo-form/

Architecture

A pictorial depiction of the Deepfence Architecture is below

DF Architecture

Feature Availability

FeaturesRuntime Threat mapper (Community Edition)Workload Protection Platform (Enterprise Edition)
Discover & Visualize Running Pods, Containers and Hostsheavy_check_mark (unlimited)heavy_check_mark (unlimited)
Runtime Vulnerability Management for hosts/VMsheavy_check_mark (unlimited)heavy_check_mark (unlimited)
Runtime Vulnerability Management for containersheavy_check_mark (unlimited)heavy_check_mark (unlimited)
Container Registry Scanningheavy_check_markheavy_check_mark
CI/CD Integrationheavy_check_markheavy_check_mark
Multiple Clustersheavy_check_markheavy_check_mark
Integrations with SIEMs, Slack and moreheavy_check_markheavy_check_mark
Compliance Automationxheavy_check_mark
Deep Packet Inspection of Encrypted & Plain Trafficxheavy_check_mark
API Inspectionxheavy_check_mark
Runtime Integrity Monitoringxheavy_check_mark
Network Connection & Resource Access Anomaly Detectionxheavy_check_mark
Workload Firewall for Containers, Pods and Hostsxheavy_check_mark
Quarantine & Network Protection Policiesxheavy_check_mark
Alert Correlationxheavy_check_mark
Serverless Protectionxheavy_check_mark
Windows Protectionxheavy_check_mark
Highly Available & Multi-node Deploymentxheavy_check_mark
Multi-tenancy & User Managementxheavy_check_mark
Enterprise Supportxheavy_check_mark

Getting Started

The Deepfence Management Console is first installed on a separate system. The Deepfence agents are then installed onto bare-metal servers, Virtual Machines, or Kubernetes clusters where the application workloads are deployed, so that the host systems, or the application workloads, can be scanned for vulnerabilities.

A pictorial depiction of the Deepfence security platform is as follows:

DE DeploymentDiagram New

Deepfence Management Console

Pre-Requisites for Management Console

FeatureRequirements
CPU: No of cores4
RAM16 GB
Disk spaceAt-least 120 GB
Port range to be opened for receiving data from Deepfence agents8000 – 8010
Port to be opened for web browsers to be able to communicate with the Management console to view the UI443
Docker binariesAt-least version 18.03
Docker-compose binaryVersion 1.20.1

Following table gives the number of nodes that can be supported with different console machine configurations assuming a single node deployment of console. Memory optimised instances are shown to perform better.

CPURAMNodes supported
4 cores16 GB RAM250 nodes
8 cores16 GB RAM500 nodes
8 cores32 GB RAM1000 nodes
16 cores32 GB RAM1400-1500 nodes

In order to support higher numbers of nodes (i.e. hosts as number of containers can be unlimited theoretically based on their life times) ThreatMapper needs to be deployed as a 3 node k8s cluster to scale up to 10000 nodes, instructions to follow.

Installation of Deepfence Management Console

Installing the Management Console is as easy as:

  1. Download the file docker-compose.yml to the desired system.
  2. Execute the following commanddocker-compose -f docker-compose.yml up -d
  3. Open management console ip address / domain in the browser (https://x.x.x.x) and register a new account. Steps: Register a User
  4. Get Deepfence api key from UI: Goto Settings -> User Management, copy api key. In the following docker run command, replace C8TtyEtNB0gBo1wGhpeAZICNSAaGWw71BSdS2kLELY0 with api Key. Steps: Deepfence API Keydocker run -dit –cpus=”.2″ –name=deepfence-agent –restart on-failure –pid=host –net=host –privileged=true -v /sys/kernel/debug:/sys/kernel/debug:rw -v /var/log/fenced -v /var/run/docker.sock:/var/run/docker.sock -v /:/fenced/mnt/host/:ro -e USER_DEFINED_TAGS=”” -e DF_BACKEND_IP=”127.0.0.1″ -e DEEPFENCE_KEY=”C8TtyEtNB0gBo1wGhpeAZICNSAaGWw71BSdS2kLELY0″ deepfenceio/deepfence_agent_ce:latest

This is the minimal installation required to quickly get started on scanning various container images. The necessary images may now be downloaded onto this Management Console and scanned for vulnerabilities.

Terraform

Installation with custom TLS certificates

Custom TLS certificates are supported for the web application hosted on the console machine. On the console machine users have to place the certificate and private key on /etc/deepfence/certs folder. Deepfence looks for the file with .key and .crt extentions on the specified location on the host.

Deepfence Agent

In order to check a host for vulnerabilities, or if docker images or containers that have to be checked for vulnerabilities are saved on different hosts, then the Deepfence agent needs to be installed on those hosts.

Pre-Requisites for Deepfence Agent

FeatureRequirements
CPU: No of cores2
RAM1 GB
Disk spaceAt-least 30 GB
ConnectivityThe host on which the Deepfence Agent is to be installed, is able to communicate with the Management Console on port range 8000-8010.
Linux kernel version>= 4.4
Docker binariesAt-least version 18.03
Deepfence Management ConsoleInstalled on a host with IP Address x.x.x.x

Installation of Deepfence Agent

Installation procedure for the Deepfence agent depends on the environment that is being used. Instructions for installing Deepfence agent on some of the common platforms are given in detail below:

Deepfence Agent on Standalone VM or Host

Installing the Deepfence Agent is now as easy as:

  1. Get Deepfence api key from UI: Goto Settings -> User Management, copy api key
  2. In the following docker run command, replace x.x.x.x with the IP address of the Management Console and replace C8TtyEtNB0gBo1wGhpeAZICNSAaGWw71BSdS2kLELY0 with api Keydocker run -dit –cpus=”.2″ –name=deepfence-agent –restart on-failure –pid=host –net=host –privileged=true -v /sys/kernel/debug:/sys/kernel/debug:rw -v /var/log/fenced -v /var/run/docker.sock:/var/run/docker.sock -v /:/fenced/mnt/host/:ro -e USER_DEFINED_TAGS=”” -e DF_BACKEND_IP=”x.x.x.x” -e DEEPFENCE_KEY=”C8TtyEtNB0gBo1wGhpeAZICNSAaGWw71BSdS2kLELY0″ deepfenceio/deepfence_agent_ce:latest
  3. Optionally the agent node can be tagged using USER_DEFINED_TAGS="" in the above command. Tags should be comma separated. Example: “dev,front-end”

Deepfence Agent on Amazon ECS

For detailed instructions to deploy agents on Amazon ECS, please refer to our Amazon ECS wiki page.

Deepfence Agent Helm chart for Kubernetes

  • Start deepfence agent (replace x.x.x.x with the IP address of the Management Console and C8TtyEtNB0gBo1wGhpeAZICNSAaGWw71BSdS2kLELY0 with api key)
# helm v2
helm install --repo https://deepfence.github.io/ThreatMapper/files/helm-chart deepfence-agent \
    --name=deepfence-agent \
    --set managementConsoleIp=x.x.x.x \
    --set deepfenceKey=C8TtyEtNB0gBo1wGhpeAZICNSAaGWw71BSdS2kLELY0
# helm v3
helm install deepfence-agent --repo https://deepfence.github.io/ThreatMapper/files/helm-chart deepfence-agent \
    --set managementConsoleIp=x.x.x.x \
    --set deepfenceKey=C8TtyEtNB0gBo1wGhpeAZICNSAaGWw71BSdS2kLELY0
  • Delete deepfence agent
# helm v2
helm delete --purge deepfence-agent
# helm v3
helm delete deepfence-agent

Deepfence Agent on Google GKE

For detailed instructions to deploy agents on Google GKE, please refer to our Google GKE wiki page.

Deepfence Agent on Azure AKS

For detailed instructions to deploy agents on Azure Kubernetes Service, please refer to our Azure AKS wiki page.

Deepfence Agent on self-managed / on-premise Kubernetes

For detailed instructions to deploy agents on a Kubernetes cluster, please refer to our Self-managed/On-premise Kubernetes wiki page.

How do I use Deepfence?

Now the Deepfence Security Platform has been successfully installed, here are the steps to begin —

Register a User

The first step is to register a user with the Management Console.

  1. If the Management Console has been installed on a system with IP address x.x.x.x, fire up a browser (Chromium (Chrome, Safari) is the supported browser for now), and navigate to https://x.x.x.x/
DF Registration

After registration, it can take anywhere between 30-60 minutes for initial vulnerability data to be populated. The download status of the vulnerability data is reflected on the notification panel.

Deepfence API Key

Get api key for connecting agents or using the API’s

DF API key

Use case – Visualization

You can visualize the entire topology of your running VMs, hosts, containers etc. from the topology tab. You can click on individual nodes to initiate various tasks like vulnerability scanning.

DF Visualization

Use Case – Runtime Vulnerability Management

From the topology view, runtime vulnerability scanning for running containers & hosts can be initiated using the console dashboard, or by using the APIs. Here is snapshot of runtime vulnerability scan on a host node.

DF Vulnerability1

The vulnerabilities and security advisories for each node, can be viewed by navigating to Vulnerabilities menu as follows:

DF Vulnerability2

Clicking on an item in the above image gives a detailed view as in the image below:

DF Vulnerability3

Most Exploitable Vulnerabilities tab gives a ranked list of vulnerabilities across images to be fixed at priority. Rank is calculated using various parameters like whether the image is running or not, cve score and severity of the vulnerability.

DF MostExploitableVulnerabilities

Optionally, users can tag a subset of nodes using user defined tags and scan a subset of nodes as explained in our user tags wiki page.

Use Case – Registry Scanning

You can scan for vulnerabilities in images stored in AWS ECR, Azure Container Registry, Google Container Registry, Docker Hub, Docker Self-Hosted Private Registry, Quay, Harbor, Gitlab and JFrog from the registry scanning dashboard. First, you will need to click the “Add registry” button and add the credentials to populate available images. After that you can select the images to scan and click the scan button as shown the image below:

DF RegistryScanning

Use Case – CI/CD Integration

For CircleCI integration, refer to our CircleCI wiki and for Jenkins integration, refer to our Jenkins wiki page for detailed instructions.

Use Case – Notification Channel and SIEM Integration

Deepfence logs and scanning reports can be routed to various SIEMs and notifications channels by navigating to Notifications screen.

DF Notification

For detailed instructions on integrations with slack refer to our slack wiki page

For detailed instructions on integrations with sumo logic refer to our sumo logic wiki page

For detailed instructions on integrations with PagerDuty refer to our PagerDuty wiki page

API Support

Deepfence provides a suite of powerful API’s to control the features, and to extract various reports from the platform. The documentation of the API’s are available here, along with sample programs for Python and GO languages.

Security

Users are strongly advised to control access to the Deepfence Management Console, so that it is only accessible on port range 8000-8010 from those systems that have installed the Deepfence agent. Further, we recommend to open port 443 on the Deepfence Management Console only for those systems that need to use a Web Browser to access the Management Console.

We periodically scan our own images for vulnerabilities and pulling latest images should always give you most secure Deepfence images. In case you want to report a vulnerability in the Deepfence images, please reach out to us by email — (community at deepfence dot io).

Support

Please file Github issues as needed and/or join Deepfence Community Slack channel.