Skip to content

zencefilefendi/Kernel_Level_Stealth_Listener

Repository files navigation

Project Chronos: eBPF Covert Channel & Evasion Research (PoC)

Disclaimer: This project is a Proof-of-Concept (PoC) developed strictly for academic research, cyber defense education, and authorized security testing. Its purpose is to demonstrate how advanced persistent threats (APTs) might abuse eBPF and network timing channels, enabling Blue Teams and security analysts to develop better detection systems (EDR/IDS). Unauthorized use on production systems is strictly prohibited.

Overview

Project Chronos is a conceptual research framework that explores how eBPF (Extended Berkeley Packet Filter) XDP (Express Data Path) hooks can be utilized to bypass traditional Firewalls and Deep Packet Inspection (DPI) appliances. Instead of modifying packet payloads, the project introduces an asymmetric Covert Timing Channel architecture that modulates data into the Inter-Packet Arrival Time (IAT) of legitimate-looking traffic.

Architectural Concepts Researched

  • Kernel-Level Passive Monitoring (XDP): Utilizing lock-free, zero-copy Per-CPU maps to measure nanosecond-precision packet arrival times without altering the network stream.
  • IAT Modulation (Timing Channel): Encoding 0 and 1 bits by injecting artificial delays (e.g., 12ms threshold) between legitimate-looking DNS packets (google.com).
  • Decoupled Persistence: Pinning eBPF maps to the BPF virtual filesystem (/sys/fs/bpf) to ensure the kernel hook survives the termination of user-space processes.
  • Process Masquerading: Exploring techniques user-space processes use to spoof their argv[0] and prctl(PR_SET_NAME) to deceive operating system monitors like ps and top.
  • Anti-Forensics: Demonstrating self-melting (executable deletion) and secure memory wiping (explicit_bzero) to hinder post-mortem incident response.

Blue Team Detection & Defense Strategies

This PoC highlights critical blind spots in traditional security monitoring. Defense teams should focus on the following to catch asymmetric threats:

  1. Network Entropy and Jitter Analysis: Covert timing channels degrade the natural entropy of network traffic. Network Security Monitoring (NSM) tools like Zeek should be configured to detect bimodal latency distributions.
  2. eBPF Telemetry and Restrictions: System calls related to bpf() (especially bpf_object__load and map pinning) must be strictly monitored by EDR systems. Prevent unprivileged eBPF usage via sysctl -w kernel.unprivileged_bpf_disabled=1.
  3. Executable and Cmdline Auditing: EDR agents must continuously cross-reference the argv[0] (display name) with the actual disk path in /proc/[pid]/exe. Mismatches should trigger masquerading alerts.
  4. Syscall and Filesystem Monitoring: Monitor unlink and fopen syscalls. A running process attempting to overwrite or delete its own binary on disk is a strong indicator of Self-Melt (Wiper/Rootkit) behavior.

Compilation and Deployment (Controlled Lab Environments Only)

Requires Linux Kernel 5.15+ and libbpf.

# Install Dependencies (Ubuntu/Debian)
sudo apt install clang llvm libelf-dev libbpf-dev linux-headers-$(uname -r) build-essential

# Compile
make

# Prepare BPF Filesystem and Attach XDP Hook
sudo ./chronos_setup.sh

# Launch User-space (Decoder/Orchestrator)
sudo ./chronos_ghost

About

Project Chronos — eBPF/XDP covert timing-channel PoC for security research. Demonstrates kernel-level passive monitoring, IAT modulation, process masquerading & anti-forensics techniques. Built for Blue Team detection R&D.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors