FlipSwitch
- Type
- Rootkit
- Capabilities
- Defense evasionPost exploitation
- Platforms
- Linux
FlipSwitch is a proof-of-concept Linux x86-64 kernel rootkit technique for intercepting system calls on Linux kernel 6.9 and later. It addresses the switch-based syscall-dispatch implementation that made traditional sys_call_table pointer-overwrite hooks ineffective. FlipSwitch scans the compiled kernel syscall dispatcher for the call instruction associated with a selected syscall, then changes that instruction’s relative target to redirect execution to an attacker-controlled handler. The technique can resolve kernel symbols through kallsyms_lookup_name, including recovery of that resolver through a kprobe when it is not exported to loadable modules. It temporarily disables the x86 CR0 write-protect bit to modify read-only kernel code and restores the modification when the module unloads. As a syscall-hooking rootkit mechanism, it can support stealth and post-exploitation behavior by redirecting selected kernel syscall handling while leaving other dispatcher paths unchanged. Elastic Security published a YARA signature for identifying the proof-of-concept in Linux x86 files or memory.
Techniques & procedures
3 distinct techniques documented for this family, organized by ATT&CK tactic.
Persistence
1 technique
Persistence
kallsyms_lookup_name is generally not exported by default, meaning it's not directly accessible to loadable kernel modules.
Privilege Escalation
1 technique
Privilege Escalation
kallsyms_lookup_name is generally not exported by default, meaning it's not directly accessible to loadable kernel modules.
Stealth
2 techniques
Stealth
“FlipSwitch focuses on the compiled machine code of the kernel's new syscall dispatcher function, x64_sys_call... [and] overwrites [a] call-site... with a new offset pointing to a malicious, adversary-controlled function.” | “Rootkits are stealthy malware designed to conceal malicious activity, such as files, processes, network connections, kernel modules, or accounts.”
This empowers a rootkit to filter the output of the ls command to hide malicious files or prevent a specific process from being terminated.
Recent activity
5 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.