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

Checkpoint Syslog Filebeat module #17682

Merged
merged 14 commits into from
Apr 20, 2020
Merged

Conversation

P1llus
Copy link
Member

@P1llus P1llus commented Apr 13, 2020

What does this PR do?

This PR adds checkpoint filebeat module.

The difference between this module and the CEF checkpoint module is that this is utilizing the syslog output format instead of CEF.

This output format supports a much larger set of fields from Checkpoint.

This is a collaboration work with @adriansr .

Why is it important?

Adding more supported products to the filebeat portfolio.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Closes #16041

Nosetests run successfully:
INTEGRATION_TESTS=1 BEAT_STRICT_PERMS=false TESTING_FILEBEAT_MODULES=checkpoint nosetests -v -s tests/system/test_xpack_modules.py

@P1llus P1llus added enhancement in progress Pull request is currently in progress. Team:SIEM labels Apr 13, 2020
@P1llus P1llus requested a review from adriansr April 13, 2020 08:56
@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@P1llus P1llus changed the title finishing first MVP of the checkpoint filebeat module Checkpoint Syslog Filebeat module Apr 13, 2020
adriansr added a commit that referenced this pull request Apr 14, 2020
This PR makes some changes to CEF module's custom mappings for Check Point
devices to ensure compatibility with the upcoming checkpoint module.

Check Point has its custom log format, for which a new module is being
prepared. The idea behind this new module as well as CEF custom mappings for
Check Point (this PR), is to use ECS whenever possible and map the rest
under checkpoint.* using the original field name from Check Point.

In the original PR for CEF, a few mistakes had been done in field names and
types. Also taking the opportunity to change some ECS mappings.

Related #16907 #17682
adriansr added a commit to adriansr/beats that referenced this pull request Apr 14, 2020
This PR makes some changes to CEF module's custom mappings for Check Point
devices to ensure compatibility with the upcoming checkpoint module.

Check Point has its custom log format, for which a new module is being
prepared. The idea behind this new module as well as CEF custom mappings for
Check Point (this PR), is to use ECS whenever possible and map the rest
under checkpoint.* using the original field name from Check Point.

In the original PR for CEF, a few mistakes had been done in field names and
types. Also taking the opportunity to change some ECS mappings.

Related elastic#16907 elastic#17682

(cherry picked from commit 4f6da4f)
adriansr added a commit to adriansr/beats that referenced this pull request Apr 14, 2020
This PR makes some changes to CEF module's custom mappings for Check Point
devices to ensure compatibility with the upcoming checkpoint module.

Check Point has its custom log format, for which a new module is being
prepared. The idea behind this new module as well as CEF custom mappings for
Check Point (this PR), is to use ECS whenever possible and map the rest
under checkpoint.* using the original field name from Check Point.

In the original PR for CEF, a few mistakes had been done in field names and
types. Also taking the opportunity to change some ECS mappings.

Related elastic#16907 elastic#17682

(cherry picked from commit 4f6da4f)
adriansr added a commit that referenced this pull request Apr 15, 2020
)

This PR makes some changes to CEF module's custom mappings for Check Point
devices to ensure compatibility with the upcoming checkpoint module.

Check Point has its custom log format, for which a new module is being
prepared. The idea behind this new module as well as CEF custom mappings for
Check Point (this PR), is to use ECS whenever possible and map the rest
under checkpoint.* using the original field name from Check Point.

In the original PR for CEF, a few mistakes had been done in field names and
types. Also taking the opportunity to change some ECS mappings.

Related #16907 #17682

(cherry picked from commit 4f6da4f)
adriansr added a commit that referenced this pull request Apr 15, 2020
)

This PR makes some changes to CEF module's custom mappings for Check Point
devices to ensure compatibility with the upcoming checkpoint module.

Check Point has its custom log format, for which a new module is being
prepared. The idea behind this new module as well as CEF custom mappings for
Check Point (this PR), is to use ECS whenever possible and map the rest
under checkpoint.* using the original field name from Check Point.

In the original PR for CEF, a few mistakes had been done in field names and
types. Also taking the opportunity to change some ECS mappings.

Related #16907 #17682

(cherry picked from commit 4f6da4f)
@P1llus P1llus added review and removed in progress Pull request is currently in progress. labels Apr 15, 2020
Copy link
Contributor

@leehinman leehinman left a comment

Choose a reason for hiding this comment

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

Looking really good. I've got a couple of suggestions for increased use of ECS.

  • The related.ip, related.hash & related.user fields should be populated.
  • event.category, any chance we can figure out when malware & intrusion_detection could be added?
  • event.type in-line comments on allowed & denied could we also use sequence number for start?

@P1llus P1llus requested a review from leehinman April 16, 2020 20:28
@P1llus
Copy link
Member Author

P1llus commented Apr 16, 2020

All changes from comments has been applied, new expected.json generated, and nosetest has been run again.

CHANGELOG.next.asciidoc Outdated Show resolved Hide resolved
x-pack/filebeat/module/checkpoint/_meta/docs.asciidoc Outdated Show resolved Hide resolved
P1llus and others added 3 commits April 16, 2020 23:16
@P1llus
Copy link
Member Author

P1llus commented Apr 16, 2020

Added updated documentation changes as per @andrewkroh comments. Documentation from CEF to checkpoint module will be done in a separate PR.

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM. @leehinman do you want to take another look?

{
"@timestamp": "2020-03-29T13:19:20Z",
"checkpoint.sys_message": ":\"The eth0 interface is not protected by the anti-spoofing feature. Your network may be at risk",
"event.category": [
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Member Author

@P1llus P1llus Apr 20, 2020

Choose a reason for hiding this comment

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

Seems like the format for checkpoint.sys_message is different than the rest during errors and alerts, will add a fix for this.

The issue is because that specific field has a weird value, this is the raw event coming directly from the device:
sys_message::"The eth0 interface is not protected by the anti-spoofing feature. Your network may be at risk"]

Copy link
Contributor

Choose a reason for hiding this comment

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

I was commenting that it's good to see event.category as an array!

…a to ensure both correct and incorrect format is working
@P1llus
Copy link
Member Author

P1llus commented Apr 20, 2020

@tonymeehan

I have added a workaround for this issue, as its not in the parser itself but rather a bug on the Checkpoint side.

I have updated the dataset to have at least 1 properly formatted and 1 incorrectly formatted message, to ensure the parser works for both. Re-ran nosetests afterwards.

@andrewkroh andrewkroh merged commit afc3a49 into elastic:master Apr 20, 2020
@tonymeehan
Copy link
Contributor

@P1llus really awesome to see this PR!

@P1llus P1llus deleted the checkpoint-module branch April 20, 2020 15:58
@andrewkroh andrewkroh added the needs_backport PR is waiting to be backported to other branches. label Apr 20, 2020
@andrewkroh andrewkroh added v7.8.0 and removed needs_backport PR is waiting to be backported to other branches. labels Apr 20, 2020
andrewkroh pushed a commit to andrewkroh/beats that referenced this pull request Apr 20, 2020
This adds a CheckPoint Filebeat module.

The difference between this module and the CEF checkpoint module is that this is utilizing the syslog output format instead of CEF.

This syslog output format supports a much larger set of fields from Checkpoint.

(cherry picked from commit afc3a49)
andrewkroh added a commit that referenced this pull request Apr 22, 2020
This adds a CheckPoint Filebeat module.

The difference between this module and the CEF checkpoint module is that this is utilizing the syslog output format instead of CEF.

This syslog output format supports a much larger set of fields from Checkpoint.

(cherry picked from commit afc3a49)

Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
@hazcod
Copy link
Contributor

hazcod commented Apr 29, 2020

@P1llus / @tonymeehan : This seems to not include any ssl configuration for input?
Any way to overwrite it? I'm trying the following:

- module: checkpoint
  access:
    input:
    - type: syslog
    protocol.tcp:
      host: "0.0.0.0:8001"
    tls:
    .....

leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
… (elastic#17712)

This PR makes some changes to CEF module's custom mappings for Check Point
devices to ensure compatibility with the upcoming checkpoint module.

Check Point has its custom log format, for which a new module is being
prepared. The idea behind this new module as well as CEF custom mappings for
Check Point (this PR), is to use ECS whenever possible and map the rest
under checkpoint.* using the original field name from Check Point.

In the original PR for CEF, a few mistakes had been done in field names and
types. Also taking the opportunity to change some ECS mappings.

Related elastic#16907 elastic#17682

(cherry picked from commit ddb92ca)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Filebeat] Add module for Checkpoint Firewall
6 participants