Elastic Load Balancer has only HTTPS or SSL listeners
Elastic Load Balancers are assessed for client-facing listener protocols. Only HTTPS or SSL are considered encrypted; any HTTP or TCP listener indicates plaintext between clients and the load balancer.
Risk
Plaintext listeners enable network eavesdropping and content injection, compromising confidentiality and integrity. Attackers on public or untrusted paths can harvest credentials and session tokens or alter traffic via MITM, leading to data exposure and unauthorized access.
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks elb_ssl_listenersRecommendation
Enforce encryption in transit by using only HTTPS/TLS listeners. Redirect HTTP to HTTPS and retire plaintext listeners. Use trusted certificates (e.g., ACM) and modern TLS policies; align with zero trust and defense in depth. If needed, use end-to-end TLS to targets and monitor certificate health.
Remediation
CLI
aws elb delete-load-balancer-listeners --load-balancer-name <lb_name> --load-balancer-ports 80Terraform
# Classic ELB with only encrypted (HTTPS) listener
resource "aws_elb" "<example_resource_name>" {
availability_zones = ["<example_az>"]
listener {
lb_port = 443
lb_protocol = "https" # CRITICAL: enforce encrypted listener
instance_port = 80
instance_protocol = "http"
ssl_certificate_id = "<certificate_arn>" # CRITICAL: required for HTTPS/SSL
}
}NativeIaC
# CloudFormation: Classic ELB with only encrypted (HTTPS) listener
Resources:
<example_resource_name>:
Type: AWS::ElasticLoadBalancing::LoadBalancer
Properties:
AvailabilityZones:
- <example_az>
Listeners:
- Protocol: HTTPS # CRITICAL: enforce encrypted listener
LoadBalancerPort: 443
InstanceProtocol: HTTP
InstancePort: 80
SSLCertificateId: <certificate_arn> # CRITICAL: required for HTTPS terminationOther
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.elb.elb_client import elb_client
class elb_ssl_listeners(Check):
def execute(self):
findings = []
secure_protocols = ["SSL", "HTTPS"]
for lb in elb_client.loadbalancers.values():
report = Check_Report_AWS(metadata=self.metadata(), resource=lb)
report.status = "PASS"
report.status_extended = f"ELB {lb.name} has HTTPS listeners only."
for listener in lb.listeners:
if listener.protocol not in secure_protocols:
report.status = "FAIL"
report.status_extended = (
f"ELB {lb.name} has non-encrypted listeners."
)
findings.append(report)
return findingsReferences
- https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/ELB/elb-listener-security.html
- https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-policy-table.html