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.

More from Endpoint

The Needs of a Modernized SOC for Hybrid Cloud

5 min read - Cybersecurity has made a lot of progress over the last ten years. Improved standards (e.g., MITRE), threat intelligence, processes and technology have significantly helped improve visibility, automate information gathering (SOAR) and many manual tasks. Additionally, new analytics (UEBA/SIEM) and endpoint (EDR) technologies can detect and often stop entire classes of threats. Now we are seeing the emergence of technologies such as attack surface management (ASM), which are starting to help organisations get more proactive and focus their efforts for maximum…

5 min read

X-Force Identifies Vulnerability in IoT Platform

4 min read - The last decade has seen an explosion of IoT devices across a multitude of industries. With that rise has come the need for centralized systems to perform data collection and device management, commonly called IoT Platforms. One such platform, ThingsBoard, was the recent subject of research by IBM Security X-Force. While there has been a lot of discussion around the security of IoT devices themselves, there is far less conversation around the security of the platforms these devices connect with.…

4 min read

X-Force Prevents Zero Day from Going Anywhere

8 min read - This blog was made possible through contributions from Fred Chidsey and Joseph Lozowski. The 2023 X-Force Threat Intelligence Index shows that vulnerability discovery has rapidly increased year-over-year and according to X-Force’s cumulative vulnerability and exploit database, only 3% of vulnerabilities are associated with a zero day. X-Force often observes zero-day exploitation on Internet-facing systems as a vector for initial access however, X-Force has also observed zero-day attacks leveraged by attackers to accomplish their goals and objectives after initial access was…

8 min read

Patch Tuesday -> Exploit Wednesday: Pwning Windows Ancillary Function Driver for WinSock (afd.sys) in 24 Hours

12 min read - ‘Patch Tuesday, Exploit Wednesday’ is an old hacker adage that refers to the weaponization of vulnerabilities the day after monthly security patches become publicly available. As security improves and exploit mitigations become more sophisticated, the amount of research and development required to craft a weaponized exploit has increased. This is especially relevant for memory corruption vulnerabilities.Figure 1 — Exploitation timelineHowever, with the addition of new features (and memory-unsafe C code) in the Windows 11 kernel, ripe new attack surfaces can…

12 min read