Wiz Update Login Settings


Description

This rule detects updates of Wiz login settings.

Query · python

from panther_wiz_helpers import wiz_actor, wiz_alert_context, wiz_success


def rule(event):
    if not wiz_success(event):
        return False
    return event.get("action", "ACTION_NOT_FOUND") == "UpdateLoginSettings"


def title(event):
    actor = wiz_actor(event)

    return (
        f"[Wiz]: [{event.get('action', 'ACTION_NOT_FOUND')}] action "
        f"performed by {actor.get('type')} [{actor.get('name')}]"
    )


def dedup(event):
    return event.get("id")


def alert_context(event):
    return wiz_alert_context(event)

Analyst notes

Verify that this change was planned. If not, revert the change and ensure this doesn't happen again.

Raw source Wiz Update Login Settings · Panther Python
Esc
Published by panther-labs/panther-analysis ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
AnalysisType: rule
RuleID: Wiz.Update.Login.Settings
Description: This rule detects updates of Wiz login settings.
DisplayName: Wiz Update Login Settings
Runbook: Verify that this change was planned. If not, revert the change and ensure this doesn't happen again.
Reference: https://support.wiz.io/hc/en-us/categories/5311977085340-User-Management
Enabled: true
Filename: wiz_update_login_settings.py
Severity: Medium
Reports:
  MITRE ATT&CK:
    - TA0006:T1556  # Modify Authentication Process
LogTypes:
  - Wiz.Audit
DedupPeriodMinutes: 60
Threshold: 1
Tests:
  - Name: UpdateLoginSettings
    ExpectedResult: true
    Log:
      {
        "id": "f77a8e1e-5674-42d1-9f1e-8a259dc736cd",
        "action": "UpdateLoginSettings",
        "requestId": "417f1751-bcc1-4d38-86aa-eb781790bdd6",
        "status": "SUCCESS",
        "timestamp": "2024-06-16T13:14:22.291227Z",
        "actionParameters": {
          "input": {
            "patch": {
              "approvedUserDomains": [
                "abc.com",
              ]
            }
          },
          "selection": [
            "__typename",
            {
              "loginSettings": [
                "__typename",
                "approvedUserDomains"
              ]
            }
          ]
        },
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
        "sourceIP": "12.34.56.78",
        "serviceAccount": null,
        "user": {
          "id": "<redacted>",
          "name": "user@company.com"
        }
      }
  - Name: CreateUser
    ExpectedResult: false
    Log:
      {
        "id": "220d23be-f07c-4d97-b4a6-87ad04eddb14",
        "action": "CreateUser",
        "requestId": "0d9521b2-c3f8-4a73-bf7c-20257788752e",
        "status": "SUCCESS",
        "timestamp": "2024-07-29T09:40:15.66643Z",
        "actionParameters": {
          "input": {
            "assignedProjectIds": null,
            "email": "testy@company.com",
            "expiresAt": null,
            "name": "Test User",
            "role": "GLOBAL_ADMIN"
          },
          "selection": [
            "__typename",
            {
              "user": [
                "__typename",
                "id"
              ]
            }
          ]
        },
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
        "sourceIP": "8.8.8.8",
        "serviceAccount": null,
        "user": {
          "id": "someuser@company.com",
          "name": "someuser@company.com"
        }
      }
  - Name: UpdateLoginSettings - Fail
    ExpectedResult: false
    Log:
      {
        "id": "f77a8e1e-5674-42d1-9f1e-8a259dc736cd",
        "action": "UpdateLoginSettings",
        "requestId": "417f1751-bcc1-4d38-86aa-eb781790bdd6",
        "status": "FAILED",
        "timestamp": "2024-06-16T13:14:22.291227Z",
        "actionParameters": { },
        "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
        "sourceIP": "12.34.56.78",
        "serviceAccount": null,
        "user": {
          "id": "<redacted>",
          "name": "user@company.com"
        }
      }


# ------ paired body: wiz_update_login_settings.py ------

from panther_wiz_helpers import wiz_actor, wiz_alert_context, wiz_success


def rule(event):
    if not wiz_success(event):
        return False
    return event.get("action", "ACTION_NOT_FOUND") == "UpdateLoginSettings"


def title(event):
    actor = wiz_actor(event)

    return (
        f"[Wiz]: [{event.get('action', 'ACTION_NOT_FOUND')}] action "
        f"performed by {actor.get('type')} [{actor.get('name')}]"
    )


def dedup(event):
    return event.get("id")


def alert_context(event):
    return wiz_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.