[Rule Tuning] Add Corelight support for existing rules#6261
Conversation
Enhancement - GuidelinesThese guidelines serve as a reminder set of considerations when addressing adding a new schema feature to the code. Documentation and Context
Code Standards and Practices
Testing
Additional Schema Related Checks
|
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
There was a problem hiding this comment.
Pull request overview
This PR tunes several existing network flow rules to recognize Corelight-ingested Zeek/ECS network telemetry by adding corelight metadata and logs-corelight.* index coverage, and updates the rules tooling to accept corelight as a non-dataset integration package.
Changes:
- Add
corelightto theintegrationmetadata andlogs-corelight.*toindexfor five existing network rules, plus aData Source: Corelighttag. - Add
corelighttoNON_DATASET_PACKAGESto relax dataset-based validation expectations for the package. - Bump the Python package version from
1.6.51to1.6.52.
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| rules/network/initial_access_smb_windows_file_sharing_activity_to_the_internet.toml | Adds Corelight integration metadata, index pattern, and tag for SMB-to-Internet detection. |
| rules/network/initial_access_rpc_remote_procedure_call_to_the_internet.toml | Adds Corelight integration metadata, index pattern, and tag for RPC-to-Internet detection. |
| rules/network/initial_access_rpc_remote_procedure_call_from_the_internet.toml | Adds Corelight integration metadata, index pattern, and tag for RPC-from-Internet detection. |
| rules/network/command_and_control_rdp_remote_desktop_protocol_from_the_internet.toml | Adds Corelight integration metadata, index pattern, and tag for RDP-from-Internet detection. |
| rules/network/command_and_control_port_26_activity.toml | Adds Corelight integration metadata, index pattern, and tag for SMTP-on-26 detection. |
| detection_rules/schemas/definitions.py | Adds corelight to NON_DATASET_PACKAGES to support validation/packaging behavior. |
| pyproject.toml | Increments project version. |
Mikaayenson
left a comment
There was a problem hiding this comment.
@eric-forte-elastic what about lateral_movement_dns_server_overflow.toml? otherwise lgtm
Good question, I should have called this one out in the description. It is not directly compatible without a more involved query modification. At the time I was going to have it in a separate tuning PR. The short version is that for that rule Corelight behaves more like a flow based source rather than a packet based source depending on what data_stream is populating the events. With this, it has a decent risk of introducing FPs for long DNS connections (rather than just large, since the destination.bytes can in certain cases be calculated on aggregate instead of at the connection level). It is now tuned in this PR in be46253 |
|
⛔️ Test failed Results
|
Pull Request
Issue link(s):
Summary - What I changed
Small update to add Corelight coverage to existing rules that already carry Zeek support. Also updates the integrations manifest to register the
corelightpackage.Note
Corelight data does not land in
logs-zeek.*despite Corelight sensors running Zeek. The Elasticcorelightintegration package is dashboards-only — normalization is handled by the customer-installedcorelight/ecs-templates+corelight/ecs-mappingpipelines, which write tologs-corelight.*withdata_stream.dataset:corelight.<stream>. Rules with onlylogs-zeek.*in their index list return zero results on Corelight data.For the five flow-level rules in this PR, no query changes were required. Corelight populates
event.category:networkand the standard ECS 5-tuple fields; the existingevent.category:(network or network_traffic)branch in each rule fires on Corelight data oncelogs-corelight.*is added to the index list.Because the
corelightpackage ships no ingest pipelines or field schema,corelightwas added toNON_DATASET_PACKAGESindefinitions.pyso the integration tag validator accepts the metadata tag on rules whose queries do not reference adata_stream.dataset:corelight.*clause directly.How To Test
RTAs in elastic/cortado#34
And unit testing.
Checklist
bug,enhancement,schema,maintenance,Rule: New,Rule: Deprecation,Rule: Tuning,Hunt: New, orHunt: Tuningso guidelines can be generatedmeta:rapid-mergelabel if planning to merge within 24 hoursContributor checklist