🛡️ 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 Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logic
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.