Kernel Space Feature Generation for Network Traffic Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems for detecting malicious network traffic using machine learning models suffer from high latency due to the need to pass protocol data units (PDUs) between the data link layer and the application layer of a network stack.

Innovation Solution

The implementation of eBPF to attach code hooks to a network interface at the kernel space, redirecting network traffic to a virtual machine that generates feature values directly from PDUs at the data link layer, and passing these feature values to a machine learning model in the user space via zero-copy shared memory.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If protocol data units are passed between data link layer and application layer for machine learning-based malicious traffic detection, then detection capability is provided, but latency increases

Engineering Contradiction:
Improvemalicious traffic detection capabilityVSAvoiddetection latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent introduces a new architectural dimension by implementing eBPF-based code hooks at the kernel network interface layer, creating a parallel processing path that extracts features directly from incoming traffic before it traverses the traditional network stack to the application layer. This spatial-temporal repositioning of feature extraction operations reduces the time dimension of data transmission while maintaining detection reliability.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Solution Approach 2:

The system performs preliminary feature extraction operations at the kernel layer before traffic reaches the application layer. By pre-processing network traffic and extracting relevant features using eBPF programs at the point of entry, the system prepares detection-ready data in advance, eliminating the need to wait for complete PDU traversal through multiple layers and thereby reducing detection latency.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If feature values are extracted and passed from kernel space to user space, then machine learning model can process traffic, but data copying overhead increases latency

Engineering Contradiction:
Improvemachine learning model processing capabilityVSAvoiddata copying time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent employs shared memory mechanisms that allow the kernel-space eBPF program and user-space machine learning model to access the same memory region simultaneously. This eliminates the need for traditional data copying operations between kernel and user space, as both components read/write to the same memory location, thereby removing the copying overhead that previously increased latency.

Inventive Principle:
Principle #26Copying

3Speed

If code hooks are attached at network interface in kernel space, then feature generation occurs closer to data link layer, but system complexity increases

Engineering Contradiction:
Improvefeature generation speedVSAvoidsystem architecture complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent introduces eBPF (extended Berkeley Packet Filter) as an intermediary technology that bridges kernel-space network interface access and user-space machine learning processing. This intermediary provides a standardized, sandboxed environment for running feature extraction code directly at the network interface, simplifying the integration complexity while enabling fast feature generation through direct kernel-space access to incoming traffic.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20250030714A1Kernel space feature generation for user space machine learning-based malicious network traffic detection
Publication Date: 2025.01.23 PALO ALTO NETWORKS INC
  • US20250030714A1 patent drawing
  • US20250030714A1 patent drawing
  • US20250030714A1 patent drawing

AI summary

An in-kernel virtual machine (“VM”) instantiated in the kernel space of a physical or virtual machine (“machine”) attaches code hooks at a network interface of the machine. The code hooks redirect network traffic from the network interface to a module that generates feature values at the kernel space from protocol data units of network traffic received by the network interface. The machine passes the feature values from kernel space to user space via zero-copy shared memory and a machine learning model in the user space obtains network traffic verdicts as outputs from inputting the feature values. The machine passes the verdicts from user space to kernel space via the zero-copy shared memory and the in-kernel VM performs corrective action based on malicious verdicts.