More Info:
Ensure that no network security groups allow unrestricted inbound access on TCP port 23.Risk Level
HighAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- 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
Sure, here are the step-by-step instructions to remediate “Unrestricted Telnet Access” misconfiguration in Azure using Azure console:
- Open the Azure portal and log in to your account.
- Navigate to the “Security Center” from the left-hand side menu.
- Click on the “Security Center” blade and then click on “Security Alerts” from the left-hand side menu.
- Search for the alert related to “Unrestricted Telnet Access”.
- Click on the alert to get more details about the misconfiguration.
- Click on “Remediate” button to start the remediation process.
- In the remediation window, select the “Apply to subscription” option.
- Click on “Remediate” again to start the remediation process.
Using CLI
Using CLI
To remediate the misconfiguration of unrestricted Telnet access in Azure using Azure CLI, follow these steps:
-
Open Azure CLI and login to your Azure account using the following command:
-
Once you are logged in, set the correct subscription using the following command:
-
Next, find the network security group (NSG) that is associated with the virtual machine (VM) that has unrestricted Telnet access. You can do this by running the following command:
This command will list all the NSGs that have a default security rule allowing traffic on port 23 (Telnet).
-
Once you have identified the NSG, you can update the default security rule to deny Telnet traffic using the following command:
This command will update the default security rule in the NSG to deny Telnet traffic on port 23.
-
Finally, verify that the default security rule has been updated by running the following command:
This command will show the details of the NSG, including the updated default security rule.
Using Python
Using Python
To remediate Unrestricted Telnet Access in Azure using Python, you can follow these steps:This will remove the inbound rule for telnet in the specified network security group, thus remediating the Unrestricted Telnet Access issue.
- Install the Azure SDK for Python using the following command:
- Use the following Python script to remediate the issue:
- Replace the placeholders in the script with your Azure credentials, resource group name, and network security group name.
- Run the script using the following command:
Using Terraform
Using Terraform
azurerm_network_security_rule that allows Tcp on port 23 from * or 0.0.0.0/0, remove or update that rule so it no longer permits unrestricted inbound Telnet.This change does not force replacement of the NSG, but it will immediately block new inbound Telnet connections once applied.Verification: terraform plan should show the existing allow rule on port 23 being removed or changed, and/or this new deny_telnet_from_internet rule being added.
