-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix - IAM User takeover Correlation Rule correlating on IP instead of…
… user (#1362) Co-authored-by: Ariel Ropek <79653153+arielkr256@users.noreply.github.com>
- Loading branch information
1 parent
c435791
commit 91662f6
Showing
3 changed files
with
45 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
def rule(event): | ||
return event.get("eventName") == "ConsoleLogin" | ||
|
||
|
||
def alert_context(event): | ||
context = {} | ||
context["ip_and_username"] = event.get( | ||
"sourceIPAddress", "<MISSING_SOURCE_IP>" | ||
) + event.deep_get("userIdentity", "userName", default="<MISSING_USER_NAME>") | ||
return context |