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] CLI Values to ECS process.command_line #16072

Closed
neu5ron opened this issue Feb 4, 2020 · 9 comments
Closed

[Winlogbeat] CLI Values to ECS process.command_line #16072

neu5ron opened this issue Feb 4, 2020 · 9 comments

Comments

@neu5ron
Copy link

neu5ron commented Feb 4, 2020

Currently in the winlogbeat modules for ECS there is a field for process.command_line which stores the entire command line. As of right now the winlogbeat modules split the command line into process.args which removes the ability to analyze the command line in its original entirety.
Currently this affects Machine Learning jobs, watcher queries, and other queries/rules in their accuracy to match the values.

The solution appears simple, just need to copy the command line value before it gets process into process.args split function.

In the winlogbeat security module copy before this line:

evt.Put("process.args", winlogbeat.splitCommandLine(cl));

In the winlogbeat sysmon module, copy the value to process.command_line before this line

{from: "winlog.event_data.CommandLine", to: "process.args"},

or this line
splitCommandLine(evt, "process.args");

This may need ported for auditbeat and filebeat too.

@neu5ron
Copy link
Author

neu5ron commented Feb 4, 2020

related in a way that may show the importance of this field and matching with EQL and endpoint elastic/ecs#647

@rw-access
Copy link

rw-access commented Jul 23, 2020

@neu5ron was this fixed in #17823?

@neu5ron
Copy link
Author

neu5ron commented Jul 24, 2020

@rw-access I dont believe so, does not appear to be extended to the Security module. Also, I think the same may still apply for any linux (or other) modules.

@botelastic
Copy link

botelastic bot commented Jun 24, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@botelastic botelastic bot added Stalled needs_team Indicates that the issue/PR needs a Team:* label labels Jun 24, 2021
@neu5ron
Copy link
Author

neu5ron commented Jun 24, 2021

creating recent activity, not sure should be closed as stale - still exists.

@elasticmachine
Copy link
Collaborator

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

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 20, 2021
@neu5ron
Copy link
Author

neu5ron commented Mar 22, 2022

bumping this again, still the same issue.
is it possible to just create a catch all at the end of these beats pipelines and ingest pipelines to copy process.args(joined by single white space) to process.command_line ?

@rw-access thoughts?

@rw-access
Copy link

depends on your needs, but I wouldn't recommend it if you plan on writing detection logic for that field. it wouldn't preserve any of the original quoting or escapes

@andrewkroh andrewkroh changed the title CLI Values to ECS process.command_line [Winlogbeat] CLI Values to ECS process.command_line Mar 22, 2022
@botelastic
Copy link

botelastic bot commented Mar 22, 2023

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Mar 22, 2023
@botelastic botelastic bot closed this as completed Sep 18, 2023
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.

5 participants