Recently, there have been several high-profile data breaches in which credentials were stolen, particularly in the Target and Sony Pictures Entertainment incidents of 2014. Considering that secure shell (SSH) keys are often used to access servers containing a great deal of sensitive data, we need to be extra vigilant with regard to the management of these keys. SSH provides a cryptographically secure access method, but there are specific challenges that must be addressed. SSH keys are a valuable target for cybercriminals because stolen credentials can be used to access critical servers. The following are some interesting facts regarding the issue:
- Per Venafi, 60 percent of enterprises cannot detect new SSH keys introduced into their networks, 46 percent never rotate or change SSH keys despite the fact that SSH keys never expire and 76 percent have no security systems for SSH keys in the cloud.
- The Ponemon Institute reports three out of four enterprises are vulnerable to root-level attacks due to SSH mismanagement.
- Credentials that grant access to a server are often in a key file, as opposed to being in human memory. Therefore, it represents possible stolen credentials.
- SSH keys are never set to expire, so they can present long-lived access into an environment. They may even be used as a backdoor.
- Because SSH keys are shared by teams of system administrators, there is sometimes a lack of individual accountability.
- SSH keys can represent one-to-many or many-to-one access between users and servers. This represents a complex web of access paths that is difficult to verify for a large server estate.
- Because SSH keys can be set up for administrator-level access, a stolen key may occasionally represent the keys to the kingdom.
- Key files can be used by an application for which the ID never expires.
- Servers are often well-protected with layered, in-depth defense principles, but work stations are not. However, it is in the work stations where the private key file resides and where it could be stolen.
From a compliance and audit perspective, IBM has found that SSH key management is a growing auditing problem for many large organizations.
“Nearly all Fortune 500 companies and major government agencies appear to be noncompliant and facing major security issues (existential virus risk, hacking risk and rogue employee risk),” Tatu Ylönen, the creator of SSH, explains on Network World. “Most of the next 10,000 companies (there are about 10,000 companies having over 10,000 employees in the world) are also exposed to the same issues.”
Background on SSH
Let’s take a step back and review the technology. SSH was invented in 1995 in response to weak access control methods, which, at the time, were based on plain text protocols such as the Berkeley remote “R” commands and Telnet. SSH provides a strong method of access wherein asymmetric cryptography is used, and SSH has since been a widely accepted method for gaining access to Linux and UNIX servers. The SSH protocol is used to connect many disparate types of devices, most commonly using Linux or UNIX operating systems. These could be servers, network routers, storage systems or even mainframes.
With SSH, support staff can access servers without passing plain text passwords over the wire, where they could be intercepted by sniffers. It permits access to servers over an untrusted network, the default access method for many cloud infrastructures over the Internet.
SSH also provides functionality using key files that can be used by either a person or application actor. Additionally, these files can be used with or without a passphrase in order to gain access. Those key files can therefore represent a “what you have” credential, as opposed to “what you know.” It is these key files that could become stolen credentials.
The Threat
Verizon’s 2014 Data Breach Investigations Report illustrates stolen credentials as a growing problem. In 2011 and 2012, the use of stolen credentials was the third most prominent attack vector, but in 2013, it became the first. There have also been some high-profile attacks in recent history — for instance, the Sony cyberattack became the most widely publicized and a significant national security matter.
What Should Be Done?
It is important to get in front of the problem. Whether your intended solution is automated or manual, you need to take control. First, make sure you have a security policy that defines acceptable usage. The U.S. government’s National Institute of Standards and Technology has a draft document regarding the management of SSH keys. This is a great place to start. Once a policy is in place, you need a process and/or tooling that performs an inventory of all your SSH keys and discovers them as soon as possible, with real time being the ideal. You also need to compare those SSH keys against your security policy to determine violations. Finally, establish a remediation strategy that corrects issues as quickly as possible — again, real time is ideal.