MongoDB 2FA Disabled


Description

2FA was disabled.

Query · python

from panther_mongodb_helpers import mongodb_alert_context


def rule(event):
    return event.get("eventTypeName", "") == "ORG_TWO_FACTOR_AUTH_OPTIONAL"


def title(event):
    user = event.get("username", "<USER_NOT_FOUND>")
    return f"MongoDB Atlas: [{user}] has disabled 2FA"


def alert_context(event):
    return mongodb_alert_context(event)
Raw source MongoDB 2FA Disabled · Panther Python
Esc
Published by panther-labs/panther-analysis ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
AnalysisType: rule
Description: "2FA was disabled."
DisplayName: "MongoDB 2FA Disabled"
Enabled: true
Filename: mongodb_2fa_disabled.py
Severity: Medium
Reference: https://www.mongodb.com/docs/atlas/security-multi-factor-authentication/
Tests:
  - ExpectedResult: false
    Log:
      created: "2023-06-07 16:57:55"
      currentValue: {}
      eventTypeName: ORG_TWO_FACTOR_AUTH_REQUIRED
      id: 6480b7139bd8a012345ABCDE
      isGlobalAdmin: false
      links:
        - href: https://cloud.mongodb.com/api/atlas/v1.0/orgs/12345xyzlmnce4f17d6e8e130/events/6480b7139bd8a012345ABCDE
          rel: self
      orgId: 12345xyzlmnce4f17d6e8e130
      p_event_time: "2023-06-07 16:57:55"
      p_log_type: MongoDB.OrganizationEvent
      p_parse_time: "2023-06-07 17:04:42.59"
      p_row_id: ea276b16216684d9e198c0d0188a3d
      p_schema_version: 0
      p_source_id: 7c3cb124-9c30-492c-99e6-46518c232d73
      p_source_label: MongoDB
      remoteAddress: 1.2.3.4
      targetUsername: insider@company.com
      userId: 647f654f93bebc69123abc1
      username: user@company.com
    Name: 2FA ebabled
  - ExpectedResult: true
    Log:
      created: "2023-06-07 16:57:55"
      currentValue: {}
      eventTypeName: ORG_TWO_FACTOR_AUTH_OPTIONAL
      id: 6480b7139bd8a012345ABCDE
      isGlobalAdmin: false
      links:
        - href: https://cloud.mongodb.com/api/atlas/v1.0/orgs/12345xyzlmnce4f17d6e8e130/events/6480b7139bd8a012345ABCDE
          rel: self
      orgId: 12345xyzlmnce4f17d6e8e130
      p_event_time: "2023-06-07 16:57:55"
      p_log_type: MongoDB.OrganizationEvent
      p_parse_time: "2023-06-07 17:04:42.59"
      p_row_id: ea276b16216684d9e198c0d0188a3d
      p_schema_version: 0
      p_source_id: 7c3cb124-9c30-492c-99e6-46518c232d73
      p_source_label: MongoDB
      remoteAddress: 1.2.3.4
      targetUsername: outsider@other.com
      userId: 647f654f93bebc69123abc1
      username: user@company.com
    Name: 2FA disabled
DedupPeriodMinutes: 60
LogTypes:
  - MongoDB.OrganizationEvent
RuleID: "MongoDB.2FA.Disabled"
Threshold: 1


# ------ paired body: mongodb_2fa_disabled.py ------

from panther_mongodb_helpers import mongodb_alert_context


def rule(event):
    return event.get("eventTypeName", "") == "ORG_TWO_FACTOR_AUTH_OPTIONAL"


def title(event):
    user = event.get("username", "<USER_NOT_FOUND>")
    return f"MongoDB Atlas: [{user}] has disabled 2FA"


def alert_context(event):
    return mongodb_alert_context(event)

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.