Panther high experimental python
MongoDB access allowed from anywhere
Atlas only allows client connections to the database deployment from entries in the project's IP access list. This rule detects when 0.0.0.0/0 is added to that list, which allows access from anywhere.
Detection Logic
from panther_mongodb_helpers import mongodb_alert_context
def rule(event):
if (
event.get("eventTypeName", "") == "NETWORK_PERMISSION_ENTRY_ADDED"
and event.get("whitelistEntry", "") == "0.0.0.0/0"
):
return True
return False
def title(event):
user = event.get("username", "<USER_NOT_FOUND>")
group_id = event.get("groupId", "<GROUP_NOT_FOUND>")
return f"MongoDB: [{user}] has allowed access to group [{group_id}] from anywhere"
def alert_context(event):
context = mongodb_alert_context(event)
context["groupId"] = event.get("groupId", "<GROUP_NOT_FOUND>")
return context Field Validations
Loading…
Comments (0)
Loading comments...