3 minhigh
Detection and Removal of the Syslogk Rootkit in a Linux Environment
Syslogk Linux kernel rootkit hides processes, TCP connections, files, and its own LKM via inline hooking and VFS table hooking to evade detection. Syslogk is a Linux LKM rootkit that uses inline hooking of kernel API functions and VFS table hooking to conceal processes, TCP communications, files, and its own module. It patches the prologue of procrootreaddir and tcp4seqshow, and redirects VFS readdir to hide artifacts matching attacker-defined strings.
Sens:▲ 24h
Detection / HunterZ.ai
Immediate Actions
- Scan Linux servers with kernel-aware security tools like V3 Net for Linux Server.
- Hunt for process 'was_sys_relay' and files containing 'was-patch' string.
- Compare lsmod output against /proc/modules to find hidden kernel modules.
- Block MD5 8433c3f870729889f4b9712e26fe2fc8 on all Linux endpoints.
Key Takeaways
- Inline hooks proc_root_readdir and tcp4_seq_show to hide processes and TCP sockets.
- VFS table hooking on readdir conceals files and directories containing string 'was-patch'.
- Hides process named 'was_sys_relay' and all its child processes from ps, top, and pstree.
- Removes its own module node from kernel module list and /sys/module to evade lsmod.
- Disables CR0 Write Protect bit and modifies PTE to gain write access to kernel code pages.
Attack Chain
- Persistence: Rootkit loads as a Linux kernel module (LKM) into the running kernel
- Defense Evasion: Disables CR0 Write Protect bit and modifies PTE for kernel memory write access
- Defense Evasion: Inline hooks proc_root_readdir to hide process 'was_sys_relay' and children
- Defense Evasion: Inline hooks tcp4_seq_show to hide TCP connections on specific ports
- Defense Evasion: VFS table hooks readdir to hide files containing string 'was-patch'
- Defense Evasion: Removes own module node from kernel module list and /sys/module
Affected Systems
- Linux servers with loadable kernel module support
Detection Availability
- Platforms: V3 Net for Linux Server
No public detection rules; V3 Net for Linux Server product detects and remediates the hidden kernel module.
Detection Engineering Assessment
Hunting Hypotheses
| Hypothesis | Telemetry | Stage | FP Risk |
|---|---|---|---|
| Processes named 'was_sys_relay' or files containing 'was-patch' exist on disk but are invisible to ls or ps (T1564.004, T1564.001). | Compare ls output against raw readdir syscall results. | Defense Evasion | Low — attacker-specific naming patterns unlikely in benign use. |
| Kernel module loaded but absent from lsmod and /sys/module listings (T1215, T1014). | Compare lsmod output against /proc/modules and kernel audit logs. | Persistence | Low — legitimate modules rarely self-remove from list. |
| CR0 register Write Protect bit cleared to modify kernel code pages (T1106). | Monitor for CR0 bit manipulation via kernel tracing or eBPF. | Defense Evasion | Medium — some legitimate kernel modules toggle WP bit. |
Required Log Sources
- Kernel module load events
- Auditd syscall logs
- Process execution logs
- File system access logs
Control Gaps
- Standard ls and ps commands cannot see hidden artifacts
- netstat cannot detect concealed TCP connections
- lsmod cannot detect hidden kernel modules
- User-space EDR may miss kernel-level inline hooks
Recommendations
Infrastructure Hardening
- Restrict kernel module loading to signed, whitelisted modules only.
- Enable kernel module signing enforcement on all Linux servers.
- Deploy kernel-level monitoring via eBPF or similar technology.
- Monitor CR0 register Write Protect bit state changes.
User Protection
- Deploy endpoint security tools with kernel-level detection on Linux servers.
- Use integrity monitoring to detect unauthorized kernel memory modifications.
MITRE ATT&CK Mapping
MITRE ATT&CK Mapping7 techniques
Tactic
Execution
Tactic
Stealth
Tactic
Unmapped
Showing defanged values
- md58433c3f870729889f4b9712e26fe2fc8MD5 hash of the Syslogk rootkit kernel module