Detection Primitives for eBPF Rootkits - #2834
Open
carlospolop wants to merge 1 commit into
Open
Conversation
Collaborator
Author
🔗 Additional ContextOriginal Blog Post: https://securitylabs.datadoghq.com/articles/detection-primitives-for-ebpf-rootkits Content Categories: Based on the analysis, this content was categorized under "Linux Hardening > Post-Exploitation > Linux Post-Exploitation > eBPF Rootkit Stealth, Anti-Debugging, and Detection". Repository Maintenance:
Review Notes:
Bot Version: HackTricks News Bot v1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
Overview
The article analyzes three Linux eBPF rootkit techniques observed in VoidLink, LinkPro, and malware associated with the Atomic Arch campaign. No CVE is involved: the malware repurposes legitimate eBPF helpers intended for debugging, fault injection, and process control. The techniques manipulate the Netlink data parsed by
ss, falsify eBPF object enumeration performed bybpftool/libbpf, and kill processes attempting to attach through 🔧 Technical DetailsLength-field manipulation to hide structured records: When a trusted tool receives a contiguous, length-delimited response from the kernel, an eBPF program can capture the destination user-space buffer at syscall entry and modify it at syscall return. To hide record B between A and C, increase
A.lengthby the aligned physical size of B. A parser that advances using the supplied length jumps directly to C. If the new length remains within the buffer's remaining bytes, bounds validation succeeds and the hidden record is silently skipped. VoidLink applies this to Netlinkinet_diag_msgdata using akprobe/kretprobepair on__sys_recvmsgandbpf_probe_write_user().Iterator truncation through injected end-of-list errors: Monitor enumeration commands on syscall entry, correlate them by
pid_tgid, inspect the returned object ID on the return path, and injec...🤖 Agent Actions
Plan:
Repository review is complete: the best fit is the existing
Linux Post-Exploitationpage, which already covers BPF backdoors and has a numbered references section. The currentUseful Linux Commandspage only provides baselinebpftoolenumeration, so the new material is not redundant and should remain in one file.Plan update: overlap checking and source verification are complete. I’ll now add one self-contained section before the existing references, append the four sources in original-research-first order, then run structural and diff checks.
Validation found the source/reference structure intact. I also corrected a wording ambiguity in the
ptracefilter and removed an extra blank line; the final check will build the book if the local mdBook toolchain is available.Updated
src/linux-hardening/post-exploitation/linux-post-exploitation/README.md.Added:
ssrecords.bpf_override_return(-ENOENT).ptraceanti-debugging usingbpf_send_signal(SIGKILL).BPF_PROG_LOADhelper fingerprinting and detection rules.Validation passed for diff formatting, Markdown fences, citation numbering, and forbidden sources.
mdbookwas unavailable locally, so a full build was not run.This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.