Cleanup risky open ports
Quick Wins
Close administrative ports that are open to everyone
Close on Security groups ingress access to administration ports (22 and 3389) that are not restricted (0.0.0.0/0). Coordinate with IT teams using these ports on alternative methods (see below) to ensure that they can continue operations.
Recommended way to manage instances
We recommend using AWS Systems Manager Fleet Manager that does not require opening any inbound ports, or the use of hardened bastions. Requires an SSM Agent that is preinstalled on many aws managed AMIs and a role (EC2 Instance Profile) with AmazonSSMManagedEC2InstanceDefaultPolicy
If you can’t use SSM Fleet Manager, evaluate using EC2 Instance Connect, or at least restrict the IPs that can access to the administration ports.
Pricing
Security Groups: no additional cost.
AWS Security Hub: https://aws.amazon.com/security-hub/pricing
The service has a 30-day trial period (free trial)
The service has a site to verify current usage and estimate future usage.
AWS Firewall Manager: https://aws.amazon.com/firewall-manager/pricing/
How to Check
- AWS Security Hub security standards: (Recommended - QuickWin) [EC2.13] Security groups should not allow ingress from 0.0.0.0/0 or ::/0 to port 22 [EC2.14] Security groups should not allow ingress from 0.0.0.0/0 or ::/0 to port 3389
- AWS Firewall Manager This service offers more flexibility and additional options (with additional cost).
Risk Mitigation
- Allowing unrestricted ingress access to administration ports (22 and 3389) is a significant risk, as often the hosts are not properly patched and hardened, adversaries could try to leverage a vulnerability to access and take control, or they could achieve access through SSH and RDP BruteForce attacks.
MITRE ATT&CK references
Guidance for Assessments
Framework Mapping
AWS Cloud Adoption Framework (Security Perspective)