RCE Vulnerability In OpenSSH Server

Cyber security, problems often return, but rarely with such severity as seen in CVE-2024-6387, which has been dubbed "OpenSSHion." OpenSSH is a powerful collection of tools for remotely controlling networked computers and transferring data between them. The new vulnerability, assigned CVE-2024-6387, allows for unauthenticated remote code execution (RCE) with root privileges, posing a severe threat to affected systems.

Analysis of the cloud environments has found that 69% of organisations are using OpenSSH, either through a dependency or directly, and of those organisations 70% are using a vulnerable OpenSSH version.

SSH is widely used for accessing Kubernetes nodes and they’re also used sometimes within Kubernetes workloads, therefore this has a huge impact on cloud systems. The problem has been known about since 2005 but has now resurfaced, leaving millions of systems vulnerable to unauthorised control. 

This discovery follows another major vulnerability found in the XZ Utils library just a few months ago, highlighting ongoing security challenges. Although CVE-2024-6387 is a serious flaw, it’s very hard to exploit in practice, and so far, no one has managed to use it to attack remote machines. Even so, it’s crucial to understand the risk and take steps to protect your systems.

An attacker could gain complete control of the affected system by executing arbitrary code with root privileges. This could allow the installation of malware, the creation of backdoors, and the exfiltration or manipulation of data. In addition, gaining root privileges could allow the intruder to disable or bypass critical security systems to maintain a permanent presence.
 
Commenting on this, Thomas Richards, principal consultant at the Synopsys Software Integrity Group, said, "OpenSSH has been the standard for SSH installations for a very long time.  With OpenSSH being used pretty much everywhere, if this vulnerability is not patched, organisations are in danger of having their critical systems compromised.  Organisations need to roll out this patch immediately for any internet-facing systems, including cloud systems.  As an additional layer of security, firewall rules should be enabled only to allow SSH connections from trusted networks... I suspect we’ll see a rise in compromises of embedded and IoT systems, as many consumer models are meant to be disposable and rarely get updates..."

"A vulnerability like this could be used by attackers over a long period of time, as older systems do not get updates or as organisations are slow to patch."  Richards said.

Technical Details

The new vulnerability has been discovered in OpenSSH’s server when a client fails to authenticate within the current time period, which is set to 120 seconds in current versions and 600 seconds in older versions. This problem is not completely new and is part of a previously identified issue reported in 2006. The earlier vulnerability also involved a signal handler race condition in OpenSSH versions prior to 4.4, which could lead to a denial of service or potentially allow remote code execution.

The implications of this vulnerability are particularly severe on glibc-based Linux systems, and creates a option where an attacker can use an arbitrary code as root without needing to authenticate. This is because OpenSSH privileged code operates with full system privileges and lacks sandboxing.

Exploitation

Exploiting the signal handler race condition vulnerability in OpenSSH requires a deep understanding of timing attacks and memory manipulation. The following section explains the steps an attacker would take to exploit this vulnerability, along with an example pseudocode to illustrate the process.

First, the attacker initiates multiple connections to the target OpenSSH server, which causes the server to raise the SIGALRM signal. Exploiting this vulnerability is not straightforward and typically requires around 10,000 attempts on average. Each attempt resets the LoginGraceTime timer, giving the attacker a new window to trigger the vulnerability.

During the exploitation process, the attacker adjusts the timing of their inputs based on feedback from previous attempts. This helps to fine-tune the timing required to successfully interrupt the signal handler at the critical moment. Modern systems have defences like Address Space Layout Randomisation (ASLR) and No-eXecute (NX) to prevent such exploits. 

The attacker leverages predictable memory patterns and advanced timing techniques to bypass these protections. Successful exploitation allows the attacker to overwrite critical memory structures, leading to the execution of arbitrary code. 

Security Teams Are Advised To Take The Following Action

  • Patch management: Apply patches for OpenSSH immediately and ensure continuous update processes.
  • Enhanced access control: Restrict SSH access via network-based controls.
  • Network segmentation and intrusion detection: Segregate networks and deploy monitoring systems to detect exploitation attempts.
  • Temporary mitigation: If the team can’t apply patches right away, configure LoginGraceTime to 0 to prevent exploitation, although this exposes systems to potential denial-of-service.

Marc Manzano, general manager for cybersecurity at SandboxAQ commented "... Any vulnerability allowing remote code execution opens the door to malicious actors that can have catastrophic consequences. Modern cryptography management platforms help companies monitor where this vulnerable version of OpenSSH is present across the IT infrastructure, providing an effective and seamless solution to address this situation in a timely manner."

Armorsec   |   Qualys   |    Picus Seceuirity    |    SC Magazine   |   Wiz.io   |   Orca Security   |   Synopsis   

Image: Ideogram

You Might Also Read: 

Securing Kubernetes Helm: Vulnerabilities & Defensive Strategies:


If you like this website and use the comprehensive 7,000-plus service supplier Directory, you can get unrestricted access, including the exclusive in-depth Directors Report series, by signing up for a Premium Subscription.

  • Individual £5 per month or £50 per year. Sign Up
  • Multi-User, Corporate & Library Accounts Available on Request

Cyber Security Intelligence: Captured Organised & Accessible


 

« AI Has The Power To Transform Healthcare Cyber Security
London Hospitals Were Attacked By Russian Hackers »

CyberSecurity Jobsite
Perimeter 81

Directory of Suppliers

ON-DEMAND WEBINAR: What Is A Next-Generation Firewall (and why does it matter)?

ON-DEMAND WEBINAR: What Is A Next-Generation Firewall (and why does it matter)?

Watch this webinar to hear security experts from Amazon Web Services (AWS) and SANS break down the myths and realities of what an NGFW is, how to use one, and what it can do for your security posture.

Alvacomm

Alvacomm

Alvacomm offers holistic VIP cybersecurity services, providing comprehensive protection against cyber threats. Our solutions include risk assessment, threat detection, incident response.

Practice Labs

Practice Labs

Practice Labs is an IT competency hub, where live-lab environments give access to real equipment for hands-on practice of essential cybersecurity skills.

Resecurity, Inc.

Resecurity, Inc.

Resecurity is a cybersecurity company that delivers a unified platform for endpoint protection, risk management, and cyber threat intelligence.

Perimeter 81 / How to Select the Right ZTNA Solution

Perimeter 81 / How to Select the Right ZTNA Solution

Gartner insights into How to Select the Right ZTNA offering. Download this FREE report for a limited time only.

Paladion

Paladion

Paladion is a provider of managed IT security services.

Junglemap

Junglemap

Junglemap provide nanolearning training courses on ransomware, information security and GDPR.

Rogue Wave Software

Rogue Wave Software

At Rogue Wave, our mission is to simplify your hardest problems, improve software quality and security, and shorten the time it takes to deliver value.

Secret Double Octopus

Secret Double Octopus

Secret Double Octopus offers the world’s only keyless multi-shield authentication technology for users and things.

CMMI Institute

CMMI Institute

CMMI Institute enables organizations to elevate and benchmark performance across a range of critical business capabilities, including product development, data management and cybersecurity.

Cyber Physical Security Research Center (CPSEC)

Cyber Physical Security Research Center (CPSEC)

CPSEC aims to contribute to the security enhancement of industrial infrastructure that creates value across cyber space and physical space.

Cyan Securiy Group

Cyan Securiy Group

Cyan provide best-in-class cyber security solutions for mobile Internet and mobile devices that are extremely effective and highly intuitive in their use.

BoldCloud

BoldCloud

BoldCloud's award winning Cybersecurity Advisory services and Layered Security approach adds new critical layers of protection for your data and your business.

InGuardians

InGuardians

InGuardians is an independent information security consulting firm specializing in penetration testing, threat hunting, and hardware hacking.

NetApp Excellerator

NetApp Excellerator

NetApp Excellerator is NetApp’s global start-up program that aims to fuel innovation by partnering with deep-tech start-ups.

Mjenzi Cloud

Mjenzi Cloud

Mjenzi Cloud is a provider of cloud IaaS solutions including managed backup services, affordable & secure cloud virtual compute/storage/compute services, bare-metal services and cloud security.

White Hawk Software

White Hawk Software

White Hawk provides code tamper-proofing solutions to protect mission critical software applications from malicious and Zero day attacks and reverse engineering at run time.

Sprint Networks

Sprint Networks

Sprint Networks is a trusted compliance and risk program advisor which deliver cost-effective technology to reduce enterprise-wide risk.

Aleo

Aleo

Aleo is building the world's leading developer platform for enabling absolute privacy on blockchains.

VicOne

VicOne

With a vision to secure the vehicles of tomorrow, VicOne delivers a broad portfolio of cybersecurity software and services for the automotive industry.

Kaesim Cybersecurity

Kaesim Cybersecurity

Kaesim are a global team of cybersecurity experts protecting businesses since 2015. We stop bad people damaging your business, your data and your reputation.