Network Security Group

Open SMTP

Risk Level: High

Description: 

This plugin checks if SMTP's TCP port 25 is exposed to the public. While some ports, such as HTTP and HTTPS, must be exposed to the public in order to function, other sensitive services, like SMTP, should be limited to recognized IP addresses. The Simple Mail Transfer Protocol (SMTP) is an internet communication protocol for sending and receiving electronic mail. SMTP is used to transmit and receive mail messages by mail servers and other message transfer agents.

PingSafe strongly recommends restricting TCP port 25 to known IP addresses.

About the Service :

In an Azure virtual network, a network security group may be used to restrict network traffic to and from Azure resources. A network security group is a collection of security rules that allow or disallow incoming and outgoing network traffic to and from various Azure services. Source and destination, port, and protocol can all be specified for each rule.

Impact : 

If the ports are unrestricted, they can make the account vulnerable to attacks. This could lead to the accessibility of sensitive data to the people it’s not meant to be accessible by. If we do not restrict TCP port 25  to known IP addresses the best security practices will not be followed and attacks can be invoked.

Steps to reproduce :

  1. Sign in to your Azure portal with your Azure account.
    https://portal.azure.com/#home 
  2. Navigate to Azure’s Network Security Groups.
  3. Click on the Security Group that you want to examine. Next, click on the inbound security rules.
  4. Check whether TCP port 25 is showing Allow for all Source and Destination. If it shows Allow that means it is exposed to the public.
  5. Follow the same steps for other security groups as well.

To check if TCP port 25 is accessible to the general public or not we examined the port Inbound Security Rules.

Steps for remediation :

  1. Sign in to your Azure portal with your Azure account.
    https://portal.azure.com/#home 
  2. Navigate to Azure’s Network Security Groups.
  3. Click on the Security Group that you want to examine. Next, click on the inbound security rules.
  4. Check whether TCP port 25 is showing Allow for all Source and Destination. If it shows Allow that means it is exposed to the public.
  5. Next, click on the security group rule and change the source port and click Save.
  6. Now the TCP port 25 is not accessible by the public.
  7. Follow the same steps for other security groups as well.

References :