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

[sophos] Various improvements and log samples from 18.5 #3127

Merged
merged 25 commits into from
Apr 21, 2022

Conversation

andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Apr 19, 2022

What does this PR do?

  • Remove space from sophos.xg.trans_src_ip field name in mapping. Sync fix from [Filebeat] Remove space from field sophos.xg.trans_src_ ip beats#25250.

  • Do not modify event.original.

  • Populate url.* fields based on sophos.xg.url.

  • Rename sophos.xg.reason to event.reason (ECS).

  • Normalize all sophos.xg.* keys to lowercase.

  • Lowercase network.transport as per ECS.

  • Format source.mac and destination.mac as per ECS.

  • Add Sophos Firewall 18.5 log samples taken from documentation.

  • Set the event.code from the message ID (and remove sophos.xg.messageid).

  • Consolidate geoip enrichment

  • Consolidate related.ip processors

  • Consolidate lowercase network.transport/protocol

  • Consolidate related.user processing

  • Consolidate related.hash

  • Consolidate network.{bytes,packets} calculations

  • Add network.community_id

  • Add {url,source,destination}.domain to related.hosts

  • Set event.duration (ns) for WAF events using reponsetime (us)

  • Remove client/server mappings. This was a large amount of duplication causing increased event sizes.

  • Add reference link to xg syslog formats

Anti-Virus

  • Set destination.domain from sophos.xg.dstdomain in anti-virus log.

  • Use sophos.xg.dst_domainname to set destination.domain for Anti-Virus SMTP events.

  • Use sophos.xg.src_domainname to set source.domain for Anti-Virus SMTP events.

  • Set network.protocol for anti-virus logs.

Anti-Spam

  • Set network.protocol for anti-spam logs.

Content Filtering

  • Set network.protocol for Content Filtering. Use the URL scheme to derive the protocol.

Sandstorm

  • Set file.name for Sandstorm events (there was a typo in the if condition).

  • Set url.domain, destination.domain, and destination.ip for Sandstorm web events.

  • Handle sha256 Sandstorm file hashes. In 17.5 and earlier the sha1sum contained the sha1 checksum of the file being analyzed. In 18.0 and later the sha1sum contains the sha256 checksum of the file.

System Health

  • Convert sophos.xg.collisions, sophos.xg.receiveddrops, and sophos.xg.transmitteddrops to float in document _source.

Wireless Protection

  • Change sophos.xg.clients_conn_ssid to a long in the mapping.

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.

@andrewkroh andrewkroh added bug Something isn't working, use only for issues enhancement New feature or request Team:Security-External Integrations Integration:sophos Sophos labels Apr 19, 2022
@andrewkroh andrewkroh force-pushed the sophos/fix-field-names-uri-parts branch from 41584c6 to ff17251 Compare April 19, 2022 19:03
@elasticmachine
Copy link

elasticmachine commented Apr 19, 2022

💚 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: 2022-04-21T15:53:11.842+0000

  • Duration: 16 min 51 sec

Test stats 🧪

Test Results
Failed 0
Passed 28
Skipped 0
Total 28

🤖 GitHub comments

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

  • /test : Re-trigger the build.

@andrewkroh andrewkroh force-pushed the sophos/fix-field-names-uri-parts branch from ff17251 to d52441c Compare April 20, 2022 16:09
Fix inconsistency in that only some keys were being lowercase. And the way it
was done before was not good because it modified the event.original value.
@andrewkroh andrewkroh force-pushed the sophos/fix-field-names-uri-parts branch from d52441c to fdf6e8d Compare April 20, 2022 16:30
Set the event.code from the message ID (and remove sophos.xg.messageid).

Set destination.domain from dstdomain in anti-virus log.

Fix event.original handling. The original message was being modified by the pipeline. Now the raw message is stored in event.original without modification.

Lower case network.transport as per ECS.

Set event.reason from sophos.xg.reason (and remove sophos.xg.reason).
Sandstorm

Set file.name for sandstorm events (there was a typo in the if condition).
Set url.domain, destination.domain, and destination.ip for sandstorm web events.

System Health

Convert sophos.xg.collisions, sophos.xg.receiveddrops, and sophos.xg.transmitteddrops to float in _source.

Wireless Protection

Change sophos.xg.clients_conn_ssid to long in mapping.
Use dst_domainname to set destination.domain for Anti-Virus SMTP events.
Use src_domainname to set source.domain for Anti-Virus SMTP events.
@andrewkroh andrewkroh force-pushed the sophos/fix-field-names-uri-parts branch from fdf6e8d to 112e782 Compare April 20, 2022 18:57
@andrewkroh andrewkroh force-pushed the sophos/fix-field-names-uri-parts branch from 112e782 to 2bcd82c Compare April 20, 2022 19:10
@andrewkroh andrewkroh force-pushed the sophos/fix-field-names-uri-parts branch from 2bcd82c to ebe5cfd Compare April 20, 2022 19:49
@andrewkroh andrewkroh changed the title [sophos] Lowercase names, Add uri_parts, Fix trans_src_ip [sophos] Various improvements and log samples from 18.5 Apr 20, 2022
@andrewkroh andrewkroh force-pushed the sophos/fix-field-names-uri-parts branch 2 times, most recently from da09ecf to a11cd4b Compare April 20, 2022 20:13
[git-generate]
cd packages/sophos
elastic-package format
elastic-package build
elastic-package test pipeline -g
@andrewkroh andrewkroh force-pushed the sophos/fix-field-names-uri-parts branch from a11cd4b to 8216183 Compare April 20, 2022 21:16
@andrewkroh andrewkroh marked this pull request as ready for review April 20, 2022 21:45
@andrewkroh andrewkroh requested a review from a team as a code owner April 20, 2022 21:45
@elasticmachine
Copy link

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

Replaces `ctx?.` with `ctx.` in all of the sophos.xg pipelines.
@andrewkroh andrewkroh force-pushed the sophos/fix-field-names-uri-parts branch from fbd17f1 to ab1fe1c Compare April 21, 2022 15:52
@andrewkroh andrewkroh merged commit 919fe81 into elastic:main Apr 21, 2022
v1v added a commit to v1v/integrations that referenced this pull request Apr 25, 2022
…ations into feature/labels-cloud-ephemeral-components

* 'feature/labels-cloud-ephemeral-components' of github.com:v1v/integrations: (23 commits)
  use branch
  standardise labels/tags
  Update .ci/Jenkinsfile
  [ci][terraform][aws] tags with metadata
  Bump github.com/elastic/elastic-package from 0.46.0 to 0.47.0 (elastic#3182)
  Spring boot package [Memory - data stream] (elastic#2979)
  [cisco_ise] Add Cisco ISE package (elastic#2855)
  [apache_spark][executor] Add Apache Spark package with Executor data stream (elastic#2943)
  [apache_spark][driver] Add Apache Spark package with Driver data stream (elastic#2945)
  cisco_duo: simplify grok expression for handling ports (elastic#3170)
  cisco_duo: fix handling of IP addresses with port numbers (elastic#3117)
  [sophos] Various improvements and log samples from 18.5 (elastic#3127)
  [cisco_asa] fix visualizations (elastic#3146)
  [apache_spark][application] Add Apache Spark package with Application data stream (elastic#2941)
  Fix pagination bug that skipped events when more than one page is present. (elastic#3140)
  Cis k8s name migration (elastic#3113)
  remove exported fields; these will be added to Kibana docs instead (elastic#3093)
  Exclude ecosystem as owner of subdirectories of packages (elastic#3132)
  [awsfargate] bump package version (elastic#3130)
  add first csp rule template (elastic#3081)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, use only for issues enhancement New feature or request Integration:sophos Sophos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants