用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-aws-storage-2-2命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-aws-storage-2.2 |
| description | Ensure configuring Security Groups |
| category | cis-storage-services |
| version | 1.0.0 |
| author | cyberstrike-official |
| tags | ["cis","aws","storage","ebs","ec2","security-group","firewall","network-security"] |
| cis_id | 2.2 |
| cis_benchmark | CIS AWS Storage Services Benchmark v1.0.0 |
| tech_stack | ["aws"] |
| cwe_ids | ["CWE-284","CWE-923"] |
| chains_with | ["cis-aws-storage-2.1","cis-aws-storage-2.3"] |
| prerequisites | ["cis-aws-storage-2.1"] |
| severity_boost | {} |
Security groups are your first line of defense for the EC2 instance. A security group is a firewall that controls inbound and outbound traffic.
Security groups play a critical role in maintaining the security of your AWS resources. It is advisable to restrict traffic to only what is necessary for accessing your instance, thereby minimizing potential security risks.
Properly configured security groups:
Improperly configured security groups can lead to:
Open traffic for SSH, HTTP, and HTTPS. Make sure to allow traffic from anywhere, unless you will be accessing the instance from a secure workstation or server with a static IP address.
# List all security groups
aws ec2 describe-security-groups \
--query 'SecurityGroups[].[GroupId,GroupName,VpcId]' \
--output table
# Find security groups with SSH (22) open to the world
aws ec2 describe-security-groups \
--filters Name=ip-permission.from-port,Values=22 \
--query 'SecurityGroups[?IpPermissions[?IpRanges[?CidrIp==`0.0.0.0/0`]]].[GroupId,GroupName]' \
--output table
# Find security groups with RDP (3389) open to the world
aws ec2 describe-security-groups \
--filters Name=ip-permission.from-port,Values=3389 \
--query 'SecurityGroups[?IpPermissions[?IpRanges[?CidrIp==`0.0.0.0/0`]]].[GroupId,GroupName]' \
--output table
# Get detailed security group rules
aws ec2 describe-security-groups \
--group-ids sg-xxxxxxxxx
Navigate to Security Groups
Review and Modify Inbound Rules
Configure Appropriate Rules
# Revoke overly permissive SSH rule
aws ec2 revoke-security-group-ingress \
--group-id sg-xxxxxxxxx \
--protocol tcp \
--port 22 \
--cidr 0.0.0.0/0
# Add restricted SSH rule (example: allow from corporate IP)
aws ec2 authorize-security-group-ingress \
--group-id sg-xxxxxxxxx \
--protocol tcp \
--port 22 \
--cidr 203.0.113.0/24
Default security groups deny all inbound traffic and allow all outbound traffic. Custom security groups created by users may have different configurations.
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 12.3 Securely Manage Network Infrastructure | ● | ● | ● |
| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running | ● | ● |
CIS Control v8 - 12.3 Securely Manage Network Infrastructure: Securely manage network infrastructure. Implementations include version-controlled-infrastructure-as-code, and the use of secure network protocols, such as SSH and HTTPS.
CIS Control v7 - 9.2 Ensure Only Approved Ports, Protocols and Services Are Running: Ensure that only network ports, protocols, and services listening on a system with validated business needs, are running on each system.