Skip to content

[Rapid7] Initial Release for the Rapid7 - #4904

Merged
efd6 merged 6 commits into
elastic:mainfrom
rajvi-ptl:package_ti_rapid7
Feb 8, 2023
Merged

[Rapid7] Initial Release for the Rapid7#4904
efd6 merged 6 commits into
elastic:mainfrom
rajvi-ptl:package_ti_rapid7

Conversation

@rajvi-ptl

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Generated the skeleton of the Rapid7 integration package.
  • Added data streams.
  • Added data collection logic for all the data streams.
  • Added the ingest pipeline for all the data streams.
  • Mapped fields according to the ECS schema and added Fields metadata in the appropriate yml files.
  • Added dashboards and visualizations.
  • Added detection rules for correlation.
  • Added test for pipeline for all the data streams.
  • Added system test cases for all the data streams.

Integration release checklist

This checklist is intended for integrations maintainers to ensure consistency
when creating or updating a Package, Module or Dataset for an Integration.

All changes

  • Change follows the contributing guidelines
  • Supported versions of the monitoring target is documented
  • Supported operating systems are documented (if applicable)
  • Integration or System tests exist
  • Documentation exists
  • Fields follow ECS and naming conventions
  • At least a manual test with ES / Kibana / Agent has been performed.
  • Required Kibana version set to: ^8.4.0

New Package

  • Screenshot of the "Add Integration" page on Fleet added

Dashboards changes

  • Dashboards exists
  • Screenshots added or updated
  • Datastream filters added to visualizations

Log dataset changes

  • Pipeline tests exist (if applicable)
  • Generated output for at least 1 log file exists
  • Sample event (sample_event.json) exists

How to test this PR locally

  • Clone integrations repo.
  • Install elastic package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/ti_rapid7 directory.
  • Run the following command to run tests.

elastic-package test

Screenshots

image
image
image
image
image
image

@cla-checker-service

cla-checker-service Bot commented Dec 28, 2022

Copy link
Copy Markdown

💚 CLA has been signed

@elasticmachine

elasticmachine commented Dec 28, 2022

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-02-08T08:01:27.525+0000

  • Duration: 17 min 34 sec

Test stats 🧪

Test Results
Failed 0
Passed 23
Skipped 0
Total 23

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

@rajvi-ptl rajvi-ptl changed the title Package ti rapid7 Dec 28, 2022
@jamiehynds
jamiehynds requested a review from a team January 10, 2023 09:11
@CyberTaoFlow

Copy link
Copy Markdown

👍

@jamiehynds jamiehynds added Team:Security-External Integrations New Integration Issue or pull request for creating a new integration package. labels Jan 18, 2023
@elasticmachine

Copy link
Copy Markdown

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

@jamiehynds

Copy link
Copy Markdown

@rajvi-crest can you confirm which Rapid7 product this integration relates to? I'm guessing Threat Command? I'd recommend adjusting the name of the integration to include the product name. We're about to work on an InsightVM integration too, and want to ensure there's no confusion.

If the integration is focused on Threat Intel, we should also consider populating the log-ti-* data stream, to ensure the IOCs can be leveraged by out out-of-the-box threat intel capabilities.

@rajvi-ptl

Copy link
Copy Markdown
Contributor Author

@rajvi-crest can you confirm which Rapid7 product this integration relates to? I'm guessing Threat Command? I'd recommend adjusting the name of the integration to include the product name. We're about to work on an InsightVM integration too, and want to ensure there's no confusion.

If the integration is focused on Threat Intel, we should also consider populating the log-ti-* data stream, to ensure the IOCs can be leveraged by out out-of-the-box threat intel capabilities.

Yes @jamiehynds, This integration package is created for the Rapid7 Threat Command product which collects IOCs, Alerts and Vulnerabilities.

I understand your concern regarding the package name and we are planning to change ti_rapid7 with the ti_rapid7_threat_command. What do you think? We will also change the README and titles with the same wherever applicable.

This integration package is intended to collect threat intel data and will store collected data to the logs-ti_rapid7.<data-stream>-default data-stream. Also, we have tried to map collected data as per the ECS schema and followed all the best practices as per the other threat intel integrations. Hence, I think IOCs collected from the Rapid7 platform will be leveraged by the threat intel capabilities.

We will accommodate all the suggested changes once the entire PR gets reviewed by the team. I hope that would be fine.

@efd6

efd6 commented Jan 19, 2023

Copy link
Copy Markdown
Contributor

/test

@elasticmachine

elasticmachine commented Jan 19, 2023

Copy link
Copy Markdown

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (3/3) 💚
Files 100.0% (3/3) 💚
Classes 100.0% (3/3) 💚
Methods 88.372% (38/43) 👍 55.039
Lines 94.245% (868/921) 👎 -5.755
Conditionals 100.0% (0/0) 💚

## Overview

The [Rapid7](https://www.rapid7.com/) integration allows users to retrieve `IOCs (Indicator of Compromises)`, organization-specific `Threat Command alerts`, and `CVEs (Common Vulnerabilities and Exposures)`. Furthermore, the correlation between data collected from the Rapid7 platform (IOCs and CVEs) and the user's environment helps to identify threats. Rapid7 platform gives protectors the tools and clarity they need to assess their attack surface, detect suspicious behavior, and respond and remediate quickly with intelligent automation.

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.

ISTM that the items here that are code formatted should probably rather be either bold or italic.

Also some (but not all) below.

Comment thread packages/ti_rapid7/_dev/build/docs/README.md Outdated
Comment on lines +1 to +2
dynamic_fields:
event.ingested: ".*"

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.

This is not needed, we don't add event.ingested in the pipeline.

if: ctx.json?.type == 'Urls'
- script:
lang: painless
if: ctx.json.type != null

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.

Suggested change
if: ctx.json.type != null
if: ctx.json?.type != null
Comment on lines +1 to +2
dynamic_fields:
event.ingested: ".*"

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.

Delete

target_field: json
ignore_failure: true
- drop:
if: ctx.json?.content != null && ctx.json?.content?.isEmpty()

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.

Suggested change
if: ctx.json?.content != null && ctx.json?.content?.isEmpty()
if: ctx.json?.content != null && ctx.json.content.isEmpty()
Comment on lines +72 to +78
- set:
field: '@timestamp'
copy_from: rapid7.vulnerability.update_date
on_failure:
- set:
field: '@timestamp'
copy_from: _ingest.timestamp

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.

Move this up.

@rajvi-ptl
rajvi-ptl requested review from efd6 February 6, 2023 11:59
@efd6

efd6 commented Feb 8, 2023

Copy link
Copy Markdown
Contributor

/test

@efd6 efd6 left a comment

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.

Please separate into different commits wholesale renames from line based changes to ease review follow-ups, less important but also helpful if you can separate large scale ~mechanical changes into their own commit (for example the rapid7 -> rapid7.tc changes).

@@ -1,4 +1,4 @@
- name: rapid7.vulnerability
- name: rapid7.tc.vulnerability

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.

Why is this sub-namespaced rather than rapid7_tc.vulnerability or rapid7_threat_command.vulnerability? (similar throughout)

Will there be future rapid7 packages that are not "Threat Command"?

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.

Yes, the elastic security team is currently working on the InsightVM Integration of Rapid7 as @jamiehynds mentioned here. So we thought to keep the field name as rapid7.tc.vulnerability because both products are of Rapid7 and we can differentiate the field name between their products. Let me know your thoughts on this.

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.

Yeah, OK. Thanks.

Comment thread .github/CODEOWNERS Outdated
/packages/ti_cybersixgill @elastic/security-external-integrations
/packages/ti_misp @elastic/security-external-integrations
/packages/ti_otx @elastic/security-external-integrations
/packages/ti_rapid7 @elastic/security-external-integrations

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.

Suggested change
/packages/ti_rapid7 @elastic/security-external-integrations
/packages/ti_rapid7_threat_command @elastic/security-external-integrations
@rajvi-ptl

Copy link
Copy Markdown
Contributor Author

Please separate into different commits wholesale renames from line based changes to ease review follow-ups, less important but also helpful if you can separate large scale ~mechanical changes into their own commit (for example the rapid7 -> rapid7.tc changes).

Sure @efd6, I see there are only name changes in the fields are the major ones and a few minor changes along with this existing commit. Let me know if you still want to split the existing commit. But definitely going forwards we'll keep this in mind and keep the different code changes in different commits for making the review process easy .

@efd6

efd6 commented Feb 8, 2023

Copy link
Copy Markdown
Contributor

No need to split what is done here, I was just thinking for the future. Thank you.

@efd6

efd6 commented Feb 8, 2023

Copy link
Copy Markdown
Contributor

/test

@rajvi-ptl

Copy link
Copy Markdown
Contributor Author

@efd6, We have addressed all the review comments. Hence, can you please approve and merge this PR?

@efd6 efd6 left a comment

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.

Thanks

@efd6
efd6 merged commit 437d57e into elastic:main Feb 8, 2023
@elasticmachine

Copy link
Copy Markdown

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

orestisfl pushed a commit to orestisfl/integrations that referenced this pull request May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Integration Issue or pull request for creating a new integration package.

6 participants