Detection rules › Panther

Slack App Removed

Severity
medium
Log types
Slack.AuditLogs
Tags
Slack, Impact, Service Stop, Defense Evasion, Indicator Removal, Clear Persistence
Reference
https://slack.com/intl/en-gb/help/articles/360003125231-Remove-apps-and-customised-integrations-from-your-workspace
Source
github.com/panther-labs/panther-analysis

Detects when a Slack App has been removed

MITRE ATT&CK coverage

Rule body yaml

AnalysisType: rule
Filename: slack_app_removed.py
RuleID: "Slack.AuditLogs.AppRemoved"
DisplayName: "Slack App Removed"
Enabled: true
LogTypes:
  - Slack.AuditLogs
Tags:
  - Slack
  - Impact
  - Service Stop
  - Defense Evasion
  - Indicator Removal
  - Clear Persistence
Reports:
  MITRE ATT&CK:
    - TA0040:T1489
    - TA0005:T1070.009
Severity: Medium
Description: Detects when a Slack App has been removed
Reference: https://slack.com/intl/en-gb/help/articles/360003125231-Remove-apps-and-customised-integrations-from-your-workspace
DedupPeriodMinutes: 60
Threshold: 1
SummaryAttributes:
  - p_any_ip_addresses
  - p_any_emails
Tests:
  - Name: App Restricted
    ExpectedResult: true
    Log:
      {
        "action": "app_restricted",
        "actor":
          {
            "type": "user",
            "user":
              {
                "email": "user@example.com",
                "id": "W012J3FEWAU",
                "name": "primary-owner",
                "team": "E012MH3HS94",
              },
          },
        "context":
          {
            "ip_address": "1.2.3.4",
            "location":
              {
                "domain": "test-panther-1",
                "id": "T01770N79GB",
                "name": "test-workspace-1",
                "type": "workspace",
              },
            "ua": "Go-http-client/2.0",
          },
        "date_create": "2021-06-08 22:16:15",
        "details":
          { "app_owner_id": "W012J3AEWAU", "is_internal_integration": true },
        "entity":
          {
            "app":
              {
                "id": "A012F34BFEF",
                "is_directory_approved": false,
                "is_distributed": false,
                "name": "app-name",
                "scopes": ["admin"],
              },
            "type": "app",
          },
      }
  - Name: App Uninstalled
    ExpectedResult: true
    Log:
      {
        "action": "app_uninstalled",
        "actor":
          {
            "type": "user",
            "user":
              {
                "email": "user@example.com",
                "id": "W012J3FEWAU",
                "name": "primary-owner",
                "team": "E012MH3HS94",
              },
          },
        "context":
          {
            "ip_address": "1.2.3.4",
            "location":
              {
                "domain": "test-panther-1",
                "id": "T01770N79GB",
                "name": "test-workspace-1",
                "type": "workspace",
              },
            "ua": "Go-http-client/2.0",
          },
        "date_create": "2021-06-08 22:16:15",
        "details":
          { "app_owner_id": "W012J3AEWAU", "is_internal_integration": true },
        "entity":
          {
            "app":
              {
                "id": "A012F34BFEF",
                "is_directory_approved": false,
                "is_distributed": false,
                "name": "app-name",
                "scopes": ["admin"],
              },
            "type": "app",
          },
      }
  - Name: App removed from workspace
    ExpectedResult: true
    Log:
      {
        "action": "org_app_workspace_removed",
        "actor":
          {
            "type": "user",
            "user":
              {
                "email": "user@example.com",
                "id": "W012J3FEWAU",
                "name": "primary-owner",
                "team": "E012MH3HS94",
              },
          },
        "context":
          {
            "ip_address": "1.2.3.4",
            "location":
              {
                "domain": "test-panther-1",
                "id": "T01770N79GB",
                "name": "test-workspace-1",
                "type": "workspace",
              },
            "ua": "Go-http-client/2.0",
          },
        "date_create": "2021-06-08 22:16:15",
        "details":
          { "app_owner_id": "W012J3AEWAU", "is_internal_integration": true },
        "entity":
          {
            "app":
              {
                "id": "A012F34BFEF",
                "is_directory_approved": false,
                "is_distributed": false,
                "name": "app-name",
                "scopes": ["admin"],
              },
            "type": "app",
          },
      }
  - Name: User Logout
    ExpectedResult: false
    Log:
      {
        "action": "user_logout",
        "actor":
          {
            "type": "user",
            "user":
              {
                "email": "user@example.com",
                "id": "W012J3FEWAU",
                "name": "primary-owner",
                "team": "T01234N56GB",
              },
          },
        "context":
          {
            "ip_address": "1.2.3.4",
            "location":
              {
                "domain": "test-workspace-1",
                "id": "T01234N56GB",
                "name": "test-workspace-1",
                "type": "workspace",
              },
            "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
          },
        "date_create": "2022-07-28 15:22:32",
        "entity":
          {
            "type": "user",
            "user":
              {
                "email": "user@example.com",
                "id": "W012J3FEWAU",
                "name": "primary-owner",
                "team": "T01234N56GB",
              },
          },
        "id": "72cac009-9eb3-4dde-bac6-ee49a32a1789",
      }

Detection logic

Condition

action in ["app_restricted", "app_uninstalled", "org_app_workspace_removed"]

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
actionin
  • app_restricted
  • app_uninstalled
  • org_app_workspace_removed

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
actor-nameactor.user.name
actor-emailactor.user.email
actor-ipcontext.ip_address
user-agentcontext.ua
nameentity.app.name