How trevohack/venom works
Venom is a Linux loadable kernel module that intercepts kernel execution paths through ftrace. The principal workflow is: a host process invokes a syscall, ftrace redirects selected kernel symbols to Venom handlers, handlers inspect or alter the request, and permitted operations fall through to the original kernel function. Distinct stages include module initialization, hook dispatch, concealment/protection policy, network filtering, and optional logging. The graph reflects sampled implementations plus README-documented hook families; several unsampled handlers are represented only at their exact tree paths.
Components 23
Module Lifecycle
- Venom Module
venom.c - Ftrace Dispatcher
ftrace/ftrace.h - Runtime Configuration
venom.c - ARM64 Hooking
arm/arm64.c
Concealment Controls
- Output Interception
hooks/write.h - Input Interception
hooks/read.h - Directory Filtering
hooks/getdents.h - PID Hiding
hooks/pid_hiding.h - Metadata Hiding
hooks/statx.h
Protection Controls
- Filesystem Protection
hooks/harden.h - Mount Blocking
hooks/mounts.h - Module Load Control
hooks/insmod.h - Signal Control
hooks/kill.h - Device Ioctl Protection
hooks/ioctl.h - Anti Debugging
hooks/ptrace.h
Network Controls
- Proc Network Filtering
hooks/network.h - Packet Filtering
hooks/network.h - Socket Logging
hooks/socket.h
Logging and Monitoring
- Command Logging
hooks/prinT.h - Memory Access Monitoring
hooks/process_vm.h - Kernel Hardening
hooks/kexec_load.h
Other components
- Host Process
- Linux Kernel
Connections 32
- Host Process → Linux Kernel: issues syscalls
- Host Process → Venom Module: loads module
- Venom Module → Runtime Configuration: initializes config
- Venom Module → Ftrace Dispatcher: installs hooks
- Venom Module → PID Hiding: initializes hiding
- Venom Module → ARM64 Hooking: supports ARM64
- Linux Kernel → Ftrace Dispatcher: enters symbols
- Ftrace Dispatcher → Output Interception: dispatches writes
- Ftrace Dispatcher → Input Interception: dispatches reads
- Ftrace Dispatcher → Directory Filtering: dispatches listings
- Ftrace Dispatcher → Filesystem Protection: dispatches filesystem
- Ftrace Dispatcher → Mount Blocking: dispatches mounts
- Ftrace Dispatcher → Module Load Control: dispatches modules
- Ftrace Dispatcher → Signal Control: dispatches signals
- Ftrace Dispatcher → Device Ioctl Protection: dispatches ioctls
- Ftrace Dispatcher → Anti Debugging: dispatches tracing
- Ftrace Dispatcher → Proc Network Filtering: dispatches proc views
- Ftrace Dispatcher → Packet Filtering: dispatches packets
- Ftrace Dispatcher → Socket Logging: dispatches sockets
- Ftrace Dispatcher → Memory Access Monitoring: dispatches memory access
- Ftrace Dispatcher → Kernel Hardening: dispatches kernel actions
- Output Interception → Linux Kernel: falls through writes
- Input Interception → Linux Kernel: falls through reads
- Directory Filtering → Linux Kernel: reads directory data
- Filesystem Protection → Linux Kernel: blocks or continues
- Module Load Control → Linux Kernel: allows or blocks
- Proc Network Filtering → Linux Kernel: filters proc output
- Packet Filtering → Linux Kernel: drops packets
- Command Logging → Linux Kernel: logs commands
- Runtime Configuration → Proc Network Filtering: sets hidden network
- Runtime Configuration → Directory Filtering: sets hidden prefixes
- Runtime Configuration → Signal Control: sets magic signal