[New Rule] Destructive MongoDB Command - #6540
Merged
Merged
Conversation
Contributor
Rule: New - GuidelinesThese guidelines serve as a reminder set of considerations when proposing a new rule. Documentation and Context
Rule Metadata Checks
New BBR Rules
Testing and Validation
|
|
⛔️ Test failed Results
|
eric-forte-elastic
marked this pull request as ready for review
July 30, 2026 20:42
eric-forte-elastic
requested review from
Aegrah,
bryans3c,
imays11,
terrancedejesus and
w0rk3r
July 30, 2026 20:43
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Network Packet Capture detection rule to identify destructive MongoDB commands (drop DB/collection/index/users/roles) in decoded MongoDB protocol traffic, expanding network_traffic.mongodb coverage.
Changes:
- Introduces a new high-severity KQL query rule targeting destructive MongoDB commands via
network_traffic.mongodb.methodand decodednetwork_traffic.mongodb.query. - Adds investigation guidance, false positive context, and setup requirements specific to MongoDB cleartext visibility.
bryans3c
reviewed
Jul 31, 2026
bryans3c
left a comment
Contributor
There was a problem hiding this comment.
The query had an error regarding wildcards and a filter that optimizes it. LGTM when changed!
bryans3c
approved these changes
Jul 31, 2026
Aegrah
approved these changes
Jul 31, 2026
|
⛔️ Test failed Results
|
|
⛔️ Test failed Results
|
Contributor
Author
|
⛔️ Test failed Results
|
…tection-rules into mongo_destructive_cmd
|
⛔️ Test failed Results
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Pull Request
Issue link(s):
Related to https://github.com/elastic/ia-trade-team/issues/961
Summary - What I changed
Adds the
Destructive MongoDB Commandrule to expandnetwork_traffic.mongodbprotocol coverage.The high-severity KQL rule identifies decoded MongoDB commands that drop databases, collections, indexes, users, or roles. These operations can indicate deliberate data destruction, application disruption, or wipe-and-extort activity against an exposed or compromised MongoDB service.
The query detects explicit destructive values in
network_traffic.mongodb.methodand inspectsnetwork_traffic.mongodb.queryfor modern OP_MSG traffic that may report the genericmsgmethod.Note
This rule does require visibility into the plaintext Mongo DB commands, the primary purpose of this rule is to gauge customer interest in having MongoDB specific rules since we parse those fields (customer's may be having plaintext sensing behind Nginx and if so we can provide significant protection). Otherwise, there is little use to developing the Network traffic specific MongoDB rules.
How To Test
TRADE Stack or RTA
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