ZeroHour
Security Affairspublished ()ingested @securityaffairs

Kinsing threat actors probed the Looney Tunables flaws

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2017-9841
Unauthenticated Remote Code Execution in PHPUnit eval-stdin.php

PHPUnit ships a utility script (eval-stdin.php under /vendor/phpunit/phpunit/src/Util/PHP/) that reads HTTP POST data and evaluates it as PHP code with no authentication. The flaw is triggered when a site's /vendor folder is web-accessible and an attacker sends a POST request whose body begins with '<?php ' directly to that URI. Doing so lets the attacker execute arbitrary PHP code on the server under the web server account, giving unauthenticated remote code execution (CWE-94 code injection). Anyone running a PHP application installed with Composer, where PHPUnit is present in the vendor tree and that directory is reachable over HTTP, is affected. The flaw is under active exploitation: CISA added it to the Known Exploited Vulnerabilities catalog on 2022-02-15 and its EPSS probability of exploitation is 100% (top percentile).

Do: Apply the CISA KEV required action by updating PHPUnit per vendor instructions, which in practice means updating the CMS/framework or running a Composer update that pulls a patched PHPUnit release. Until patched, block web access to the /vendor directory (e.g., deny /vendor/ or at least /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php in your web server configuration) and verify the endpoint is no longer reachable. Check access logs for POST requests to eval-stdin.php and investigate affected servers for webshells or other signs of compromise.

9.8100% KEV
  • PHPUnit
masshundreds of thousands of PHP sites/servers potentially exposed (order-of-magnitude estimate; unknown precise count)
CVE-2023-4911
Buffer Overflow in GNU C Library ld.so Grants Root via SUID Binaries

CVE-2023-4911 ('Looney Tunables') is a buffer overflow in the GNU C Library's dynamic loader (ld.so) that occurs while processing the GLIBC_TUNABLES environment variable. A local attacker triggers it by launching a set-user-ID (SUID) binary with a maliciously crafted GLIBC_TUNABLES value, corrupting memory in the privileged process. This allows the attacker to execute code with elevated (root) privileges on the host. Any system running an affected glibc is potentially exposed, including major Linux distributions (Fedora, Red Hat, Canonical, Debian), Red Hat CodeReady Linux Builder channels, NetApp products, and Siemens SIMATIC S7-1500 firmware, although exploitation requires local execution capability or a foothold on the machine. Exploitation is confirmed in the wild: Qualys published a working proof-of-concept, the flaw was added to CISA's Known Exploited Vulnerabilities catalog on 2023-11-21, and Kinsing threat actors have used it for cryptojacking and to breach cloud environments.

Do: Install patched glibc updates from your distribution vendor (Fedora, Red Hat, Canonical/Ubuntu, Debian) and apply Siemens firmware updates for affected SIMATIC S7-1500 MFP devices; NetApp customers should follow NetApp's remediation guidance. Until patched, audit SUID/SGID binaries (which the attacker needs as the escalation trigger) and limit untrusted local access and shell access on multi-user or cloud-hosted Linux systems. Per the CISA KEV required action, apply vendor mitigations or discontinue use, prioritizing internet-facing hosts given active Kinsing cryptojacking and cloud-breach activity.

7.881% KEV PoC ×6
  • gnu glibc
  • fedoraproject fedora
  • redhat codeready linux builder
  • +9 more
masshundreds of millions of Linux installations worldwide (glibc is the standard C library shipped with virtually every major distribution)
Full article589 words · extracted from securityaffairs.com · click to collapse

Pierluigi Paganini November 04, 2023

Kinsing threat actors are exploiting the recently disclosed Linux privilege escalation flaw Looney Tunables to target cloud environments.

Researchers are cloud security firm Aqua have observed threat actors exploiting the recently disclosed Linux privilege escalation flaw Looney Tunables in attacks against cloud environments.

The vulnerability Looney Tunables (CVE-2023-4911 (CVSS score 7.8)) is a buffer overflow issue that resides in the GNU C Library’s dynamic loader ld.so while processing the GLIBC_TUNABLES environment variable. An attacker can trigger the vulnerability to execute code with elevated privileges.

“A buffer overflow was discovered in the GNU C Library’s dynamic loader ld.so while processing the GLIBC_TUNABLES environment variable. This issue could allow a local attacker to use maliciously crafted GLIBC_TUNABLES environment variables when launching binaries with SUID permission to execute code with elevated privileges.” reads the advisory.

Researchers from Aqua Nautilus spotted experimental incursions into cloud environments by Kinsing actors. The attackers used a rudimentary yet PHPUnit vulnerability exploit, they attempted to manipulate the Looney Tunables vulnerability (CVE-2023-4911). The experts pointed out that this marks the first documented instance of such an exploit.

“This marks the first documented instance of such an exploit, to the best of our knowledge.” reads the analysis published by Aqua firm. “Intriguingly, the attacker is also broadening the horizons of their cloud-native attacks by extracting credentials from the Cloud Service Provider (CSP).”

The discovery demonstrates that Kinsing actors are rapidly adding new exploits to their arsenal, expanding the potential targets. Recently, Kinsing actors were observed exploiting vulnerable Openfire servers

Kinsing actors often exploited the PHPUnit vulnerability (CVE-2017-9841) and it engaged in fully automated attacks as part of mining cryptocurrency. With the recent discovery, the experts observed Kinsing conducting manual tests, which marks a deviation from their usual modus operandi. 

The attackers were observed using a Python-based Linux local privilege escalation exploit published by the researcher bl4sty.

https://twitter.com/bl4sty/status/1709892681910853922

“In this particular attack, Kinsing proceeds to retrieve an exploit directly from @bl4sty website. On his site, @bl4sty elucidates that the exploit is a ‘Linux local privilege escalation exploit’ targeting the ‘Looney Tunables’ vulnerability (CVE-2023-4911) found in GNU libc’s ld.so.” continues the analysis.

“He further clarifies that the exploit is grounded in the exploitation methodology detailed in the Qualys writeup, asserting its compatibility with x86(_64) and aarch64 architectures, and highlighting its potential for extension through the addition of new target offsets. The script is accessible for review here.

Subsequently, Kinsing fetches and executes an additional PHP exploit.”

Once de-obfuscated, a JavaScript is revealed and it is designed to create a web shell backdoor allowing further unauthorized access to the server.

Kinsing threat actors attempt to enumerate the details and credentials associated with the Cloud Service Provider (CSP) to carry out further malicious actions.

The types of credentials and sensitive data that can be compromised by the attackers are Temporary Security Credentials, IAM Role Credentials, and Instance Identity Tokens.

“This marks the inaugural instance of Kinsing actively seeking to gather such information,” security researcher Assaf Morag said.

“The threat actor manually exploited the Looney Tunables vulnerability (CVE-2023-4911) in GNU libc’s ld.so, marking the first known instance of such an exploit. Additionally, Kinsing is expanding its operations by attempting to collect credentials from Cloud Service Providers (CSPs), indicating a potential broadening of their operational scope and an increased threat to cloud-native environments.” concludes the report that also includes Indicators of Compromise (IoCs).

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, Looney Tunables)



Text extracted automatically; images, tables and formatting may be missing. Original: https://securityaffairs.com/153610/hacking/kinsing-hackers-probe-looney-tunables.html