Crowdstrike.fdr: map CommandHistory events to ECS process fields#20285
Crowdstrike.fdr: map CommandHistory events to ECS process fields#20285chemamartinez wants to merge 4 commits into
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
| - script: | ||
| tag: script_process_interactive_logon_type_9b3d6c7a | ||
| description: Set process.interactive from crowdstrike.LogonType; types 2 (Interactive), 10 (RemoteInteractive), and 11 (CachedInteractive) indicate an interactive shell session. | ||
| if: ctx.crowdstrike?.LogonType instanceof String && ctx.crowdstrike.LogonType != '' |
There was a problem hiding this comment.
Severity: 🟡 Medium confidence: medium path: packages/crowdstrike/data_stream/fdr/elasticsearch/ingest_pipeline/default.yml:1148
The process.interactive script fires on any event carrying a LogonType, so authentication events (UserLogon/UserLogoff) get a bare process.interactive with no process context; gate it on an established process instead.
Details
The new script's condition is only ctx.crowdstrike?.LogonType instanceof String && ctx.crowdstrike.LogonType != '', which is not scoped to process events. LogonType is present on Windows authentication events, so this stamps process.interactive onto documents that have no process. This is observable in the regenerated fixtures: in test-fdr.log-expected.json a UserLogoff event (event.category: ["authentication"]) now gains a lone process: { "interactive": false } object, and test-user-map / test-windows show the same on non-process events. The effect is also broader than the changelog entry ("Map CommandHistory events to ECS process fields") describes. Attaching a process attribute to an authentication event is semantically misleading and creates a process object where none belongs.
Recommendation:
Gate the script on an already-established process so it only applies to genuine process events (CommandHistory and ProcessRollup set process.entity_id from TargetProcessId earlier in the pipeline; authentication events do not):
- script:
tag: script_process_interactive_logon_type_9b3d6c7a
description: Set process.interactive from crowdstrike.LogonType; types 2 (Interactive), 10 (RemoteInteractive), and 11 (CachedInteractive) indicate an interactive shell session.
if: >-
ctx.crowdstrike?.LogonType instanceof String && ctx.crowdstrike.LogonType != '' &&
ctx.process?.entity_id != null
source: |-
def logonType = ctx.crowdstrike.LogonType;
ctx.process.interactive = (logonType == '2' || logonType == '10' || logonType == '11');
on_failure:
- append:
field: error.message
value: "Failed to set process.interactive from LogonType: {{{_ingest.on_failure_message}}}"🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills
⚠️ Automated review — verify suggestions before applying.
🚀 Benchmarks reportPackage
|
| Data stream | Previous EPS | New EPS | Diff (%) | Result |
|---|---|---|---|---|
falcon |
4878.05 | 3316.75 | -1561.3 (-32.01%) | 💔 |
identity_protection_assessment |
25000 | 18726.59 | -6273.41 (-25.09%) | 💔 |
To see the full report comment with /test benchmark fullreport
| "version": "1007.3.0021003.10" | ||
| }, | ||
| "process": { | ||
| "command_line": "sc stop CSFalconService¶Stop-Service -Name CSFalconService -Force", |
There was a problem hiding this comment.
Is this right? I've looked for the any documentation for the semantics of this character and have found none. I think we need some explanation of how we are interpreting it in the commit message.
There was a problem hiding this comment.
I've added an explanation in the commit message. The use of this character has been observed in several real log samples.
There was a problem hiding this comment.
So how does that work with process.command_line? The string that its holding is not the "Full command line that started the process, including the absolute path to the executable, and all arguments."
| if (ctx.process == null) { | ||
| ctx.process = new HashMap(); | ||
| } |
There was a problem hiding this comment.
| if (ctx.process == null) { | |
| ctx.process = new HashMap(); | |
| } | |
| ctx.process = ctx.process ?: [:]; |
| source: |- | ||
| def logonType = ctx.crowdstrike.LogonType; | ||
| if (ctx.process == null) ctx.process = new HashMap(); | ||
| ctx.process.interactive = (logonType == '2' || logonType == '10' || logonType == '11'); |
There was a problem hiding this comment.
I think this wants a comment explaining the logon types.
|
✅ All changelog entries have the correct PR link. |
|
No issues across the latest commits 61ccfa3…7d507a3 (17 commits). Review summaryIssues found across earlier commits d0257c7 — 1 medium
🤖 AI-Generated Review | Vera Review Bot | 📚 Knowledge base: integration-skills
|
💚 Build Succeeded
History
|
Proposed commit message
Checklist
changelog.ymlfile.