Incident Report

Still Stirring the Honeypot: Why an Old Log4j Vulnerability Still Packs a Punch

By

Matt Berns, Threat Intelligence Analyst

By

Access Point Consulting

New threats emerge daily, but some old network vulnerabilities stubbornly refuse to fade away. One such vulnerability is Log4j, better known as Log4Shell. Discovered nearly three years ago, this critical flaw continues to wreak havoc across industries. An opportunistic campaign has recently surfaced that leverages Log4Shell to deploy crypto-mining malware and compromise systems. Let’s dive into the details and explore why this vulnerability remains such a persistent threat.

What’s Up with Log4j?

For those who may not be familiar, Log4j is a widely-used Java-based logging library that became infamous in December 2021 when a severe vulnerability was discovered. This vulnerability, dubbed Log4Shell (CVE-2021-44228), allows attackers to execute remote code on vulnerable systems simply by sending a specially crafted request. Given how deeply integrated Log4j is in countless applications and services, it quickly became a top priority for IT teams worldwide to patch.

But here’s the kicker—despite a massive patching campaign, many systems are still vulnerable. Whether due to the complexity of modern software stacks or the challenge of tracking down every instance of Log4j, the reality is that the Log4Shell vulnerability is still out there, ready to be exploited. And that’s exactly what is happening in this latest campaign.

The New Campaign

On July 30, 2024, Datadog’s threat research team spotted something suspicious. One of their Confluence honeypots—a decoy system designed to lure in attackers—picked up what looked like a standard Log4Shell exploitation attempt. The attack originated from a Tor exit node, a common tactic used by cybercriminals to mask the attack’s true location. However, as the researchers dug deeper, they realized this wasn’t just another routine probe. It was the beginning of a sophisticated campaign aimed at deploying XMRig, a popular crypto-mining tool.

How the Attack Unfolds

The attack started with an obfuscated LDAP request, which is a sneaky way to trigger the Log4Shell vulnerability while avoiding detection. When a vulnerable Java application processed this request, it kicked off a chain reaction that lead to the download and execution of a malicious Java class.

This class, once executed, didn’t waste any time. It immediately created a temporary file and downloaded a bash script from a remote server. This script, known as "lte," is the heart of the operation. It’s designed to gather information about the system, establish persistence, and deploy the XMRig miner to start generating cryptocurrency for the attackers.

Breaking Down the lte Script

The lte script is a masterclass in stealth and persistence. First, it conducts a thorough reconnaissance of the compromised system, checking available memory, CPU cores, and other resources. This helps it optimize the crypto-mining operation. Next, it downloads the XMRig miner and configures it to start mining Monero, a cryptocurrency known for its anonymity.

But that’s not all. The script also sets up multiple backdoors, giving the attackers continued access to the system. It uses a reverse shell to allow remote command execution, and it encrypts its communications to evade detection. Depending on the system’s configuration, the script may set up a systemd service or a cron job to ensure the miner runs every time the system reboots. It’s a thorough and well-executed attack that shows just how dangerous Log4Shell can be.

Why Log4Shell Remains a Threat

So why is Log4Shell still causing problems nearly three years after it was discovered? The answer lies in the sheer scale of its impact. Log4j is deeply embedded in software across industries, from enterprise applications to cloud services. Even if a company patches its primary systems, there may still be vulnerable instances lurking in third-party software or legacy systems. This makes Log4Shell a perfect target for opportunistic attackers who are constantly on the lookout for easy wins.

Staying Ahead of the Threat

Given the persistent nature of Log4Shell, it’s crucial for organizations to remain vigilant. Continuous monitoring, timely patching, and robust threat detection are all essential components of a strong cybersecurity posture. Tools like Datadog’s Application Security Management (ASM) and Cloud Security Management (CSM) can play a vital role in this effort. ASM can detect Log4Shell exploits by monitoring for specific payloads and flagging suspicious activity. Meanwhile, CSM can identify vulnerable applications and catch post-exploitation behaviors, such as unauthorized downloads or the creation of suspicious child processes.

The Battle Isn’t Over

The latest Log4j campaign is a stark reminder that even well-known vulnerabilities can remain dangerous long after their initial discovery. As long as unpatched systems exist, threat actors will continue to exploit them. To effectively defend against threats like the ongoing Log4j campaign, companies must prioritize a proactive and layered security approach. Start by ensuring all systems are fully patched, with special attention to legacy and third-party software that might still use vulnerable versions of Log4j.

Implement continuous monitoring and threat detection tools to identify suspicious activities and potential exploitation attempts in real-time. Additionally, conduct regular security audits and vulnerability assessments to uncover and address any overlooked risks.

Employee training on recognizing and responding to security threats can also be a valuable defense mechanism.

Finally, establish robust incident response plans that include clear protocols for isolating and mitigating compromised systems to minimize damage in case of a breach. By taking these steps, organizations can significantly reduce their exposure to both new and lingering threats.

Resources

Trending Articles & Security Reports

Resources

CyberWatch

September 16, 2024

Why We Need NIST's Post-Quantum Cryptography Standards

Last month, NIST published its first set of post-quantum cryptography (PQC) standards, setting a new benchmark for enterprises, government agencies, and vendors to withstand future cyberattacks from quantum computers. The time to start transitioning is now. Discover what’s at stake with CyberWatch.

Find out more
September 13, 2024

Patch Tuesday for September

Every second Tuesday of the month, Microsoft releases patches to their applications, services, and operating systems. Typically, these patches include a myriad of security fixes and this time around, for September of 2024, 79 different vulnerabilities have been addressed, including 4 zero-day vulnerabilities and 10 critical vulnerabilities.

Find out more
September 12, 2024

Cutting it Close: Phishers Using CapCut in Data Heists

A newly uncovered phishing campaign is exploiting the growing popularity of CapCut, a video editing tool developed by ByteDance. The attackers are utilizing a technique known as reputational hijacking, which allows them to embed malware within a legitimate-looking package, bypassing Smart App Control (SAC) and leaving users vulnerable to data theft and system compromise. This campaign represents a significant escalation in the tactics used by threat actors to evade detection.

Find out more