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

feat(cloudtrail): add threat detection checks for AWS (enum and priv escalation) #3602

Merged
merged 18 commits into from
Mar 27, 2024

Conversation

MrCloudSec
Copy link
Member

@MrCloudSec MrCloudSec commented Mar 25, 2024

Description

Add 2 Threat Detection checks that only run if category is invoked directly. THESE DONT RUN WITH ALL CHECKS due to performance.

  • aws.cloudtrail_threat_detection_privilege_escalation
  • aws.cloudtrail_threat_detection_enumeration

Runs these check only if --category threat-detection is set.
I.e.:
prowler aws --category threat-detection

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@MrCloudSec MrCloudSec marked this pull request as ready for review March 25, 2024 22:04
@MrCloudSec MrCloudSec requested a review from a team March 25, 2024 22:04
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Mar 25, 2024
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 23.07692% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 86.08%. Comparing base (c03f959) to head (49c090a).

Files Patch % Lines
...ders/aws/services/cloudtrail/cloudtrail_service.py 22.22% 7 Missing ⚠️
prowler/__main__.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           prowler-4.0-dev    #3602      +/-   ##
===================================================
- Coverage            86.09%   86.08%   -0.02%     
===================================================
  Files                  705      705              
  Lines                21851    21862      +11     
===================================================
+ Hits                 18813    18820       +7     
- Misses                3038     3042       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

@toniblyx toniblyx changed the title feat(cloudtrail): add threat detection checks feat(cloudtrail): add threat detection checks for AWS (enum and priv escalation) Mar 27, 2024
Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

# aws.cloudtrail_threat_detection_privilege_escalation
# aws.cloudtrail_threat_detection_enumeration
threat_detection_entropy: 0.7 # 70% of actions found to decide if it is an attack event
threat_detection_minutes: 1
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
threat_detection_minutes: 1
threat_detection_minutes: 1440 # 1 day to search back from now

# AWS CloudTrail Configuration
# aws.cloudtrail_threat_detection_privilege_escalation
threat_detection_privilege_escalation_entropy: 0.7 # Percentage of actions found to decide if it is an privilege_escalation attack event, by default is 0.7 (70%)
threat_detection_privilege_escalation_minutes: 1440 # Past minutes to check for privilege_escalation attacks, by default is 1440 minutes (24 hours)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
threat_detection_privilege_escalation_minutes: 1440 # Past minutes to check for privilege_escalation attacks, by default is 1440 minutes (24 hours)
threat_detection_privilege_escalation_minutes: 1440 # Past minutes to search from now for privilege_escalation attacks, by default is 1440 minutes (24 hours)

]
# aws.cloudtrail_threat_detection_enumeration
threat_detection_enumeration_entropy: 0.7 # Percentage of actions found to decide if it is an enumeration attack event, by default is 0.7 (70%)
threat_detection_enumeration_minutes: 1440 # Past minutes to check for enumeration attacks, by default is 1440 minutes (24 hours)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
threat_detection_enumeration_minutes: 1440 # Past minutes to check for enumeration attacks, by default is 1440 minutes (24 hours)
threat_detection_enumeration_minutes: 1440 # Past minutes to search from now for enumeration attacks, by default is 1440 minutes (24 hours)

Copy link
Contributor

You can check the documentation for this PR here -> SaaS Documentation

@MrCloudSec MrCloudSec merged commit f9522da into prowler-4.0-dev Mar 27, 2024
10 of 12 checks passed
@MrCloudSec MrCloudSec deleted the cloudtrail-threat-detection branch March 27, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants