[Update] EDR Telemetry for Linux - Elastic Defend#198
Open
Aegrah wants to merge 1 commit into
Open
Conversation
9 tasks
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.
EDR Telemetry Pull Request
Contribution Details
Adding a new PR that provides evidence for the addition of 4 new data sources the Elastic Defend for Linux:
Telemetry Validation
Documentation or Evidence:
Type of Contribution
Validation Details
EDR Product Information
DNS Query
Since 9.3.0, Elastic Defend adds the option to enable DNS lookups & results. By enabling the toggle in the Elastic Defend setting:
There are two new event categories available:
lookup_requestedandlookup_result.For the
lookup_requesteddata source, the following information is available:For the
lookup_resultdata source, the following information is available:Driver Load
Since 9.1.4, Elastic Defend captures
init_module()/finit_module()LKM (driver) loading. This is available via a process event, with theload_moduleevent.action:The screenshot above showcases several fileless loading techniques via
memfd_create(), although not relevant for the data source here.Ptrace
Since 9.1.4, Elastic Defend captures the
ptrace()syscall for process access and tampering. The relevant fields are available here:The key field is:
process.Ext.ptrace.requestThis field contains the raw Linux
ptracerequest value. Theptrace()syscall uses this request argument to define the operation being performed, commonly represented asptrace(PTRACE_<operation>, pid, addr, data). The Linux man page documents these operations and separates read/inspect-style requests, such asPTRACE_PEEK*andPTRACE_GETREGS, from write/modify-style requests, such asPTRACE_POKE*andPTRACE_SETREGS: https://man7.org/linux/man-pages/man2/ptrace.2.htmlObserved request values:
3PTRACE_PEEKUSR/PTRACE_PEEKUSER12PTRACE_GETREGS16PTRACE_ATTACH16896/0x4200PTRACE_SETOPTIONS5PTRACE_POKEDATA13PTRACE_SETREGS17PTRACE_DETACHRelevant fields exposed by Elastic Defend:
process.executableprocess.command_lineevent.actionprocess.Ext.ptrace.child_pidprocess.Ext.ptrace.requestprocess.Ext.ptrace.addrprocess.Ext.ptrace.dataProcess Access
The screenshot shows
/usr/bin/gdbgenerating ptrace events with request values such as16,12,3, and16896, mapping to attach/read/inspect behavior.Example:
Process Tampering
The screenshot also shows
/home/ruben_groenewoud/Infector/infectgenerating ptrace request value5(PTRACE_POKEDATA) and request value13(PTRACE_SETREGS), mapping to memory write and register modification behavior.Example:
This confirms that Elastic Defend exposes enough ptrace telemetry to distinguish process access from process tampering using
process.Ext.ptrace.request, while also exposing the source process, target PID, address, and data arguments.