Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Azure EntraID rules #1463

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

Conversation

joongi92
Copy link

@joongi92 joongi92 commented Jan 9, 2025

Background

Adding Azure EntraID rules

Changes

  • 4 new rules
  • Invite External User
  • MFA Disabled
  • Policy Changed
  • Role Changed in PIM
  • Global Helpers
  • Azure Rule Context - (AWS rule context clone)
  • get target name - (getting the displayName of the person affected by action)
  • azure success - (finding if the action was successful)

Testing

pat test
pat check-packs

@joongi92 joongi92 requested a review from a team as a code owner January 9, 2025 18:37
@joongi92 joongi92 changed the base branch from main to develop January 9, 2025 18:38
Copy link
Contributor

@arielkr256 arielkr256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks great! Left a few comments and suggestions.

@@ -0,0 +1,5 @@
AnalysisType: global
Filename: panther_azure_helpers.py
GlobalID: "panther_azure_helpers"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put these in the existing panther_msft_helpers instead of creating a new helper module.



def rule(event):
result = event.deep_get("properties", "result", default="")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use your new azure_success helper!

"properties", "initiatedBy", "user", "userPrincipalName", default=""
)
target_name = get_target_name(event)
role = deep_walk(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use event.deep_walk(...


def rule(event):
operation = event.get("operationName", default="")
if not azure_success or not operation.endswith(POLICY_OPERATION):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be azure_success(event)?


def rule(event):
operation = event.get("operationName", default="")
if azure_success and "Add member to role in PIM completed" in operation:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

azure_success(event)?

@arielkr256 arielkr256 added the rules Real-time log data detections label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rules Real-time log data detections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants