π AWS EC2 Security Group allows unrestricted RPC traffic π’
- Contextual name: π Security Group allows unrestricted RPC traffic π’
- ID:
/ce/ca/aws/ec2/security-group-allows-unrestricted-rpc-traffic
- Located in: π AWS EC2
Flagsβ
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
Our Metadataβ
- Policy Type:
COMPLIANCE_POLICY
- Policy Category:
SECURITY
Similar Policiesβ
- Cloud Conformity
- Internal
dec-x-66358b45
Similar Internal Rulesβ
Rule | Policies | Flags |
---|---|---|
βοΈ dec-x-66358b45 | 1 |
Logicβ
- π§ prod.logic.yaml π’
Descriptionβ
Descriptionβ
Restrict inbound RPC traffic in AWS EC2 security groups to enhance network security and prevent unauthorized communication. RPC traffic, typically associated with port 135, facilitates inter-process communication between distributed systems. However, unrestricted access to this port poses significant security risks, including unauthorized access or exploitation of vulnerabilities.
Rationalβ
RPC traffic is commonly exploited by attackers to gain unauthorized access to systems or execute malicious actions remotely. By restricting RPC traffic in security groups, organizations can mitigate risks such as unauthorized data access, lateral movement within networks, and exploitation of protocol vulnerabilities. Unchecked RPC traffic can also facilitate the spread of malware within a network. Limiting access to trusted IP ranges reduces the overall attack surface, thereby strengthening the security of the associated EC2 instances.
Impactβ
Restricting RPC traffic requires evaluating dependent applications to ensure they're functionality is not disrupted.
... see more
Remediationβ
Remediationβ
From Command Lineβ
- Run the following command to remove or modify the unrestricted rule for RPC access:
aws ec2 revoke-security-group-ingress \
--region {{region-name}} \
--group-id {{security-group-id}} \
--protocol {{protocol}} \
--port 135 \
--cidr {{0.0.0.0/0 or ::/0}}
Optionally, run the
authorise-security-group-ingress
command 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==`135`].{CIDR:IpRanges[*].CidrIp,Port:FromPort}'
- Test applications dependent on RPC to ensure they are unaffected by the changes.