Container Malware Detection via BPF Virtual Machine

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Detecting malicious software containers is challenging due to their ability to configure and behave differently at runtime, making it difficult for static scanning to identify hidden malware through techniques like packers and code obfuscation.

Innovation Solution

Instituting a sandbox environment with a Berkeley Packet Filter (BPF) virtual machine within the kernel of the operating system to monitor runtime behavior events, assigning risk scores to potentially malicious behaviors, and using a combination of static and dynamic scanning to detect malicious activity.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If static scanning is used to detect malware in containers, then the scanning process is simple and fast, but malware using packers and code obfuscation can hide its malicious behavior

Engineering Contradiction:
Improvescanning speedVSAvoidmalware detection accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The system performs static analysis of container images before they are deployed, examining package manifests, binary files, and configuration files for malicious indicators. This preliminary action identifies suspicious containers early in the lifecycle, allowing dynamic analysis to be focused only on containers that pass initial static checks, thus maintaining both speed and accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system introduces a sandboxed dynamic analysis environment that acts as an intermediary between the container and the production system. Containers suspected of containing malware are executed in this isolated environment where their runtime behavior can be monitored without risking the host system. This intermediary layer enables deep inspection of malicious behavior while maintaining system safety.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If dynamic analysis is performed to detect hidden malware behavior, then detection accuracy improves, but the complexity of the system increases

Engineering Contradiction:
Improvemalware detection accuracyVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The analysis system is divided into distinct modular components: a static analysis module that examines container images, a sandboxed dynamic analysis module that executes containers in isolation, and a risk scoring module that aggregates findings. Each module operates independently with well-defined interfaces, reducing overall system complexity while enabling comprehensive malware detection through coordinated operation of these segmented components.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A sandboxed BPF virtual machine serves as an intermediary that captures kernel-level system calls and runtime behavior events from containers under analysis. This intermediary layer abstracts the complexity of kernel monitoring, providing a standardized interface for observing container behavior without requiring direct modification of the host kernel or container runtime, thus managing system complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If monitoring is performed to detect malicious runtime behavior, then malware detection capability improves, but malware may detect the monitoring and change its behavior

Engineering Contradiction:
Improvemalware detection capabilityVSAvoidmalware adaptability
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The BPF virtual machine acts as an intermediary that captures system call events at the kernel level, creating a monitoring layer that is transparent to the container and its processes. Malware running inside the container cannot directly detect or interact with this monitoring mechanism because it operates in a different execution context. This intermediary approach enables precise detection of malicious behavior while preventing malware from adapting its behavior in response to monitoring.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The sandboxed environment creates an inert atmosphere for container execution, isolating the container from the host system and other containers. This isolation prevents malware from detecting the broader system context or communicating with external systems that might reveal monitoring activity. The controlled sandbox environment maintains consistent conditions that prevent malware adaptation while enabling accurate behavior observation.

Inventive Principle:
Principle #39Inert atmosphere (Inert environment)

Data Source

PatentUS12001543B2System and method for container assessment using sandboxing
Publication Date: 2024.06.04 IKEYLESS LLC
  • US12001543B2 patent drawing
  • US12001543B2 patent drawing
  • US12001543B2 patent drawing

AI summary

An example method for a software container includes instantiating the following in a sandbox of a computing device: an operating system, a Berkeley Packet Filter (BPF) virtual machine within a kernel of the operating system, and a software container. The kernel monitors runtime behavior events of the software container, with the monitoring at least partially performed by the BPF virtual machine. Based on the monitoring, a respective risk score is assigned to each of the runtime behavior events that is potentially malicious, with each risk score indicating a likelihood that a corresponding behavior event is malicious. An overall risk score is assigned to the software container that indicates a likelihood that the software container is malicious based on the respective risk scores.