用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-aws-foundations-5-2命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-aws-foundations-5.2 |
| description | Ensure management console sign-in without MFA is monitored |
| category | cis-monitoring |
| version | 7.0.0 |
| author | cyberstrike-official |
| tags | ["cis","aws","monitoring","cloudwatch","cloudtrail","metric-filters","alarms","mfa","console-signin"] |
| cis_id | 5.2 |
| cis_benchmark | CIS AWS Foundations Benchmark v7.0.0 |
| tech_stack | ["aws"] |
| cwe_ids | [] |
| chains_with | ["cis-aws-foundations-4.1","cis-aws-foundations-4.2"] |
| prerequisites | [] |
| severity_boost | {} |
Real-time monitoring of API calls can be achieved by directing CloudTrail Logs to CloudWatch Logs or an external Security Information and Event Management (SIEM) environment, and establishing corresponding metric filters and alarms.
It is recommended that a metric filter and alarm be established for console logins that are not protected by multi-factor authentication (MFA).
CloudWatch is an AWS native service that allows you to observe and monitor resources and applications. CloudTrail logs can also be sent to an external Security Information and Event Management (SIEM) environment for monitoring and alerting.
Monitoring for single-factor console logins will increase visibility into accounts that are not protected by MFA. These type of accounts are more susceptible to compromise and unauthorized access.
N/A
If you are using CloudTrail trails and CloudWatch, perform the following to ensure that there is at least one active multi-region CloudTrail trail with the prescribed metric filters and alarms configured:
aws cloudtrail describe-trails
Identify multi-region CloudTrail trails: Trails with "IsMultiRegionTrail" set to true
Note the value associated with "Name":<trail-name>
Note the <trail-log-group-name> within the value associated with "CloudWatchLogsLogGroupArn"
arn:aws:logs:<region>:<account-id>:log-group:<trail-log-group-name>:*Ensure the identified multi-region CloudTrail trail is active:
aws cloudtrail get-trail-status --name <trail-name>
Ensure IsLogging is set to TRUE
Ensure the identified multi-region CloudTrail trail captures all management events:
aws cloudtrail get-event-selectors --trail-name <trail-name>
IncludeManagementEvents set to and set to trueReadWriteTypeAll<trail-log-group-name> captured in step 1:aws logs describe-metric-filters --log-group-name <trail-log-group-name>
"filterPattern": "{ ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed != "Yes") }"
Or, to reduce false positives in case Single Sign-On (SSO) is used in the organization:
"filterPattern": "{ ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed != "Yes") && ($.userIdentity.type = "IAMUser") && ($.responseElements.ConsoleLogin = "Success") }"
Note the <no-mfa-console-signin-metric> value associated with the filterPattern from step 3.
Get a list of CloudWatch alarms, and filter on the <no-mfa-console-signin-metric> captured in step 4:
aws cloudwatch describe-alarms --query 'MetricAlarms[?MetricName== <no-mfa-console-signin-metric>]'
Note the AlarmActions value; this will provide the SNS topic ARN value.
Ensure there is at least one active subscriber to the SNS topic:
aws sns list-subscriptions-by-topic --topic-arn <sns-topic-arn>
arn:aws:sns:<region>:<account-id>:<sns-topic-name>:<subscription-id>A metric filter exists with the filter pattern matching console sign-in events without MFA, a CloudWatch alarm is configured for the metric, and the alarm has an active SNS topic with at least one subscriber.
If you are using CloudTrail trails and CloudWatch, perform the following steps to set up the metric filter, alarm, SNS topic, and subscription:
<trail-log-group-name> taken from audit step 1:aws logs put-metric-filter --log-group-name <trail-log-group-name> --filter-name `<no-mfa-console-signin-metric>` --metric-transformations metricName= `<no-mfa-console-signin-metric>`,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed != "Yes") }'
Or, to reduce false positives in case Single Sign-On (SSO) is used in the organization:
aws logs put-metric-filter --log-group-name <trail-log-group-name> --filter-name `<no-mfa-console-signin-metric>` --metric-transformations metricName= `<no-mfa-console-signin-metric>`,metricNamespace='CISBenchmark',metricValue=1 --filter-pattern '{ ($.eventName = "ConsoleLogin") && ($.additionalEventData.MFAUsed != "Yes") && ($.userIdentity.type = "IAMUser") && ($.responseElements.ConsoleLogin = "Success") }'
Note: You can choose your own metricName and metricNamespace strings. Using the same metricNamespace for all Foundations Benchmark metrics will group them together.
aws sns create-topic --name <sns-topic-name>
aws sns subscribe --topic-arn <sns-topic-arn> --protocol <sns-protocol> --notification-endpoint <sns-subscription-endpoints>
aws cloudwatch put-metric-alarm --alarm-name `<no-mfa-console-signin-alarm>` --metric-name `<no-mfa-console-signin-metric>` --statistic Sum --period 300 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold --evaluation-periods 1 --namespace 'CISBenchmark' --alarm-actions <sns-topic-arn>
By default, no CloudWatch metric filters or alarms exist for console sign-ins without MFA.
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 8.5 Collect Detailed Audit Logs | x | x | |
| v8 | 8.11 Conduct Audit Log Reviews | x | x | |
| v7 | 6.3 Enable Detailed Logging | x | x |
Level 1 | Manual