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

Moving the Suricata module from its temporary repo to Filebeats #8089

Closed
wants to merge 6 commits into from

Conversation

webmat
Copy link
Contributor

@webmat webmat commented Aug 24, 2018

This is currently a WIP and is not ready to be reviewed yet.

I will consider it ready for review when:

  • The mapping to ECS reflects latest discussions (all ECS fields should be
    at the top level except ecs.source, to avoid the pre-7.0 name clash).
  • The necessary ECS field definitions are added to
    beats/filebeat/_meta/fields.common.yml
    • Note that for now I'll be adding fields manually, only as they are needed
      for this module, not all of them at once.
    • This will let me create the final Kibana objects on the correct top level
      ECS fields, instead of creating them based on suricata.eve.*.
  • The existing Kibana objects are ported over to the ECS fields as described above.

If you want to try the module out, look for a few tips (and more caveats)
in the module's readme: x-pack/filebeat/module/suricata/README.md.
It has functional ingestion, minimal enrichment via Ingest Node and
2 starter dashboards (Overall and Alerts).

@webmat webmat self-assigned this Aug 24, 2018
@webmat webmat added WIP in progress Pull request is currently in progress. and removed WIP labels Aug 24, 2018
@webmat
Copy link
Contributor Author

webmat commented Aug 24, 2018

Correction: just after posting this, I realized that somehow the Kibana objects in _meta/kibana... have the actual objects JSON escaped, saved as a string, instead of being nested JSON like in the other modules. So they're not actually ready to be imported with --setup. I'll have to figure out what's going on there. Perhaps I'm mis-using the Go dashboard exporting tool...

@ruflin
Copy link
Member

ruflin commented Aug 27, 2018

@webmat You are probably looking for #7224 and the follow up PR's. Ping me if you have some more questions.

@webmat
Copy link
Contributor Author

webmat commented Aug 27, 2018

@ruflin Awesome, thank you for the pointer!

Copy link
Member

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me.

I wonder how we should move forward here? Should we start adding the tooling to support modules in the x-pack directory? We could start with the testing part to have this covered.

[float]
=== Compatibility

TODO: document with what versions of the software is this tested
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we fix the TODO in this file before merging? What I worry is that we forget about it before we release it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we can't forget this. But testing compatibility will take a little while. I would track this as a task to be completed as part of the initial release. I wouldn't necessarily have the initial PR wait on this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I would add here is just the version you tested yourself with and used for creating this. That is what we normally do for Filebeat / Metricbeat.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ on creating a meta issue to track necessary steps for first release. could you create one?

Copy link
Contributor Author

@webmat webmat Aug 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I'm handing off the module to Andrew I've created an ad hoc Google Docs with a bit of background, some links, some issues and some remaining tasks. I'll let him decide how to track the follow-up work.

But I did add a task in this handoff doc, so we do have it somewhere. I tagged you there, you should have received a GDoc comment notif :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, I will add the current version I used, though. That's straightforward enough :-)

@@ -0,0 +1,8 @@
{"timestamp":"2018-07-05T15:01:09.820360-0400","flow_id":298824096901438,"in_iface":"en0","event_type":"ssh","src_ip":"192.168.86.85","src_port":55406,"dest_ip":"192.30.253.112","dest_port":22,"proto":"TCP","ssh":{"client":{"proto_version":"2.0","software_version":"OpenSSH_7.6"},"server":{"proto_version":"2.0","software_version":"libssh_0.7.0"}}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to have a test and generated file as we do in other filesets in addition to this. This would also make it more visible how the end events look like.

The problem is I you would have to copy the module to the module directory and then run the test / generate script there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I see what you mean with example test.log and test.log-expected.json.

These tests run which part of the processing? Currently only a little bit of work is performed in Beats (read as JSON as is to suricata.eve.*), and the rest of the work is performed in ingest node. I assume the tests don't run an ES ingest node?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test run ingest node. Have a look at test_modules.py

@webmat
Copy link
Contributor Author

webmat commented Jan 17, 2019

This is no longer relevant.

@webmat webmat closed this Jan 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress Pull request is currently in progress.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants