Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
SunnyDayBPF — SunnyDayBPF: eBPF-based post-syscall user-buffer telemetry deception research by Azizcan Daştan | Kitploit
Tools/GitHubGitHub/azqzazq1/sunnydaybpf
Defensive ToolsRed Teaming
GitHubazqzazq1/sunnydaybpf

SunnyDayBPF

SunnyDayBPF: eBPF-based post-syscall user-buffer telemetry deception research by Azizcan Daştan

View Repository
245222 months agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

SunnyDayBPF

SunnyDayBPF is an eBPF-based post-syscall user-buffer telemetry deception research technique originally proposed and researched by Azizcan Dastan.

The technique investigates whether data observed by user-space security, logging, or telemetry agents can be altered after a read-like syscall has completed, but before the agent parses, analyzes, or forwards that data to a downstream security pipeline.

The core idea is:

The event still happens.
The monitoring agent still reads data.
But the data observed by the agent may no longer fully represent the original event.

SunnyDayBPF focuses on the gap between ground truth and observed telemetry.


Architecture (v2.1)

                          SunnyDayBPF Hook Points
                          ========================

  Telemetry Agent Process
  +---------------------------------------------------------+
  |                                                         |
  |   read()          pread64()         recvfrom()          |
  |     |                |                  |               |
  +-----|----------------|------------------|---------------+
        |                |                  |
  ======|================|==================|======= KERNEL BOUNDARY
        |                |                  |
   kprobe:ksys_read  kprobe:__x64_sys_  kprobe:__sys_
   (save buf ptr)    pread64            recvfrom
        |            (nested pt_regs)   (save buf ptr)
        |            (save buf ptr)         |
        v                v                  v
   [syscall executes — data enters user buffer]
        |                |                  |
   kretprobe         kretprobe          kretprobe
        |                |                  |
        +--------+-------+---------+--------+
                 |                 |
          read buffer into     initialize
          BPF scratch space    scan_state
                 |
                 v
        +------------------+
        | TAIL CALL CHAIN  |
        |                  |
        | scan_g0: SECURITY (4 rules, scan=177 bytes)
        | scan_g1: SECURITY (4 rules, scan=173 bytes)
        | scan_g2: SEVERITY (4 rules, scan=177 bytes)
        | scan_g3: SEVERITY (1 rule,  scan=251 bytes)
        | scan_g4: PATH     (4 rules, scan=132 bytes)
        | scan_g5: AUTH     (4 rules, scan=190 bytes)
        | scan_g6: AUTH     (1 rule,  scan=249 bytes)
        | scan_g7: NETWORK  (3 rules, scan=249 bytes)
        | scan_g8: PROCESS  (4 rules, scan=173 bytes)
        | scan_g9: CUSTOM   (2 rules, scan=243 bytes)
        |                  |
        | emit_event:      |
        |   perf event     |
        |   + stats        |
        +------------------+
                 |
                 v
        bpf_probe_write_user()
        (modify agent's buffer)
                 |
                 v
        read-back verification
        (confirm write succeeded)
                 |
                 v
        Agent continues with
        modified data

Syscall Coverage

SyscallKernel HookArg ExtractionCoverage
read()ksys_readPT_REGS_PARM2 (direct)File reads, pipes, /proc, log files
pread64()__x64_sys_pread64Nested pt_regs via bpf_probe_read_kernel (offset 104/RSI)Random-access file reads, journald
recvfrom()__sys_recvfromPT_REGS_PARM2 (direct)Network sockets, syslog forwarding

BPF Verifier Constraints

The BPF verifier enforces a jump sequence limit of 8,192 conditional branches per program. SunnyDayBPF works around this using:

  • BPF tail calls (BPF_PROG_ARRAY): 31 rules split across 10 independent programs, each with its own verifier budget
  • Case-insensitive optimization: (d[i]|32)==lower reduces jumps per byte from 2 to 1 for alphabetic characters
  • Dynamic scan limits: Each group's scan window is computed as min(BUF_SIZE - max_pat, 7800 / jumps_per_iter) to stay within verifier limits
  • Per-CPU arrays: BPF_PERCPU_ARRAY for scratch buffer and scan state, shared across tail-called programs

Overview

Modern Linux security systems often rely on user-space agents that collect telemetry from files, sockets, pipes, APIs, kernel interfaces, or event streams.

These agents may forward telemetry to:

  • SIEM platforms
  • EDR/XDR backends
  • audit pipelines
  • log collectors
  • runtime security engines
  • detection engineering systems
  • observability platforms

A common assumption is:

actual system behavior == collected telemetry == observed security data

SunnyDayBPF challenges that assumption.

The research explores a post-syscall deception model where a monitoring process receives data normally, but the buffer containing that data is modified before the process consumes it.

actual system behavior != observed telemetry

Technical Definition

SunnyDayBPF is a post-syscall telemetry deception technique that studies the manipulation of user-space buffers belonging to selected telemetry-consuming processes.

At a high level, the technique follows this model:

sys_enter_*:
    identify a target telemetry-consuming process
    record the user-space buffer pointer involved in the read-like operation

sys_exit_*:
    verify that the read-like operation completed successfully
    inspect the returned user-space buffer
    selectively alter telemetry-relevant content
    verify write success via read-back
    allow the target process to continue execution normally

This creates a mismatch between:

what happened on the system

and:

what the monitoring agent later observes, parses, and forwards

Targeted Agents (28 Verified)

SunnyDayBPF identifies target processes by 5-character command name prefix matching.

SIEM / Log Collection

AgentPrefixRead MethodEffective?
Wazuhwazuhread() on log files, syslog, audit logsYes
OSSECossecread() on log filesYes
Splunk UFsplunread() on monitored filesYes
Elastic Agentelastread() on log sourcesYes
Datadog Agentdatadread() on logs and metricsYes
Criblcriblread() for log routingYes

Log Forwarding

AgentPrefixRead MethodEffective?
rsyslogrsyslread() / recvfrom() on syslogYes
syslog-ngsysloread() / recvfrom() on syslogYes
Filebeatfilebread() on log filesYes
Fluent-bitfluenread() / recvfrom() on inputsYes
Fluentdfluenread() / recvfrom() on inputsYes
Logstashlogstread() / recvfrom() on pipelineYes
Promtailpromtread() on log files (Loki)Yes
Vectorvectoread() on log sourcesYes

Runtime Security

AgentPrefixRead MethodEffective?
FalcofalcoeBPF events collected via read() on perf bufferYes
osqueryosqueread() on /proc, log files, system tablesYes

Network Security

AgentPrefixRead MethodEffective?
Snortsnortrecvfrom() on packet captureYes
Suricatasuricrecvfrom() on packet captureYes
Zeekzeek_recvfrom() on packet captureYes

System Monitoring

Download Tool