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
deny-af-alg-bpf — eBPF LSM program that blocks AF_ALG socket creation to mitigate CVE-2026-31431, with userspace daemon logging denied attempts via ring buffer. | Kitploit
Tools/GitHubGitHub/vatson112/deny-af-alg-bpf
Defensive ToolsVulnerability AnalysisSecurity Virtualization
GitHubvatson112/deny-af-alg-bpf

deny-af-alg-bpf

eBPF LSM program that blocks AF_ALG socket creation to mitigate CVE-2026-31431, with userspace daemon logging denied attempts via ring buffer.

View Repository
1476 months agoNot yet reviewed
Share

deny-af-alg-bpf

Description

BPF LSM program that blocks AF_ALG (Linux kernel crypto API) socket creation and logs all attempts via a ring buffer to userspace.

What it does

  • Attaches to the lsm/socket_create hook
  • Denies any socket(AF_ALG, ...) call with -EPERM
  • Emits structured events (pid, comm) to a BPF ring buffer
  • Userspace daemon reads the ring buffer and logs to stderr (consumed by systemd journal)

Components

Programs

  • deny_af_alg.bpf.c - main block logic, work in bpf (kernel space)
  • deny_af_alg.user.c - userspace program
    • load bpf program
    • connect to exposed ring buffer
    • get info about denied access and log to stdout

Systemd

  • deny-af-alg.service - main service, contains userspace app and bpf program
  • deny-af-alg-bpf.service - legacy service, works via bpftool, dont contains logging

CVE Fix Information

This eBPF program addresses CVE-2026-31431. It resolves the vulnerability by restricted access to crypto socket

Requirements

Need bfp in lsm

#cat /sys/kernel/security/lsm
lockdown,capability,yama,selinux,bpf

Build

Note on vmlinux.h: vmlinux.h generated on build machine.

If you are targeting a different kernel, regenerate it on the target machine before building:

bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h

Build via makefile

make

Build artifacts are placed in the project root:

FileDescription
deny_af_algUserspace daemon
deny_af_alg.bpf.oCompiled BPF object
deny_af_alg.skel.hGenerated BPF skeleton header
vmlinux.hGenerated linux headers via btf

Run via command line

sudo ./deny_af_alg

output

Listening for AF_ALG socket create attempts... (Ctrl-C to stop)
BLOCKED pid=12345  comm=python3

Run via systemd

Copy deny-af-alg.service file and binary to target machine.

Run via systemd

systemctl start deny-af-alg.service

Run only bpf prog manual via bpftool

bpftool prog loadall deny_af_alg.bpf.o /sys/fs/bpf/deny_af_alg autoattach

Additional command

Preparation

dnf install -y bpftool libbpf-devel clang llvm kernel-devel

Compile

bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
clang -O2 -g -target bpf -D__TARGET_ARCH_x86 -I/usr/include/bpf -c deny_af_alg.bpf.c -o deny_af_alg.bpf.o

Check

bpftool prog list | grep deny_af_alg
sudo cat /sys/kernel/debug/tracing/trace_pipe
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    732
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    506
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    405
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    342
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    261
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    259

Explore all tools

Browse our collection of tools

View all tools →