Checks/Aws/Test-Ec2SecuritygroupAllowIngressFromInternetToHighRiskTcpPorts.ps1
|
function Test-Ec2SecuritygroupAllowIngressFromInternetToHighRiskTcpPorts { <# .SYNOPSIS Security group does not allow ingress from 0.0.0.0/0 or ::/0 to high-risk TCP ports .DESCRIPTION **EC2 security groups** are assessed for inbound rules that allow Internet sources (`0.0.0.0/0` or `::/0`) to **high-risk TCP ports**: `25, 110, 135, 143, 445, 3000, 4333, 5000, 5500, 8080, 8088`. Findings highlight groups exposing any of these ports to the public network. .PARAMETER Check CIEMCheck object containing check metadata. #> [CmdletBinding()] [OutputType([PSCustomObject[]])] param( [Parameter(Mandatory)] [CIEMCheck]$Check ) $ErrorActionPreference = 'Stop' # TODO: Implement check logic based on Prowler check: ec2_securitygroup_allow_ingress_from_internet_to_high_risk_tcp_ports [CIEMScanResult]::Create($Check, 'MANUAL', 'This check requires manual implementation. See Prowler check ec2_securitygroup_allow_ingress_from_internet_to_high_risk_tcp_ports for reference.', 'N/A', 'ec2 Resources') } |