Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Winlogbeat] failed to parse field [winlog.event_data.Id] of type [keyword] when id contains . #34345

Closed
narph opened this issue Jan 23, 2023 · 3 comments · Fixed by #34549
Closed
Assignees

Comments

@narph
Copy link
Contributor

narph commented Jan 23, 2023

Running Winlogbeat on other language OS's (in this case Spanish).

EX message

"message": "CommandInvocation(Get-Date): \"Get-Date\"\n\n\nContexto:\n Gravedad = Informational\n Nombre de host = ConsoleHost\n Versión de host = 5.1.19041.1320\n Id. de host = 56995afd-2444-424e-871c-4c5513731a3b\n Aplicación host = C:\\…

Each part \n Id. is being parsed into a field under a Id object that is prefixed with de

…\n Id. de host = 56…
…320\n Id. de espacio de ejecución = fc8f1c...\n Id. de canalización = 1\n Nombre…
…la\n Usuario conectado = \n Id. de shell = Microsoft.PowerShell\n\n\nDatos…

Becomes

                    "Id": {
                        " de host": "56995afd-2444-424e-871c-4c5513731a3b",
                        " de shell": "Microsoft.PowerShell",
                        " de espacio de ejecución": "fc8f1...",
                        " de canalización": "1"
                    },

causing

"failed to parse field [winlog.event_data.Id] of type [keyword] in document with id '0434AIABa-64rEwC2A60'.

Potential fault at line:

_, _ = h.Put(k, sys.RemoveWindowsLineEndings(kv.Value))
where id gets parsed.

@elasticmachine
Copy link
Collaborator

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@andrewkroh andrewkroh added the bug label Jan 23, 2023
@andrewkroh
Copy link
Member

In short, we should not use mapstr.Put because the key names contain dots. The dots imply nested objects in Put. Our mappings for winlog.event_data.* expect string values only (no objects). Instead we should write directly into the map (e.g. h[k] = kv.Value).

@efd6 efd6 self-assigned this Jan 23, 2023
@efd6
Copy link
Contributor

efd6 commented Jan 23, 2023

@narph Is the XML event that contains the example available to include in a test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants