Skip to content

[Sophos] UTM data stream: replace Javascript processing with ingest pipelines - #6816

Merged
chemamartinez merged 14 commits into
elastic:mainfrom
chemamartinez:6184-sophos-utm
Jul 24, 2023
Merged

[Sophos] UTM data stream: replace Javascript processing with ingest pipelines#6816
chemamartinez merged 14 commits into
elastic:mainfrom
chemamartinez:6184-sophos-utm

Conversation

@chemamartinez

Copy link
Copy Markdown
Contributor

What does this PR do?

This pull request updates the Sophos integration to:

  • Support DNS, DHCP, HTTP, and Packet Filter logs from UTM. Ingest pipelines have been added to process those events in favor of the current Javascript scripts.
  • Created dashboards for the event types mentioned below.
  • Fixed a small issue in the xg data stream about an incompatible event type and category.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Related issues

Screenshots

Integration page and configuration
Screenshot 2023-07-05 at 08 52 21

Screenshot 2023-07-05 at 00 05 16

Dashboards

sophos-utm-overview

sophos-utm-dhcp

sophos-utm-http

sophos-utm-packetfilter

@chemamartinez
chemamartinez marked this pull request as ready for review July 5, 2023 07:16
@chemamartinez
chemamartinez requested a review from a team as a code owner July 5, 2023 07:16
@elasticmachine

Copy link
Copy Markdown

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

@elasticmachine

elasticmachine commented Jul 5, 2023

Copy link
Copy Markdown

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-07-24T10:08:14.705+0000

  • Duration: 19 min 41 sec

Test stats 🧪

Test Results
Failed 0
Passed 38
Skipped 0
Total 38

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine

elasticmachine commented Jul 5, 2023

Copy link
Copy Markdown

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (2/2) 💚
Files 100.0% (17/17) 💚
Classes 100.0% (17/17) 💚
Methods 100.0% (125/125) 💚 4.673
Lines 90.899% (2487/2736) 👍 9.911
Conditionals 100.0% (0/0) 💚

@P1llus P1llus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not reviewed packetfilter yet, nor the pipelines, just the test logs and expected.json for them. Will do the rest a bit later.

]
},
"host": {
"hostname": "sophos-test-vm2"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are these the host or the observer? I would say its the observer maybe? Unsure if it was SIEM that required host.name or host.hostname for it to appear, but we could check that out if necessary.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I would say it is the hostname where the original log was created since Sophos reads directly from the original log files, based on the list here. In addition, the timestamp read from logs is considered the original timestamp of the event.

But, I am not 100% sure here.

"country": "United States",
"dnstime": 5,
"filteraction": "REF_HTTP_ACTION",
"fullreqtime": 32181,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would this match with event.duration? Unsure as I have not checked their docs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems so, but I am not 100% sure either, most of HTTP events have several time-related fields, such as:

authtime="0" dnstime="249" aptptime="0" cattime="206" avscantime="0" fullreqtime="1499"

It is complicated to say for sure as I couldn't find any docs related to these fields.

@chemamartinez
chemamartinez requested a review from P1llus July 18, 2023 06:59
Comment on lines +28 to 29
value: start
if: "['17701', '17704', '17707', '17710', '17713'].contains(ctx.event?.code)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/packetfilter.yml Outdated
Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/http.yml Outdated
Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/packetfilter.yml Outdated
Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/packetfilter.yml Outdated
Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/packetfilter.yml Outdated
Comment thread packages/sophos/data_stream/utm/elasticsearch/ingest_pipeline/default.yml Outdated
@chemamartinez
chemamartinez requested a review from efd6 July 24, 2023 07:20
@chemamartinez
chemamartinez merged commit 42f49ac into elastic:main Jul 24, 2023
@elasticmachine

Copy link
Copy Markdown

Package sophos - 3.0.0 containing this change is available at https://epr.elastic.co/search?package=sophos

4 similar comments
@elasticmachine

Copy link
Copy Markdown

Package sophos - 3.0.0 containing this change is available at https://epr.elastic.co/search?package=sophos

@elasticmachine

Copy link
Copy Markdown

Package sophos - 3.0.0 containing this change is available at https://epr.elastic.co/search?package=sophos

@elasticmachine

Copy link
Copy Markdown

Package sophos - 3.0.0 containing this change is available at https://epr.elastic.co/search?package=sophos

@elasticmachine

Copy link
Copy Markdown

Package sophos - 3.0.0 containing this change is available at https://epr.elastic.co/search?package=sophos

@chemamartinez
chemamartinez deleted the 6184-sophos-utm branch February 6, 2025 10:30
orestisfl pushed a commit to orestisfl/integrations that referenced this pull request May 15, 2026
…ipelines (elastic#6816)

* Fix invalid event type for XG data stream

* Update Sophos UTM data stream

* Add event outcome and log source to UTM events

* Generate sample event and add it to package docs

* Convert some fields from keyword to long

* Create dashboards for Sophos UTM

* Add screenshots of Sophos UTM dashboards

* Update changelog

* Add requested changes

* Adapt dashboards to requested changes

* Add service to event.action for some cases

* Add requested changes in ingest pipelines

* Remove extra conditions

* Lowercase observer type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Integration:sophos Sophos

4 participants