Skip to main content

More Info:

ELB should be configured to block HTTP connection and allow only HTTPS connections.

Risk Level

High

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • AWS Startup Security Baseline
  • AWS Well Architected Framework
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • FedRAMP
  • GDPR
  • HIPAA
  • HITRUST CSF
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST
  • NIST CSF
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • PCI
  • Reserve Bank of India (RBI) Cyber Security Framework
  • Reserve Bank of India (RBI) Master Direction – Information Technology Framework
  • SOC2
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration “ELB Should Accept HTTPS Connections Only” in AWS using AWS console, follow these steps:
  1. Open the AWS Management Console and navigate to the EC2 Dashboard.
  2. Click on Load Balancers from the left-hand menu.
  3. Select the load balancer that you want to configure to accept HTTPS connections only.
  4. Click on the Listeners tab.
  5. Click on Edit in the Actions column for the HTTPS listener.
  6. In the Edit Listener dialog box, select HTTPS as the Protocol.
  7. In the SSL Certificate drop-down menu, select the SSL certificate that you want to use for the HTTPS listener.
  8. In the Default Actions section, click on the X icon next to the existing action to remove it.
  9. Click on Add Action and select Forward to from the drop-down menu.
  10. In the Forward to drop-down menu, select the target group that you want to forward traffic to.
  11. Click on Save.
After following these steps, your ELB will be configured to accept HTTPS connections only. Any HTTP traffic will be automatically redirected to HTTPS.

To remediate the ELB accepting only HTTPS connections in AWS using AWS CLI, follow these steps:
  1. Open the AWS CLI on your local machine.
  2. Run the following command to describe the current configuration of the ELB:
Replace <ELB_NAME> with the name of your ELB.
  1. Check if the ELB is currently accepting both HTTP and HTTPS connections. If it is, you need to modify the listener to accept HTTPS connections only.
  2. Run the following command to modify the listener to accept HTTPS connections only:
Replace <ELB_NAME> with the name of your ELB and <SECURITY_GROUP_ID> with the ID of the security group that the ELB should use.
  1. Verify that the ELB is now accepting HTTPS connections only by running the following command:
The output should show that the listener is now configured to accept HTTPS connections only.Note: Make sure to replace <ELB_NAME> and <SECURITY_GROUP_ID> with the appropriate values for your ELB.
To remediate the misconfiguration “ELB Should Accept HTTPS Connections Only” for AWS using python, you can follow the below steps:
  1. Import the necessary libraries:
  1. Create an AWS ELB client:
  1. Get the list of all the load balancers:
  1. Iterate through the list of load balancers and update the listener protocol to HTTPS:
  1. Verify that the listener protocol has been updated to HTTPS:
By following the above steps, the misconfiguration “ELB Should Accept HTTPS Connections Only” can be remediated for AWS using python.

Additional Reading: