๐ก๏ธ AWS EC2 Security Group allows unrestricted NetBIOS traffic๐ข
- Contextual name: ๐ก๏ธ Security Group allows unrestricted NetBIOS traffic๐ข
- ID:
/ce/ca/aws/ec2/security-group-allows-unrestricted-netbios-traffic - Tags:
- ๐ข Policy with categories
- ๐ข Policy with type
- ๐ข Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicโ
- ๐ง prod.logic.yaml๐ข
Similar Policiesโ
- Cloud Conformity: Unrestricted NetBIOS Access
- Internal:
dec-x-6eab9b88
Similar Internal Rulesโ
| Rule | Policies | Flags |
|---|---|---|
| โ๏ธ dec-x-6eab9b88 | 1 |
Descriptionโ
Descriptionโ
It is recommended to evaluate and restrict the configuration of AWS EC2 security groups to prevent unrestricted NetBIOS traffic (TCP: 137, 139, UDP: 137, 138). NetBIOS is often used in legacy systems for file sharing and network management in Windows environments, but exposing these ports publicly can pose significant security risks.
Rationalโ
Restricting NetBIOS traffic in security groups reduces the attack surface of your EC2 instances, enhancing the overall security posture. NetBIOS is known to be vulnerable to exploitation and is rarely required in modern cloud-based applications. Addressing this configuration minimizes the risk of unauthorized access, data exfiltration, and the spread of malicious payloads.
Impactโ
Restrictions could also disrupt legitimate operations for systems relying on NetBIOS for communication. Therefore, should be carefully implemented, ensuring that it does not interfere with necessary business functions.
Auditโ
This policy marks an EC2 Security Group as
INCOMPLIANTif it contains a rule that meets all the following conditions:... see more
Remediationโ
Remediationโ
From Command Lineโ
- Run the following command to remove or modify the unrestricted rule for NetBIOS access:
aws ec2 revoke-security-group-ingress \
--region {{region-name}} \
--group-id {{security-group-id}} \
--protocol {{protocol}} \
--port {{137, 138, or 139}} \
--cidr {{0.0.0.0/0 or ::/0}}
Optionally, run the
authorise-security-group-ingresscommand to create a new rule, specifying a trusted CIDR range instead of0.0.0.0/0.
- Confirm the changes by describing the security group again and ensuring the unrestricted access rule has been removed or appropriately restricted:
aws ec2 describe-security-groups \
--region {{region-name}} \
--group-ids {{security-group-id}} \
--query 'SecurityGroups[*].IpPermissions[?FromPort==`137`].{CIDR:IpRanges[*].CidrIp,Port:FromPort}'
- Confirm that application functionality is unaffected by the updated rules.