Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Tenable Blog

Subscribe

Auditing Open Ports with Nessus®

Every major breach starts with a reconnaissance effort, which usually involves a port scan. It’s therefore safe to assume that port scans are the most likely precursor to an attack, and yet results from a port scan are rarely viewed with the same level of urgency as some other high profile vulnerabilities. It’s time to take a different approach and to have a policy-based approach for open ports.

The result from a port scan is just another result buried under a million other results

Port scanning, or rather the technology to scan open ports, has been around for a long time. And although the process to find open ports has evolved and become more sophisticated over time, the basic process to figure out whether a port is really open or not still remains the same. Nessus® covers different aspects of port scanning via TCP, SYN, UDP and netstat through its different port scanning plugins. You can read how these scanners work in-depth in a previous blog. All these plugins bring back information about open ports via different techniques. But if you are like any other security practitioner plugging holes by patching critical vulnerabilities such as Heartbleed or Shellshock, the result from a port scan is just another result buried under a million other results.

If you ask any reconnaissance expert, he or she will tell you that open ports are a dead giveaway. If port 80/443 is not open, hackers will likely not even bother launching web server related attacks. So then why do we keep seeing unnecessary ports open in scan results all the time?

One reason why port scan results do not show up at the top of remediation efforts is because the results almost never carry a flashing red severity. After all, having an open port isn't a vulnerability in itself. But it does open up the possibility for potential misuse in the future, if a new vulnerability is discovered in the service listening on that port at a later point in time. Also, just looking at the result of a port scan result makes it hard to gauge the context around it. For example, you might be surprised to find an odd port 8834 open on a host; but if that host is known to be a Nessus server, it makes complete sense.

One reason why port scan results do not show up at the top of remediation efforts is because the results almost never carry a flashing red severity

Most vendors, including Tenable, will rightly file port scan results under informational items, usually with a blue/green severity. An informational item is just a fact at a given point in time; without context, its value in making a judgment is negligible. It’s therefore easy to ignore such results. But once you add a policy around the same problem, it surely gets everyone's attention.

What if you could define a policy to not allow open ports other than ports 80 and 443 on a web server, or to deny port 23 (Telnet) to be open on any server? And any deviation from this policy would be considered a policy violation. That turns the tables on this issue. Suddenly closing down unused open ports becomes a priority.

The Nessus Unix compliance plugin was recently updated to support this feature across all major Unix/Linux operating systems. The plugin relies on the netstat port scanner for a list of open ports and then flags any open ports that deviate from the pre-defined policy. Support for a similar feature in the Windows compliance plugin is already available.

Example

<custom_item>
type : AUDIT_ALLOWED_OPEN_PORTS
description : "Allowed Open Ports : 22, 80, 443"
port_type : TCP
ports : "22,80,443,808[0-9]"
</custom_item>

<custom_item> type : AUDIT_DENIED_OPEN_PORTS description : "Denied Open Ports : 21, 23" port_type : TCP ports : "21,23" </custom_item>

Now that we have taken care of the open ports policy, let’s assume you leveraged this feature and managed to maintain a very good handle on which ports are allowed to open and which ones are not. But then how do you know the service listening on an allowed port is indeed the service that was authorized? In other words, how can you be sure that the service listening on port 80 is an Apache server and not a nefarious backdoor or a rootkit hiding in plain sight? Well, we have just the solution for that: the Unix compliance plugin was also updated to audit the process running on a given port.

Example

<custom_item>
type : AUDIT_PROCESS_ON_PORT
description : "Only sshd should be running on port 22"
port_type : TCP
ports : "22"
name : "sshd"
</custom_item>

Of course, you can combine this with MD5 checks to make sure that the running process is authorized.

Sample Result

Open Port 1

Open Port 2

Conclusion

Having a good handle on what services are allowed on your network is one of the most prudent things to do to mitigate risks on your network

Having a good handle on what services are allowed on your network is one of the most prudent things to do to mitigate risks on your network. The Unix compliance plugin will help you close the gap between what you think is running and what actually is running. Initial scans with this feature might bring in some surprises. But over time, if you integrate this into your continuous monitoring approach, the risks to your network will be far less than if you don’t take any action against it.

Related Articles

Cybersecurity News You Can Use

Enter your email and never miss timely alerts and security guidance from the experts at Tenable.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Try Tenable Web App Scanning

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable One Exposure Management platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Your Tenable Web App Scanning trial also includes Tenable Vulnerability Management and Tenable Lumin.

Buy Tenable Web App Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try Tenable Lumin

Visualize and explore your exposure management, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Your Tenable Lumin trial also includes Tenable Vulnerability Management and Tenable Web App Scanning.

Buy Tenable Lumin

Contact a Sales Representative to see how Tenable Lumin can help you gain insight across your entire organization and manage cyber risk.

Try Tenable Nessus Professional Free

FREE FOR 7 DAYS

Tenable Nessus is the most comprehensive vulnerability scanner on the market today.

NEW - Tenable Nessus Expert
Now Available

Nessus Expert adds even more features, including external attack surface scanning, and the ability to add domains and scan cloud infrastructure. Click here to Try Nessus Expert.

Fill out the form below to continue with a Nessus Pro Trial.

Buy Tenable Nessus Professional

Tenable Nessus is the most comprehensive vulnerability scanner on the market today. Tenable Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year.

Select Your License

Buy a multi-year license and save.

Add Support and Training

Try Tenable Nessus Expert Free

FREE FOR 7 DAYS

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Already have Tenable Nessus Professional?
Upgrade to Nessus Expert free for 7 days.

Buy Tenable Nessus Expert

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Select Your License

Buy a multi-year license and save more.

Add Support and Training