-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ebpf-rootkit-installed
- Loading branch information
Showing
27 changed files
with
150 additions
and
53 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
hunting/aws/docs/iam_unusual_default_aviatrix_role_activity.md
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# IAM Unusual Default Aviatrix Role Activity | ||
|
||
--- | ||
|
||
## Metadata | ||
|
||
- **Author:** Elastic | ||
- **Description:** This hunting query identifies unusual activity related to the default Aviatrix role in AWS CloudTrail logs. The Aviatrix role is a default role created by the Aviatrix Controller to manage AWS resources. Unusual activity may indicate unauthorized access or misuse of the Aviatrix role, potentially leading to data exfiltration, privilege escalation, or other security incidents. | ||
|
||
- **UUID:** `9fe48b6e-d83a-11ef-84a6-f661ea17fbcd` | ||
- **Integration:** [aws.cloudtrail](https://docs.elastic.co/integrations/aws/cloudtrail) | ||
- **Language:** `[ES|QL]` | ||
- **Source File:** [IAM Unusual Default Aviatrix Role Activity](../queries/iam_unusual_default_aviatrix_role_activity.toml) | ||
|
||
## Query | ||
|
||
```sql | ||
from logs-aws.cloudtrail-* | ||
| where @timestamp > now() - 14 day | ||
| where event.dataset == "aws.cloudtrail" | ||
and aws.cloudtrail.user_identity.type == "AssumedRole" | ||
and aws.cloudtrail.user_identity.arn like "*aviatrix-role*" | ||
| stats activity_counts = count(*) by event.provider, event.action, aws.cloudtrail.user_identity.arn | ||
| where activity_counts < 10 | ||
| sort by activity_counts asc | ||
``` | ||
|
||
## Notes | ||
|
||
- Review the `aws.cloudtrail.user_identity.arn` field to identify the Aviatrix role. | ||
- Review the `aws.cloudtrail.resources.arn` field to identify the EC2 instance associated with the activity. | ||
- Review security group and network ACL configurations for the EC2 instance to ensure they are not overly permissive or allow unauthorized access. | ||
- Using the EC2 instance, pivot into VPC Flow Logs to identify network traffic patterns and potential lateral movement. | ||
- Review if the controller was recently deployed or updated, as this may explain unusual activity related to the Aviatrix role. | ||
- If available, review endpoint logs for the Aviatrix Controller to identify any aviatrix processes that have made unusual requests or system calls. | ||
|
||
## MITRE ATT&CK Techniques | ||
|
||
- [T1078.004](https://attack.mitre.org/techniques/T1078/004) | ||
|
||
## License | ||
|
||
- `Elastic License v2` |
29 changes: 29 additions & 0 deletions
29
hunting/aws/queries/iam_unusual_default_aviatrix_role_activity.toml
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[hunt] | ||
author = "Elastic" | ||
description = """ | ||
This hunting query identifies unusual activity related to the default Aviatrix role in AWS CloudTrail logs. The Aviatrix role is a default role created by the Aviatrix Controller to manage AWS resources. Unusual activity may indicate unauthorized access or misuse of the Aviatrix role, potentially leading to data exfiltration, privilege escalation, or other security incidents. | ||
""" | ||
integration = ["aws.cloudtrail"] | ||
uuid = "9fe48b6e-d83a-11ef-84a6-f661ea17fbcd" | ||
name = "IAM Unusual Default Aviatrix Role Activity" | ||
language = ["ES|QL"] | ||
license = "Elastic License v2" | ||
notes = [ | ||
"Review the `aws.cloudtrail.user_identity.arn` field to identify the Aviatrix role.", | ||
"Review the `aws.cloudtrail.resources.arn` field to identify the EC2 instance associated with the activity.", | ||
"Review security group and network ACL configurations for the EC2 instance to ensure they are not overly permissive or allow unauthorized access.", | ||
"Using the EC2 instance, pivot into VPC Flow Logs to identify network traffic patterns and potential lateral movement.", | ||
"Review if the controller was recently deployed or updated, as this may explain unusual activity related to the Aviatrix role.", | ||
"If available, review endpoint logs for the Aviatrix Controller to identify any aviatrix processes that have made unusual requests or system calls.", | ||
] | ||
mitre = ['T1078.004'] | ||
query = [''' | ||
from logs-aws.cloudtrail-* | ||
| where @timestamp > now() - 14 day | ||
| where event.dataset == "aws.cloudtrail" | ||
and aws.cloudtrail.user_identity.type == "AssumedRole" | ||
and aws.cloudtrail.user_identity.arn like "*aviatrix-role*" | ||
| stats activity_counts = count(*) by event.provider, event.action, aws.cloudtrail.user_identity.arn | ||
| where activity_counts < 10 | ||
| sort by activity_counts asc | ||
'''] |
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
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
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
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
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
Oops, something went wrong.