More Info:
No security group should allow unrestricted inbound access to TCP port 135 (RPC).Risk Level
MediumAddress
SecurityCompliance 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
- 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 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
Remediation
Using Console
Using Console
To remediate the issue of unrestricted RPC access in AWS, you can follow these steps:
- Open the AWS Management Console and go to the EC2 dashboard.
- Click on the “Security Groups” option in the left-hand menu.
- Select the security group that is allowing unrestricted RPC access.
- Click on the “Inbound Rules” tab and locate the rule that allows RPC access.
- Click on the “Edit” button next to the rule.
- Change the source IP address to a specific IP address or range of IP addresses that require access to RPC.
- If necessary, add a new rule to allow access to RPC from specific IP addresses or ranges.
- Click on the “Save” button to apply the changes.
Using CLI
Using CLI
To remediate the “Unrestricted RPC Access Should Not Be Allowed” misconfiguration in AWS using AWS CLI, follow these steps:
- Open the AWS CLI on your local machine.
-
Run the following command to list the security groups in your AWS account:
- Identify the security group that has the unrestricted RPC access.
-
Run the following command to modify the security group and remove the unrestricted RPC access:
Note: Replace
<security-group-id>with the ID of the security group that has the unrestricted RPC access. -
Run the following command to verify that the unrestricted RPC access has been removed:
Note: Replace
<security-group-id>with the ID of the security group that has the unrestricted RPC access. - Verify that the remediation was successful by confirming that the security group no longer has unrestricted RPC access.
Using Python
Using Python
To remediate the “Unrestricted RPC Access Should Not Be Allowed” issue in AWS using Python, follow the below steps:In the above code, replace ‘SECURITY_GROUP_ID’ with the ID of the security group that allows unrestricted RPC access.
- First, we need to identify the security group that allows unrestricted RPC access. You can use the following Python code to list all the security groups in your AWS account:
- Once you have identified the security group that allows unrestricted RPC access, you can use the following Python code to revoke the rule:
- The above code will revoke the rule that allows unrestricted RPC access. You can run the first code again to verify that the rule has been revoked.
Using Terraform
Using Terraform
terraform plan should show the offending ingress rule resources being destroyed (- aws_vpc_security_group_ingress_rule.UNRESTRICTED_RPC_IPV4 / UNRESTRICTED_RPC_IPV6) or the corresponding inline ingress blocks being removed from the security group.
