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

Tenable Blog

Subscribe

Auditing Secure Shell - Part I

This blog entry outlines a wide variety of audits and monitoring techniques that can be used to keep watch over the Secure Shell applications in use on your network. Examples for auditing SSH client and server configurations, vulnerabilities and logs will be discussed using Nessus, the Passive Vulnerability Scanner, the Security Center and the Log Correlation Engine.

This will be a three part blog entry where we will consider discovering the SSH applications, auditing their configurations and then monitoring their logs and network activity. This is part 1 of 3.

Discovering SSH Servers with Nessus Network Scans

Before any type of audit can be accomplished, an accurate inventory of all Secure Shell (SSH) servers should be preformed.

The Nessus vulnerability scanner can find SSH daemons running on many types of operating systems. When it finds an SSH daemon running, it will report several things.

Plugin #10881 "SSH protocol versions supported" will list the specific version of the Secure Shell protocol supported by the daemon with a report similar to the following:

The remote SSH daemon supports the following versions of the
SSH protocol :
. 1.33
. 1.5
. 1.99
. 2.0
SSHv1 host key fingerprint : c2:3f:77:2a:72:10:7d:7d:2a:49:8f:21:a4:d2:20:27
SSHv2 host key fingerprint : 1d:31:f3:6a:5b:c9:86:fa:93:ee:9c:d3:c9:c5:d2:10

This output also includes the SSH host key fingerprints of the daemon being scanned.

Plugin #10267 also identifies the detected SSH daemon and logs the specific SSH banner in use. It also audits which type of authentication methods are available as shown below:

SSH version : SSH-1.99-OpenSSH_3.6.1p2
SSH supported authentication : publickey,password,keyboard-interactive

Nessus will also attempt to enumerate any SSH daemon vulnerabilities that can be discovered through network analysis. There are many vulnerabilities associated with Secure Shell. At the time of writing this blog, searching for Nessus plugins that had the string "SSH" in them returned more than 100 unique plugins.

And lastly, Nessus will attempt to discover SSH servers regardless of which port they are on. Typically, SSH servers listen on port 22, but if a Nessus port scan or services probe is performed against non-standard ports, the SSH daemon will still be discovered. It has become common practice for administrators and/or hackers, to run an SSH daemon on a port other than 22 to "hide". Tenable has also encountered customers who have configured port forwarding firewalls such that connecting to a high port on the outside results in a network connection to port 22 on the inside to a certain server.

Using Credentialed Nessus Scans to Discover SSH Applications

If a credentialed patch audit of a host is also accomplished, Nessus will perform a patch audit of not only the SSH daemons, but any missing patches for SSH clients. There have been many client-side related vulnerabilities in SSH clients.

And lastly, if your credentialed scan occurs on Linux, the "Remote listeners enumeration" check, plugin #25221, will list all open ports and the name of the process which opened the network connection. This is another way to find SSH servers that may have been running on a a port other than 22, or were perhaps blocked by a firewall or ACL rule. 

Passive network monitoring with the PVS

The Passive Vulnerability Scanner can also observer Secure Shell connections. It accurately enumerates all SSH daemons and clients it observes in the network traffic. Here is an example listing of detected SSH applications and security issues from the "SSH (PVS)" plugin family as viewed under the Security Center:

Sshpvs

Since the PVS sniffs network traffic it can see all ports. This makes it ideal to find SSH daemons running on ports other than 22. This also makes it ideal to identify security issues with SSH clients. In the above screen shot, there was a detect of a vulnerable "WinSCP" client. This detect was accomplished without any client side credentials of the Windows host running the WinSCP client.

Detecting Change

Once a baseline of known SSH servers and clients has been determined, it must be updated. There are two main ways to accomplish this - repeated Nessus scans and continuous PVS network monitoring.

For repeated Nessus network scans to look for new SSH servers, the Security Center can be used to schedule scans which discover new hosts, discover new SSH servers and also identify new SSH vulnerabilities. The Security Center can be set up to schedule these scans on a needed basis, and email and "new" results to asset system owners.

The PVS can also be used to find new SSH systems. Since the PVS is real-time, it can syslog any new type of SSH issue. The Security Center can be used to alert asset owners when new SSH servers are detected, or if new vulnerabilities have been discovered.

If more generic Nessus scans and PVS monitoring are ongoing, the Security Center can also manually be used to show "what is new". There is a filter in the Cumulative Vulnerability Database view which can specify a discovery filter. This parameter accepts a count of days such that all SSH vulnerabilities or audits discovered in the past 5 days could be displayed and analyzed.

For More Information

Part II of this post will consider auditing the configuration of SSH daemons and clients on UNIX systems. Part III will consider how netflow, firewall logs and other types of traffic can be used to audit SSH usage and abuse such as "leap frog" attacks.

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