How yyax13/anakinrk works
AnakinRK is an educational Linux kernel rootkit module. Its main workflow is a user sending a magic signal and command-encoded PID; the hooked kill path dispatches a command to privilege escalation, module visibility toggling, port hiding, or help output. Module initialization installs the ftrace hooks, which intercept module loading and TCP proc-table display as separate capabilities. The excerpts show the TCP filtering and command table; other behavior and some wiring are documented or referenced by the SOURCE INDEX, so those links cite that evidence.
Main entry points: tcp_seq_show.c TCP display hooks · menu.c Command dispatcher · main.c Module lifecycle · insmod.c Module-load hook
Components 14
Control and lifecycle
- Module lifecycle
src/main.c - ftrace helper
src/ftrace/ftrace_helper.c
Kernel hooks
- Signal hook
src/hooks/kill.c - Module-load hook
src/hooks/insmod.c - TCP display hooks
src/hooks/tcp_seq_show.c
Command actions
- Command dispatcher
src/modules/menu.c - Privilege escalation
src/modules/get_root.c - Module visibility toggle
src/modules/hide.c - Port toggle
src/modules/hide_port.c - Help output
src/modules/menu.c
Kernel state
- Hidden-port list
src/hooks/tcp_seq_show.c - TCP proc views
src/hooks/tcp_seq_show.c
Other components
- User
- Linux kernel
Connections 18
- User → Signal hook: sends command signal
README.md - Module lifecycle → Module-load hook: installs and removes
src/main.c - Module lifecycle → TCP display hooks: installs and removes
src/main.c - Module lifecycle → Signal hook: installs and removes
src/main.c - Module-load hook → ftrace helper: uses
- TCP display hooks → ftrace helper: installs hooks
src/hooks/tcp_seq_show.c - Signal hook → Command dispatcher: dispatches to
src/hooks/kill.c - Command dispatcher → Privilege escalation: invokes
- Command dispatcher → Module visibility toggle: invokes
- Command dispatcher → Port toggle: invokes
- Command dispatcher → Help output: invokes
src/modules/menu.c - Port toggle → Hidden-port list: updates
src/modules/hide_port.c - TCP display hooks → Hidden-port list: checks
src/hooks/tcp_seq_show.c - TCP display hooks → TCP proc views: filters display
src/hooks/tcp_seq_show.c - Module-load hook → Linux kernel: intercepts module loading
README.md - Privilege escalation → Linux kernel: changes credentials
README.md - Module visibility toggle → Linux kernel: toggles visibility
README.md - TCP display hooks → Linux kernel: hooks TCP display
src/hooks/tcp_seq_show.c