Search

Threat level 5/5 -An easily exploitable critical RCE vulnerability in Apache module log4j

Threat level 5/5 -An easily exploitable critical RCE vulnerability in Apache module log4j

 

 

An easily exploitable critical RCE vulnerability in Apache module log4j released publicly.

 

1. Analysis  
  Updated on : 2022-01-31 10:00:19

 

Reminder:

log4j is an ubiquitous library maintained by The Apache Foundation and used by thousands of Java-based applications. On December 9th, a highly critical, easy to use, remote code authentication vulnerability now known as #log4shell impacting most versions of the library was publicly disclosed. Exploitation attempts leveraging the flaw started happening a few hours later all over the world.

Hundreds of open source and commercial products vulnerable to this flaw quickly started releasing security patches to address the issue numbered CVE-2021-44228 (and fixed by Apache in version 2.15). But additional lower risk vulnerabilities were found since, and fixed in later log4j versions released.

The below advisory details the most relevant information regarding all these vulnerabilities in LOG4J and the attacks leveraging them. 

Update 14, 30/01/2021

 

SUMMARY

The security team of VIETTEL, the largest state-owned Vietnamese telco, shared in a blogpost published on January 28 that they presumably identified past attacks in DNS logs leveraging Log4Shell as early as September 2021, and possibly even in August 2021.

That’s 3 months BEFORE the first in the wild exploitation currently known. No other organization publicly confirmed as of now their claims, which thus remain uncertain at this stage. If these allegations are true, it means you may decide to hunt for possible Log4Shell attempts further back in time than expected until today (August vs. November).

The Vietnamese ISP revealed a few details about the 10 targets they managed to identify so far, that are from multiple countries around the world and in various sectors.

ATTACKS

The researchers explain they identified a specific DNS pattern in some JNDI exploitation attempts inside passive DNS logs. Some targets contacted by Viettel have confirmed they actually saw these scanning attempts in their own DNS logs. No final payload behind this attack campaign was identified though so far.

At least 10 targets from around the world have been found by Viettel, including large organizations from different sectors such as government, finance, technology, entertainment, gambling, etc.

 

victim name  country  sector
n/a n/a entertainment
betsson.com SE gambling
n/a (maybe booking.com) n/a travel
karaoke app VN technology
n/a n/a banking
n/a n/a media
zebra.com US electronics
n/a US telecom
n/a n/a government
tiktok.com CN technology

 

The attacks are mentioned to have continued to this date, even if the company contradicts itself a bit, as it did set up a trap server on January 10 that did not receive the scanning attempt yet. This may mean this specific campaign stopped in December or early January, or did not reach this “honeypot”.

VIETTEL nevertheless recommends to look for DNS outbound requests with pattern “1c47a43da7028a2ed315” in logs, from beginning of August 2021 onward if possible. Our Managed Detection Services will hunt for this possible threat against DNS logs of clients if collected in this timeframe.

 

BlackBerry also published recently a blog post about ongoing attacks against VMware Horizon servers (as reported already in previous updates), that they attributed to a specific threat actor called Prophet Spider (by CrowdStrike). The evidences tying it to this specific group are quite limited, but we confirm some Initial Access Brokers are indeed trying to compromise Horizon servers for the benefit of ransomware gangs. This threat actor’s TTPs were detailed last year by CrowdStrike.

ATTRIBUTION

We don’t believe the claims from “AgainstTheWest” hacktivism group, reported in our previous update, to be true. No new information is available on this topic as of now.

Updated on : 2022-01-20 13:14:50

 

Update 13, 20/01/2021

SUMMARY

The global threat level has not dramatically changed in the last weeks, as no massive exploitation through the log4j v2 vulnerabilities usually called together log4shell has been detected. However, the cybersecurity community remains cautious and ready for any possibly bad outcome. In particular since multiple VMware Horizon servers were compromised since December 25th. Moreover, some vendors did not issue their security patch yet or just won’t in the short term, because their application is still in (unsupported anymore) version 1.2. The problem is that three additional serious vulnerabilities were found affecting this end-of-life version 1.x of log4j .

 

VULN

On January 18th, Apache has disclosed some details of three more critical vulnerabilities impacting Log4j 1.2, which is not supported anymore since August 2015. None of these new flaws will thus get ever fixed:

  • CVE-2022-23302 : a remote authenticated attacker could exploit it to launch a JNDI request that could lead to remote code execution,
  • CVE-2022-23305 : a remote attacker could exploit it via queries containing specially-crafted SQL attributes in order to access or alter database information,
  • CVE-2022-23307 : a remote attacker coult exploit it via specially crafted requests to execute arbitrary code.

These vulnerabilities (and the others already known for log4j version 1.x) should definitely convince developers to switch to another secure logging component, such as the latest version of Log4j version 2, as using End-of-Life code represents a high risk of being compromised. Fortunately, no exploitation code is yet readily available online for these vulnerabilities at this time.

ATTACKS

On January 10th, CISA held a briefing on Log4shell explaining that there are still hundreds of millions of individual devices affected but they have not seen the vulnerability leveraged in significant intrusions. Yet, several cybersecurity companies have stated that nation-state actors are developing attacks leveraging this vulnerability including the Iranian-based subgroup UNC788 (Mandiant) / TA453 (ProofPoint), sometimes referred to as APT35. According to CheckPoint, APT35 started widespread scanning and attempts to leverage Log4shell in publicly facing systems only four days af ter the vulnerability was disclosed. The threat actor leverages this vulnerability to distribute a new modular PowerShell toolkit called CharmPower (named GhostEcho by ProofPoint).

Moreover, on January 19th, Microsoft announced it has discovered a vulnerability on SolarWinds product Serv-U that was being weaponized by threat actors to launch attacks leveraging the Log4j flaw. Tracked as CVE-2021-35247, this input validation vulnerability could allow attackers to build a query given some input and send that query over the network without sanitation. SolarWinds issued an advisory and fixed the vulnerability on January 18th with Serv-U version 15.3.

More ransomware gangs have also begun exploiting this vulnerability, including the Night Sky ransomware group, a new gang which was recently spotted by cybersecurity researchers.

ATTRIBUTION

An anonymous Twitter account called CyberKnow has shared additional information about the presumed origin of the Log4j vulnerability. This source interviewed a Europe-based hacktivist group nicknamed “AgainstTheWest” (ATW) which targets Chinese organizations, including Alibaba Cloud in October 2021, in retaliation for cyberespionage attacks conducted by China against Western organizations. ATW released on November 12th on a hackers’ forum called RaidForums data stolen to the Chinese cloud giant during this attack, thus long before the public disclosure of the Log4j flaw. The hacker collective claims having ta rgeted Alibaba using this vulnerability, and that the vendor then disclosed it to Apache in November 2021. For now, we do not confirm or deny these allegations based solely on these hacktivists’ claims. It could be an attempt to get undue credit for the log4shell discovery.

 

Updated on : 2022-01-05 11:32:31

Update 12, 05/01/2022

VULN

No new vulnerability was identified since last week and the unjustified warning regarding a new RCE in version 2.17 (which turned out to be highly exaggerated, see our Update n° 11).

But with the huge attention that log4shell got all over the world, it’s nevertheless somewhat concerning to see that log4j versions prior to 2.15, thus vulnerable to the main critical vulnerability, keep being downloaded (possibly up to 40% as shown in this Sonatype dashboard). We recommend you remind (and ideally prevent technically and/or through a policy) your developers to rely on those old, unsecure, log4j versions (without management approval at least).

ATTACKS

The scanning attempts (legitimate and malicious) have started decreasing since Christmas. But Microsoft shared they still see ongoing exploitation attempts activity in their latest update yesterday. Only a few victims have so far been publicly confirming log4shell as the initial vector of the attack, including for example:

  • ONUS, a Vietnamese crypto-trading platform, was attacked and its users data stolen. Cybercriminals asked the victim for a $5 million ransom (that was not paid). Thus the attacker tried afterwards to sold the stolen data on a prominent underground forum;
  • A prominent unnamed academic institution was hit through a vulnerable VMWare Horizon Tomcat according to CrowdStrike on December 29. This incident involved a Chinese-related APT group called Aquatic Panda (presumably also called Bronze University or TAG-22). This threat actor is active in cyberespionage against academia, and has ties with the bigger Chinese APT nexus known as APT41 Winnti. It relies heavily on Cobalt Strike and uses a downloader tracked by some researchers as Fishmaster;
  • During the first week, an unknown number of HP 9000 servers running AMD EPYC processors were also hacked to mine a specific cryptocurrency called Raptoreum;
  • But RaaS are now suspected of relying on log4shell too. Conti was the first publicly mentioned, but an AvosLocker affiliate may have recently targeted a Russian company through a vulnerable vCenter.

The US Federal Trade Commission advised yesterday all organizations to remediate log4j vulnerabilities and threaten to pursue the ones that would “fail to take reasonable steps to protect consumer data from exposure as a result of log4j” (sic).

TOOLS

Yet another scanner was publicly released by Google on December 28. Like a few others, it is fast and written in Go (but doesn’t requires you to install the Go language environment on the scanned devices). On top of finding vulnerable assets, it gives the opportunity to update (i.e. mitigate) the found .jar files directly. This doesn’t go without risks on live production environments. Dozens of different scanning tools were released so far. A short benchmarking between the major scanners available can be found here. Unfortunately, it’s not up-to-date anymore and don’t even include the ones from CISA or Google for example.

Furthermore, a detection tool called OpenHandleCollector.exe Microsoft added to their Defender for Endpoint solution raised numerous false positives alerts for their clients, as this EDR identified it as suspicious, possibly since December 23th and until Microsoft fixed it on December 30th as explained here.

ANSSI shared on the same day within the French infosec community 24 different Suricata rules for IDS/IPS solutions. Our Managed Detection services thus our clients do benefit from them since they were received.

Finally, ThinkstCanary, provider of free canary tokens used by a lot of security experts, lost their database on New Year’s eve. That means the tokens you may have configured to try to identify some vulnerable assets, won’t trigger anymore (thus need to be recreated), even if your logs are processed later in a scheduled operation. This “third party” detection opportunity remains highly hypothetical anyways, and should not be your best bet (vs. active internal scanning actions for example).

 

 

Updated on : 2021-12-29 09:41:37

Update 11, 29/12/2021 10h CET

VULN

As anticipated, Apache did release version 2.17.1 yesterday evening to fix the vulnerability reported by CheckMarx that will now be tracked as mentioned as CVE-2021-44832. The CVSS score for it is only at 6.6 out of 10. And we confirm it’s a low risk flaw, even if announced initially as an RCE. In fact, it turns out not to be an RCE, but an “Arbitrary Code Execution” one, located in the “JndiManager.isJndiJdbcEnabled()” function.

Furthermore, the conditions to exploit it are really limited and specific to custom configurations that may be used in some organizations. Indeed, a non default configuration must be set and permissions for the attacker to modify your logging configuration file (which is game over already actually). In this -edge- case, attacker can construct a malicious configuration using a JDBC Appender with a data source referencing a JNDI URI, which can execute remote code. Also, only applications using log4j-core JAR file are vulnerable, not when using only log4j-api without -core.

Apache backported this fix on previous log4j branches, into new versions 2.3.2 and 2.12.4 (for the applications not running on Java 8 in particular). Our Vulnerability Intelligence Watch service already covered this bug in this specific advisory. We don’t anticipate most third party vendors will include a fix for it, as it is even considered by many as not a real vulnerability, and a strong backlash occured against the researcher’s attempt to get fame for his “finding”.

Actually, the issue is the same as another debated vulnerability (CVE-2021-42550) that impacted logback, a fork from log4j version 1.x. In this case disclosed 2 weeks ago, the vulnerability was also considered of low probability thus risk and maybe even not a vulnerability.

As an abundance of caution, you can again upgrade to this latest version of log4j, but we advise you to treat this vulnerability as any other minor bug in your patch management lifecycle. And keep your focus on the daunting tasks related to the original log4shell vulerability:

  • investigate attacks that may have targeted you,
  • detect the ones currently happening,
  • identify your attack surface (in house applications and third party solutions),
  • prevent compromise by patching (or mitigating the risks against) your infrastructure.

 

Updated on : 2021-12-28 18:06:40

Update 10, 28/12/2021, 18h CET

VULN

3 weeks after the history-making log4j vulnerability was disclosed publicly by Alibaba, new information keep popping up every day.

Today, according to a tweet from a researcher from code analysis vendor CheckMarx, yet another RCE vulnerability in latest version of log4j (2.17.0) will soon be revealed by the Apache Foundation. This means another CVE number (CVE-2021-44832) will soon be disclosed and another security update might be needed. Log4J version 2.17.1 is already about to be released and will probably cover it, unless it is postponed in yet another later version. Rumors mention this new RCE can only be triggered un der specific, limited non default edge cases. So the real impact of this new vulnerability will remain lower in our opinion than log4shell (CVE-2021-44228).

CISA’s Director said log4shell is the most serious vulnerability ever recorded according to her, even if it hasn’t yet directly impacted as many systems as Wannacry, Conficker, or the legendary Morris worm in the past. Furthermore, some early reports of nation-state actors leveraging it have been since heavily criticized by experts in the security community. Even if those threat actors may indeed be currently improving their arsenal, some mistakes and assumptions were made in a few reports. For example, an IP address used by a threat intellig ence vendor scanning vulnerable hosts were reported as if linked to a Chinese APT group by SecuritySecoreCard.

PRODUCTS

The list of impacted solutions keeps growing with some products from big groups such as Huawei or NVIDIA and smaller ones like Snow or Wallix. Vendors with a broad product range make almost daily updates, like IBM which is keeping track records here.

TOOLS

CrowdStrike shared publicly on GitHub a few days ago a fast log4j scanner written in Go they called CAST, along with a PowerShell script to deploy it more easily. But as explained already, the log4j code could be embedded in transitive dependencies or in compiled code. JFROG found that 2/3 of the packages containing log4j identified on the famous Maven (MVN) repository didn’t include a separated, specific .jar file, and 1/3 didn’t mention it in the transitive dependencies list.

Microsoft released a consolidated dashboard to help centralize remediation efforts against log4shell inside their Microsoft 365 Defender portal. They for example will list the identified vulnerable container images within Azure and on a Kubernetes cluster. Or when found through the Inventory scanning features from Defender for Cloud. And Microsoft also now moves to the trash the exploitation attempts sent by email identified by Microsoft Defender for Office365.

 

Updated on : 2021-12-23 14:05:10

Update 9, 23/12/2021

ATTACKS

The critical Apache Log4j vulnerability named Log4Shell is actively exploited by two new named malicious actors, a ransomware gang and a banking trojan operator.

The new ransomware that uses the Log4Shell vulnerability is the TellYouThePass gang. This is a ransomware that has been dormant since the summer of 2020, but it is regularly used when a new large vulnerability is discovered in order to attack multiple targets, this was for example the case with EternalBlue last year. The TellYouThePass ransomware attacks were discovered by security researcher Heige from the KnownSec 404 team and confirmed by Curated Intelligence. It is important to note that TellYouThePass does not operate as a RaaS (R ansomware-as-a-Service).

The second actor exploiting this vulnerability uses Dridex malware or Metasploit attack payload called Meterpreter (that provides an interactive shell from which an attacker can explore the target machine and execute code). Dridex was originally a banking trojan developed to steal victims’ online banking credentials. However, over time, the malware evolved into a malware loader. In particular, it is used to carry out ransomware attacks from operations allegedly linked to the Evil Corp hacker group. These ransomware infections include BitPayme r, DoppelPaymer, WastedLocker and possibly other ransomware variants.

These attacks were discovered by the cybersecurity research group Cryptolaemus.

 

VICTIMS

Among the latest victims, the Belgian Ministry of Defense has confirmed a cyberattack on its networks involving the Log4j vulnerability. Although they did not specify if it was a ransomware attack, they explained that “quarantine measures” were quickly put in place to “contain the infected elements”. So it’s safe to assume that they suffered an attack of this type. Unfortunately, apart from this information, the Belgian Ministry of Defense has released little details, thus we do not know the causes and consequences of this attack for now. For these reasons, we cannot estimate the criticality of this attack.

 

RESPONSE

Recently, CISA released a scanner on GitHub to identify web services impacted by Apache Log4j remote code execution vulnerabilities. This scanner is a derivative of scanners created by other members of the open source community. This tool is intended to help organizations identify potentially vulnerable web services affected by log4j vulnerabilities.

CISA highlights the following features on the log4j-scanner project page:

  • URL list support
  • Fuzzing for more than 60 HTTP request headers (not just 3-4 headers like the tools seen previously).
  • Fuzzing for HTTP POST and JSON data parameters.
  • Supports DNS callback for vulnerability discovery and validation.
  • WAF bypass payloads.

Fuzzing (or random data testing) is a technique for testing software. The idea is to inject random data into the inputs of a program. If the program fails (e.g. by crashing or generating an error), then there are flaws to be fixed.

 

GEOPOLITICS

Following Alibaba Cloud’s revelation about Log4Shell, China’s Ministry of Industry and Information Technology (MIIT) has sanctioned the cloud computing company. The government announced that it will suspend its partnership with Alibaba Cloud. This sanction is justified by a breach of duty as recently a new law has been introduced in the Chinese jurisdiction requiring national companies to first inform the government when they discover a vulnerability. Yet, Alibaba Cloud disclosed the flaw to the vendor first.

Updated on : 2021-12-20 09:23:39

Update 8, 20/12/2021

VULN

On December 17, Apache released version 2.17.0 of Log4j. This version protects against uncontrolled recursion of self-referential searches. It therefore protects against the vulnerability that allows an attacker to realize denial of service (DOS) attacks.

To do this, it carries out various modifications noted below:

  • Require components that use JNDI to be enabled individually via system properties.
  • Remove LDAP and LDAPS as supported protocols from JNDI.

In addition, Apache has assigned a new CVE to the previously mentioned vulnerability. Identified as CVE-2021-45105, it affects all versions from 2.0 to 2.16.0. It is therefore necessary to update the log4j framework to version 2.17. Log4j version 2.17 requires at least Java 8 to be generated and executed.

Apache has also released mitigations for systems that cannot realize the upgrade. These are available on the VIW bulletin.

ATTACKS

The Blumira security team has released a report on a new alternative attack vector in the Log4j vulnerability. It relies on a WebSocket JavaScript connection to trigger RCE on unpatched internal and locally exposed Log4j applications.

WebSocket is a web standard that designates a network protocol to create bi-directional communication channels for web browsers. It allows you to execute the following tasks:

  • Notification to the client of a change in server status
  • Sending data in “push” mode from the server to the client, without the latter having to make a request.

WebSocket has been part of most common browsers for the past 10 years and is used for a number of tasks during user browsing. Unfortunately, WebSockets connections are not limited by policies of the same origin as an http request because the server itself validates the request. Furthermore, the use of this protocol does not include many security controls to limit their use. It is therefore easier for an attacker to send a malicious request to a device via this protocol. Finally, it is possible to send requests to a vulnerable local host or to local network servers that have not been exposed to the Internet itself via WebSocket.

For these reasons, this vector significantly expands the attack surface as it can impact services running as local hosts that are not exposed to the network.

In parallel, Blumira has also published a POC showing how to use this new attack vector.

Finally, the security company has also proposed several mitigations to combat this one.

  • Review and update or implement exit filtering to ensure that callbacks fail in many cases
  • Detect when .*/java.exe is the parent process of cmd.exe/ powershell .exe – this is potentially very noisy.

Temporary:

Implement NoScript on untrusted sites to prevent javascript from randomly loading and initiating WebSockets.

Updated on : 2021-12-17 16:57:10

Update 7, 17/12/2021, 18h CET

 

 

VULN

On December 16th, Apache has raised the severity of the vulnerability tracked as CVE-2021-45046 to “Critical” and the CVSS score to 9. Apache explained that security experts found additional exploits against the Log4j 2.15.0 release, that could lead to information leaks, RCE (remote code execution) and LCE (local code execution) attacks. It is now confirmed that the fix to address CVE-2021-44228 in Apache Log4j 2.15.0 was incomplete in certain non-default configurations. Indeed, according to the vendor, when the logging configuration uses a non-default Pattern Layout with a Context Lookup, attackers with control over Thread Context Map (MDC) input data can craft malicious input data using a JNDI Lookup pattern, resulting in an information leak and remote co de execution in some environments.

 

Other insufficient mitigation measures are :

– setting system property log4j2.formatMsgNoLookups or environment variable LOG4J_FORMAT_MSG_NO_LOOKUPS to true for releases >= 2.10

– modifying the logging configuration to disable message lookups with %m{nolookups}, %msg{nolookups} or %message{nolookups} for releases >= 2.7 and <= 2.14.1.

 

We thus discovered that these measures only limit exposure while leaving some attack vectors open. In order to be safe, all users are advised to upgrade to release 2.16.0. or remove the JndiLookup class from the log4j-core JAR.

 

Proof-of-Concept has been released on Twitter by researcher Marcio Almeida. while Alvaro Muñoz of GitHub Security Lab has shared a similar claim.

 

Moreover, Apache has disclosed a new DoS vulnerability in log4j, affecting all versions up to and including 2.16.0. The vendor explains that this flaw will be fixed with the release 2.17.0 while no date for its release has been communicated. Even though this flaw is not as critical as a remote code execution vulnerability, a Denial of Service flaw can be a precious tool for an attacker.

 

ATTACKS

 

According to cybersecurity company AdvIntelConti, one of the most prolific ransomware group has begun to exploit the Log4j vulnerability in its attacks. The Russian-speaking threat actor is the first documented sophisticated ransomware gang to exploit it. This doesn’t come as a surprise as we expected ransomware gangs to try to exploit this vulnerability which offers them the ability to target many valuable entities. AdvIntel adds that the Conti ransomware gang was looking for new attack vectors since early November. On December 13th, the malicious actor started scanning activity for initial access with Log4j, then two days later has launched attacks against VMware VCenter networks for lateral movement.

 

Juniper Networks researchers have noticed that some threat actors exploiting the Apache Log4j flaw have switched from LDAP callback URLs to Remote Method Invocation (RMI) or even used both in a single request for maximum chances of success. For now this process was observed on malicious actors looking to hijack resources for Monero mining, but others could adopt it at any time. LDAP requests are tightly monitored by defenders so some threat actors are looking for alternatives. While RMI API is subject to additional checks and constraints, some JVM (Java Virtual Machine) versions do not feature stringent policies, and as such, RMI can sometimes be a more effortless channel to achieving RCE (remote code execution) than LDAP.

Updated on : 2021-12-16 10:27:40

 

 


Update 6, 16/12/2021, 11h CET

VULN:

Researchers at security company Praetorian warned of yet another security weakness in Log4j version 2.15, that can “allow for exfiltration of sensitive data in certain circumstances”. The vulnerability seems to expand on the medium severity flaw discussed yesterday (CVE-2021-45046, presumably only able to enable local DoS, and patched in 2.16.0). But additional technical details have only been disclosed to Apache in order to prevent further exploitation. For now we still don’t know if this issue was already addressed in version 2.16.0, but it’s highly probable, thus we encourage you to upgrade to this latest version when possible.

However, Guillaume Poupard, head of French ANSSI, has explained that despite this vulnerability being “serious”, we “will probably less talk about it in one month”. But he added that he was worried this flaw had been already exploited in the wild before. Cloudflare confirmed the prior-to-public-disclosure attempts they mentioned happening on December 1st were just tests.

PRODUCTS:

More than 300 products are already considered vulnerable on the Dutch government CERT public list, and we still think 500 ones could be before next week.

ATTACKS:

Some researchers including Kevin Beaumont have spotted a decrease in Log4j raw attack volume since yesterday, which he interpretated as a sign that many organizations have patched their devices. However, we believe many attacks will be still launched, even if less “wild scanning” will probably happen indeed. We also don’t believe most organizations were able to patch all their solutions yet, considering the complexity in the discovery phase and criticality of some of the vulnerable assets (internet-facing applications, used for security, authentication, scada, etc.)

Cloudflare provided a good overview of the current attack trends here. They notice attackers are now better at evading WAF rules, and try to extract sensitive information such as in one case:

  • user,
  • home directory,
  • Docker image name,
  • details of Kubernetes and Spring,
  • passwords for the user and databases,
  • hostnames and command-line arguments.

Furthermore, according to Netlab 360, more than 10 families of malware (mostly dedicated to DDoS and cryptomining) had already been detected exploiting Log4j on December 13th:

  • Mirai
  • Muhstik
  • Elknot
  • m8220
  • SitesLoader
  • xmrig (Windows)
  • xmrig (Linux)
  • 3 previously unknown malware families.

​But the Khonsari ransomware discussed previously might not be a real attack, as a possible kind of “joe job” is suspected against a US person.

 

​RESPONSE:

Many False Negatives (and some False Positives obviously) seems to happen using the open source or commercial remote vulnerability scanners. But our recommandations remain the same for the Identification/Discovery phase: use as many means as possible, including:

  • existing list of vulnerable products (for the third party solutions),
  • remote and local scanning (and relaunch with up-to-date signatures),
  • inventories,
  • attack surface management solutions,
  • EDR products deployed with scanning capabilities,
  • custom discovery attempts (canarytokens/checkers),
  • analysis of your detections (i.e. which application responsible for outbound/egress exploitation attempts logged by your SIEM)

 

 

Update 5, 15/12/2021

 

VULN:

 

JNDI lookup supports protocols such as LDAP, RMI, DNS, or even IIOP, and we’ve finally noticed exploitation attempts using IIOP today.

Obfuscation of requests reached a new level, with for example latin encoded characters identified in the wild.

A third CVE number was assigned to a vulnerability bypass of the 2.15 version under certains non-default configurations: CVE-2021-45046. Indeed, in some ways, lookups may stil pose a small risk internally, but only of DoS, not RCE at this point. It’s fixed by version 2.16 already, as we discussed yesterday.

But this should not change your focus as of now: quickly identify your attack surface, and mitigate / remediate (i.e. patch) it against CVE-2021-44228. If you haven’t patched yet, you may nevertheless directly update in version 2.16 to be safe.

 

PRODUCTS:

These last 24 hours, another batch of major products published advisories, including:

  • IBM WebSphere Application Server (versions 9.0 and 8.5)
  • Amazon OpenSearch, AWS Glue, S3, CloudFront, AWS Greengrass, and API Gateway
  • Zoho’s ADAudit Plus component for auditing Active Directory changes, which is part of the ManageEngine monitoring solution.

We’ve crossed the 100+ affected products mark in our Vulnerability Intelligence Watch advisory, and anticipate reaching possibly 500 products out of the 5,000 ones we currently monitor, by next week (a milestone we never got since the service launched 15 years ago). This shows if needed the ubiquitous reach of the library.

US CISA finally released their own list of affected products, that tracks already almost 300 products. The Dutch government CERT list remains for no probably the most up-to-date official list of products.

 

ATTACKS:

– Noise generated by “legit” scanners

Researchers (on their own or working for Attack Surface Management service providers) are still heavily scanning the Internet to identify vulnerable assets. Companies such as BinaryEdge or KryptosLogic thus show up in your logs, with malicious queries having hostnames such as:

  • *.kryptoslogic-cve-2021-44228[.]com
  • *.canarytokens[.]com
  • *.world443.log4j.binaryedge[.]io
  • *.world80.log4j.binaryedge[.]io
  • billdemirkapi[.]me

First, this means you managed to identify these (non real) attempts in your systems, which is already a good sign. But the amount of “noise” your SOC teams has to handle may be hard to cope with over time, and could even distract you from investigating the real attacks. Indeed, those hostnames are not malicious per se, i.e. they don’t serve any malicious payload in order to compromise you.

Secondly, many clients indiscriminately block the IOC associated to all the suspicious requests they record. However, that means some visibility is lost for these tools. And they are used to report the vulnerable assets to National CERTs and thus in the end to the CERTs’ constituents i.e. critical infrastructure organizations like you. The “only” scanning organization that didn’t want to add noise to this already crowded “field” is Shadowserver, that only identifies and reports suspicious scanning attempts they received in their own honeypots network.

Those above hostnames can thus be safely considered as NOT harmful, and removed from your blacklists or quickly triaged (as benign) using your prefered SOC process (sighting, comment, tag, score, etc.). Similarly, if you block “nessus.org” (or to a lesser extent “*.burpcollaborator.net” from BurpSuite) that are also seen, this could hinder you from doing relevant scans if you rely on these scanners to probe your network.

– First confirmed ransomware case (and not the last):

Khonsari, a new simple ransomware strain, was seen deployed after a log4j attack according to BitDefender. We’ve created a Yara rule for this new .NET malware family to provide coverage in our P2A online malware sandbox analysis platform. You’ll find it for your convenience in Appendices.

The victim nor its sector wasn’t mentioned though by the AV vendor. This increase in advanced attacks was totally expected and more groups will jump on the bandwagon soon. We indeed start seeing webshells dropped on compromised environments. And Microsoft did mention multiple nation-state actors are now also leveraging the vulnerability, including PHOSPHORUS (linked to Iran government) and Hafnium (a Chinese nation-state threat actor).

– Worm ahead?

There is still only rumors of a soon-to-come worming attacks through log4shell. But this is for now based on not very reliable chats from underground forums. The vulnerability has presumably some capabilities to be wormable. So we’ll keep tracking this.

 

RESPONSE :

-PATCH :

The US Cybersecurity and Infrastructure Security Agency has told federal civilian agencies to patch systems affected by the Log4Shell vulnerability by Christmas Eve, i.e. in less than 10 days. That’s a daunting task ahead for those in the operational teams, in particular, because the December Patch Tuesday from Microsoft (and other vendors such as Adobe or Apple) was released yesterday. 80+ vulnerabilities including 7 critical have also to be prioritized today, hopefully through your automated patching processes (WSUS, etc.).

A security analyst reminded us that if you noticed a product was recently patched against log4shell on your infrastructure, but not by you, this could be bad news and a sign of compromise: some threat groups are indeed fighting each others for compromised servers’ control, thus closing the door “behind them”. Overlooking such a security event could lead to a prolonged hacked network.

We haven’t been able to confirm yet whether the vCenter patch is fully working for all versions. Rumors heard yesterday mention indeed that it could be bypassed in some cases, because of the Jetty package being not included in the workaround posted by VMware. Jetty is a lightweight web server/servlet engine that includes it seems a vulnerable log4j library.

-DETECT/BLOCK:

New Snort rules were again pushed yesterday here by the vendor. Other vendors also updated also their signatures.

 


Update 4, 14/12/2021, 10h CEST

 

EXECUTIVE SUMMARY

Vulnerability affecting version 1.x is confirmed to be not as bad as the one impacting v2.x as it needs specific non default conditions (jmsappender) AND write access by the attacker. It has been assigned a different CVE number (CVE-2021-4104) for tracking it sperately. But the version if EOL anyways and should be updagred if possible to the lateste branch. Apache shipped out a new version, v2.16.0, that disables lookups altogether, but it is not required to protect against LOG4SHELL if you’ve already patched to 2.15.0.

Attacks keep popping-up, but not much effort is still identified to conceal the malicious exploitation attempts. No ransomware driven case is yet confirmed for instance, and a lot of the current “noise” is generated by researchers (and companies working in Attack Surface Management type of services, trying to discover the vulnerable assets online.

 

VULN:

A specific CVE number (CVE-2021-4104) has been issued for the vulnerability that affects v1.x of log4j, under certain (non default) conditions linked to jmsappender sub-component. Even if this vulnerability shares the same origin with CVE-2021-44228, its severity is less high. Having another, dedicated, CVE number helps keep track of this specific flaw affecting the 6-years-old, end-of-life, version of log4j (which will not be updated itself).
Apache launched a new version of log4j, identified as v2.16.0, that will respectively disable JNDI lookups (turned them off by default) and remove them all together. But patching to version 2.15.0 is enough to be protected from LOG4SHELL so far.
Reminder: log4j has been ported in other scripting languages (PHP, Net, Rust, etc.), but those are not impacted directly, as they don’t rely on Java, even if the logic flaw could exist there possibly too.

IMPACTED PRODUCTS:

During a Q&A session yesterday, US CISA mentioned they will soon host a public list of affected products on their website. Some products that were previously thought to be affected turned out to be safe (i.e. Redis). Many vendors have not finished investigating if their products are impacted or not, even if more than 200 already are being considered vulnerable. And many clients are hoping the remaining Cloud giants they share data with such as Salesforce, do come up soon with an answer whether they are impacted or not.
Some solutions embed affected products, which means they could possibly be themselves vulnerable. Externally-facing products such as SiteCore CMS for example use third party search engine Apache Solr. But fortunately, the Solr component should not be exposed by default in this SiteCore XP product.

ATTACKS:

The first known exploitation of the vulnerability dates back from December 1st. Thus the vital hunt to detect in logs past exploitation activities should go back at least to that date. However the vulnerability gained really traction after it was discussed on December 9th. No information about the threat group(s) behind the earliest exploitation is known yet. It’s surprising that such a high-level vulnerability got “burned” against Minecraft users, through simple chat messages for example.
Since then, many new ways to trigger it have been demonstrated. The most prominent technique seen in the wild so far remain HTTP requests (with a User-Agent field for example), but DNS (TXT) queries, tampered email headers, a .txt file hosted on the Web, a string inside a SSL certificate or a specific WiFi SSID, an image or PDF metadata, etc. are some of the other techniques that could leverage the flaw.

For now, we don’t see across our clients base a lot of compromises due to this flaw. Most exploitation attempts are so far rather noisy and blocked by WAF or other network tools (i.e. IPS/IDS) and detected by our Managed Detection services. Indeed, they mostly don’t rely yet on the more advanced techniques (encoding, non-HTTP, etc.) identified.
No official ransomware case following a log4j vulnerability as initial attack vector is yet publicly recorded.
IDENTIFY:

The scripts to detect the presence of log4j based on Java file analysis such as this one, even if checking JAR inside JAR, have often limitations, including permissions, unsupported file compression or simply a protected code base. Furthermore, log4j code might be found on a server but NOT be actually used by the application, because of bad development practices (that consists of adding to disk all libraries, even if not used).
On their end, commercial scanners such as Qualys keep creating new rules (see the latest QIDshere). Contact your OCD Vulnerability Management representative to get us to scan your assets through one of the commercial solutions we support.

DETECT:

Outbound connexions might be detected (or even better blocked) when the request goes back fetch on Internet the malicious Java class to be used. But listing the authorized java class repositories used by a specific application might be doable also by the application’s developers.

When searching in your logs, one of the most comprehensive list of regexes to try to handle the various encoded exploitation attempts might be located here.

Snort/Suricata rules already handle such a use case based on Java class file header. Updated Snort rules were indeed pushed Sunday evening. And actually signatures from most NGFW vendors including Forcepoint, CheckPoint, FortiGate, PAN, F5, Cisco were also released, as tracked here. For ISP or hosting providers in particular, Shadowserver honeypot feed started pushing notifications if scanning is identified coming from your own assets.

We encourage you to update your solutions with the latest signatures, be it WAF, NGFW, IDS or any vulnerability scanner used.

 

RESPOND:

Hotpatching the JVM directly (for those that can’t immediately patch) was proposed since day one by AWS, but doesn’t provide the same coverage as the official Apache fix and/or mitigation, and must be carefully tested before use.


Update 3, 13/12/2021 10h30 CEST

 

EXECUTIVE SUMMARY

 

All operational security teams should now be on high alert because of the LOG4SHELL vulnerability in the ubiquitous log4j component, the worst in terms of number of impacted products since the last 10 years. The aftermath of Friday’s public release of the vulnerability PoC is huge, with more exploitation attempts identified, already multiple compromised servers recorded, on top of more and more additional products confirmed vulnerable every day.

Quebec government even decided to close down 4,000 websites by fear they would get hacked (i.e. not being able to patch them before the attackers could exploit them).

IMPACTED PRODUCTS

Various list of impacted products are maintained online, for example here or here. We encourage you to rely on our Vulnerability Intelligence Watch advisory, where the solutions are listed, as soon as the vendors confirm it officially, along with the official patches of the vendors if any. One other confirmed list of products publicly available is from the Dutch government CERT here. But this list is not exhaustive at all.

Whatever the exact list of impacted products right now, it will keep growing, and new prominent ones are every day confirmed vulnerable, including for example:

  • Okta RADIUS and on-prem MFA (authentication solutions)
  • Fortinet (perimeter security, but only specific solutions)
  • Splunk (but only in some conditions)
  • Some F-Secure or Sophos products (antivirus)
  • Puppet, Graylog or Jitsi (open source solutions)
  • SonarQube, NetApp, etc.

But fortunately, many patches or workarounds were already released the vendors. That’s the case for instance for most of the above and:

  • Elastic,
  • Apache,
  • Oracle,

We expect many more vendors still investigating whether their products are impacted to come up over the next days (or even weeks), with workarounds and/or security fixes. More than 500 vulnerable products could be reached in the end. But a vulnerable product does not mean it might be always remotely exploitable. That’s why we encourage you to focus in top priority on your exposed assets. Then turn to the rest of the solutions that may need attention. If unable to patch in a timely manner, you could decide to isolate some servers from Internet.

 

ATTACKS

Indeed, attacks keep coming from all around the world and keep getting more advanced. Friday saw mostly enumeration attempts of possible targets, but since then, exploitation at scale has started and botnets such as Kinsing (cryptomining) grew thanks to this vulnerability.
Also, second-stage payloads starts being discovered on hacked servers, and Microsoft even noticed an attacker using Cobalt Strike after a log4shell compromise, which means the APT or ransomware threat groups have now started leveraging the vulnerability.
DETECT & RESPOND

 

WORKAROUND:

Reminder: v1.x of log4j is NOT impacted by default, unless the JMSappender sub-component is specifically used.

We want to precise that the workaround mentioned Friday (set log4j2.formatMsgNoLookups to true) is available only for version >=2.10.

For releases from v2.0 to 2.10.0, you may want to remove the LDAP class from log4j completely, by issuing the following command:
zip -q -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class

For certain JVM Versions, it is possible to set com.sun.jndi.rmi.object.trustURLCodebase and com.sun.jndi.cosnaming.object.trustURLCodebase to false to mitigate the vulnerability. Some JVM versions already have this as default setting.

IOCs:

Various sources of IOCs publicly available are listed by the Dutch government CERT here. We keep recording all relevant IOCs in our OCD Datalake repository, taggued with this World Watch advisory’s ID (#world_watch-577502). Our Managed Threat Intelligence service customers and our internal Managed Detection teams can action those IOCs through this query.

 

DETECTION:

To look for vulnerable instances of log4j, a list of hashes of all versions of log4j was put together here (but you must filter out the 2.15.0 version from it that is included in it).
Also, many vulnerability scanners are proposed online, from Qualys, Rapid7, Tenable (Nessus) up to BurpSuite plugins and custom ones. Locally, you may for example want to rely on the scanner from Logpresso (or another one coded in Go).

On top of the Yara rules already available, the following EGREP searches might help locate non encoded exploitation attempts in uncompressed and compressed log files:

  • uncompressed: sudo egrep -i -r ‘\$\{jndi:(ldap[s]?|rmi|dns):/[^\n]+’ /var/log
  • compressed: sudo find /var/log -name \*.gz -print0 | xargs -0 zgrep -E -i ‘\$\{jndi:(ldap[s]?|rmi|dns):/[^\n]+’

But as explained above, these are only partial detection opportunities, because of encoding used in most cases. Thus other queries might be needed such as:

  • uncompressed: sudo find /var/log/test/ -type f -exec sh -c “cat {} | sed -e ‘s/\${lower://’g | tr -d ‘}’ | egrep -i ‘jndi:(ldap[s]?|rmi|dns):’”\;
  • compressed sudo find /var/log/test/ -name “*.gz” -type f -exec sh -c “zcat {} | sed -e ‘s/\${lower://’g | tr -d ‘}’ | egrep -i ‘jndi:(ldap[s]?|rmi|dns):’” \;

 

WAF:

Similarly, the WAF rules to block log4shell may be bypassed in some ways, but they remain useful at catching the numerous simple attempts currently going on:

  • Google Cloud Armor
  • Cloudflare (already mentioned saturday and applied automatically)
  • Signal Sciences (Fastly)
  • AWS (non official mitigation)

IDS/IPS:
On top of the Snort already mentioned, Suricata implementations are now also available online for network detection.

IR:
For Incident Responders that want to retrieve the malicious payloads (i.e. java classes referenced in the JNDI malevolent addresses), a tool written in Java was publicly proposed here. We have a Python implementation of this script if needed.


Update 2, 11/12/2021, 19h CEST

 

Impacted products:

The list of applications impacted by this vulnerability is growing as expected, as this log4j component is widely used within a java environment. The impact review is still ongoing by most of the vendors, with some products already confirmed impacted, some still under investigation and some confiremd non-impacted ones.

– Non-impacted products:

Palo Alto will publish updates on a dedicated web page here, but they confirmed that no product is affected yet, although this library is listed in their license documentation. F5, Pulse Secure, Check Point also confirmed they are not vulnerable.

– Under investigation:

Among the vendors that are still being investigating their products, we have for example:

  • Cisco
  • SonicWall
  • Atlassian (not vulnerable, except in specific configurations applied by a client)
  • and many more.

– Confirmed impacted products:

The following vendors already confirmed some products vulnerable for example:

As the vendors are still in the process of investigating if their products are affected by this vulnerability, Orange Cyberdefense CERT is engaged to continuously update our Vulnerability Intelligence database (here), so if you’ve subscribed to our Managed Vulnerability Intelligence Watch service, please ensure that your list of products monitored is up to date.

 

Attacks:

We observed several obfuscation techniques used by hackers to avoid detection mechanisms. Hackers used native functions & encoding format allowed by Log4j to hide the common detection patterns. Currently, WAF rules and detection tools do not match all the possibilities, thus upgrading the log4j library (or use the proposed mitigation) is still the best option.

Moreover, we believe with high confidence that many different threat actors have begun to exploit this vulnerability. Netlab has for instance detected two different waves of attacks using the log4j flaw to extend respectively the Muhstik and Mirai botnets, that both target Linux devices.

 

Our engagement:

Orange Cyberdefense teams are strongly committed to help our clients deal with this crisis and conducts necessary investigations if any. Suspected cases are being investigated with our customers already. In case of suspicious events detected by our CyberSOC and CERT team, an alert will be sent to our customers through the existing processes. The new IOCs discovered will be added to our OCD Datalake repository.

 


Update 1, 10/12/2021, 18h CEST

 

The Chinese researcher from Alibaba Cloud team that published the details of the vulnerability yesterday shared it with Apache already 10 days ago (November 24th). However the patch issued at the time by the Apache team was not fully preventing the issue and was easily bypassed, thus another fix (the current stable version 2.15.0) was issued yesterday.

Version 1.x of log4j may also be vulnerable under certain conditions, but this old, end-of-life, version of the module will most probably never get an update, as it’s not supported anymore. Hundreds of applications are believed to be using this log4j component still today. It’s already confirmed that multiple Apache products were indeed vulnerable, including:

  • Apache Solr,
  • Apache Struts2,
  • Apache Solr,
  • Apache Druid,
  • Apache Flink,
  • Apache Kafka,
  • SBT,

Furthermore, Elastic, Redis, Tomcat(?), but also Minecraft, Steam and many other applications relying on java-based components are also confirmed vulnerable. Jira is believed to not be impacted as of now, but this might change in the future.

The rush for discovering the possible vulnerable assets has started, with cryptomining gang and botherders attempting to hack as much servers as possible before they are patched. Minecraft was the first organisation to publicly confirm having been hacked because of the vulnerability that is now sometimes called “Log4Shell”. But numerous other victims will probably be impacted in the coming hours.

More and more attacks are recorded in the wild by honeypots instances accross the world, with most of them coming from Tor exit nodes. GreyNoise for example already identifed more than 100 different attacking IP addresses. All confirmed attacking IP addresses will be added to our OCD Datalake IOC repository used by our Managed Detection services. Clients having direct access to the Datalake platform can get those IOCs with this query.

You may use a Yara rule such as the one publicly available here in order to detect such exploitation attempts. Some Snort rules released by EmergingThreats might be able to detect the attacks also. A Splunk query can help identify such issues using this specific SIEM. Cloudflare tries to protect its clients with some WAF rules, as they explained here.

Initial alert on : 2021-12-10 12:55:13

1.1 Executive summary

A new RCE vulnerability has been discovered in the Apache module, Log4j. Identified as CVE-2021-44228, it allows an attacker to execute code remotely, however, the threat ranges from data confidentiality and integrity to system availability.

It affects all versions of log4j between 2.0 and 2.14.1.

It is worthy to note that the potential impact of this flaw is very important, as countless services using log4j  are exposed and at risk of being attacked. According to the search engine Shodan, there are at least 24 million Apache servers in the world. Active exploitation in the wild was already identified in multiple countries.

 

1.2 What you will hear

An easily exploitable RCE is present on a large number of Apache servers.

 

1.3 What it means

Details of a critical vulnerability in the Apache log4j module have been disclosed publicly on December 9th. Identified as CVE-2021-44228, this vulnerability allows an attacker to execute code remotely. Apache Log4j is a Java-based logging utility that allows users to set their own logging levels. Unfortunately, this module is present in several cloud services like Steam, Apple iCloud… This vulnerability is caused by a bad check when a user sends requests to the server. It is therefore possible that an attacker could create specially crafted requests and send them using any remote protocol such as HTTP, TCP, etc. Using these requests, an attacker can easily realize arbitrary code execution, DDOS or compromise data.

Unfortunately, the apache-log4j2 packages provided by Debian Stretch 9, Buster 10 and Bullseye 11 are impacted. Furthermore, there are already several working PoCs in the wild, so it is highly likely that malicious actors have now started using this vulnerability due to its ease and the number of vulnerable assets to target.

Apache Log4j version 2.15.0 fixes this vulnerability, so it is urgent to install this patch to any exposed instance.

 

We classify this alert at level 5 out of 5, because there is a significant number of devices that may be impacted by this vulnerability. Moreover, it is currently very easy to exploit it with the readily available PoC, and attacks are indeed already happening in the wild, as confirmed by our Managed Detection services.

 

1.4 What you should do

It is strongly recommended to upgrade to version 2.15.0 of Apache Log4j.

It is also possible to achieve the following temporary mitigations:

  • Start server with log4j2.formatMsgNoLookups=True
  • Add -Dlog4j2.formatMsgNoLookups=true to your JVM args

In order to identify if you are already affected, you might check the log files for any services using vulnerable log4j versions for user-controlled strings, like for example, “Jndi:ldap”

2. Appendices :
  Updated on : 2021-12-15 09:08:36

 


Update 5, 15/12/2021

 

Yara rule :

rule Khonsari : malware {

meta: description = “Khonsari Ransomware, .NET < 20kb”

source = “OCD” date = “14/12/21”

researcher = “Alexandre MATOUSEK”

category = “ransom”

strings:

$ = “.khonsari” wide

$ = “\\HOW TO GET YOUR FILES BACK.TXT” wide

$ = “AQAB” wide

$ = “C:\\” wide

condition: all of them }

 

 

 

Initial alert on : 2021-12-10 12:55:13

2.1 OCD VIW

https://portal.cert.orangecyberdefense.com/vulns/48852

 

2.2 External links

https://github.com/apache/logging-log4j2/pull/608

https://issues.apache.org/jira/projects/LOG4J2/issues/LOG4J2-3201?filter=allissues

https://www.lunasec.io/docs/blog/log4j-zero-day/

https://logging.apache.org/log4j/2.x/changes-report.html#a2.15.0

 

 

   
 

 

You may access to this World Watch report on the Threat Defense Center Extranet portal by following the below link :
https://portal.cert.orangecyberdefense.com/worldwatch/577502.

——————————————————————————————

11/12/2021

The Chinese researcher from Alibaba Cloud team that published the details of the vulnerability yesterday shared it with Apache already 10 days ago (November 24th, 2021). However the patch issued at the time by the Apache team was not fully preventing the issue and was easily bypassed, thus another fix (the current stable version 2.15.0) was issued yesterday.

Version 1.x of log4j may also be vulnerable under certain conditions, but this old, end-of-life, version of the module will most probably never get an update, as it’s not supported anymore. Hundreds of applications are believed to be using this log4j component still today. It’s already confirmed that multiple Apache products were indeed vulnerable, including:

  • Apache Solr,
  • Apache Struts2,
  • Apache Solr,
  • Apache Druid,
  • Apache Flink,
  • Apache Kafka,
  • SBT,

Furthermore, Elastic, Redis, Tomcat(?), but also Minecraft, Steam and many other applications relying on java-based components are also confirmed vulnerable. Jira is believed to not be impacted as of now, but this might change in the future.

The rush for discovering the possible vulnerable assets has started, with cryptomining gang and botherders attempting to hack as much servers as possible before they are patched. Minecraft was the first organisation to publicly confirm having been hacked because of the vulnerability that is now sometimes called “Log4Shell”. But numerous other victims will probably be impacted in the coming hours.

More and more attacks are recorded in the wild by honeypots instances accross the world, with most of them coming from Tor exit nodes. GreyNoise for example already identified more than 100 different attacking IP addresses. All confirmed attacking IP addresses will be added to our Orange Cyberdefense Datalake IOC repository used by our Managed Detection services.

You may use a Yara rule such as the one publicly available here in order to detect such exploitation attempts. Some Snort rules released by EmergingThreats might be able to detect the attacks also. A Splunk query can help identify such issues using this specific SIEM. Cloudflare tries to protect its clients with some WAF rules, as they explained here.

Executive summary

A newRCE vulnerability has been discovered in the Apache module, Log4j. Identified as CVE-2021-44228, it allows an attacker to execute code remotely, however, the threat ranges from data confidentiality and integrity to system availability.

It affects all versions of log4j between 2.0 and 2.14.1.

It is worthy to note that the potential impact of this flaw is very important, as countless services using log4j are exposed and at risk of being attacked. According to the search engine Shodan, there are at least 24 million Apache servers in the world. Active exploitation in the wild was already identified in multiple countries.

What you will hear

An easily exploitable RCE is present on a large number of Apache servers.

What it means

Details of a critical vulnerability in the Apache log4j module have been disclosed publicly on December 9th. Identified as CVE-2021-44228, this vulnerability allows an attacker to execute code remotely. Apache Log4j is a Java-based logging utility that allows users to set their own logging levels. Unfortunately, this module is present in several cloud services like Steam, Apple iCloud… This vulnerability is caused by a bad check when a user sends requests to the server. It is therefore possible that an attacker could create specially crafted requests and send them using any remote protocol such as HTTP, TCP, etc. Using these requests, an attacker can easily realize arbitrary code execution, DDOS or compromise data.

Unfortunately, the apache-log4j2 packages provided by Debian Stretch 9, Buster 10 and Bullseye 11 are impacted. Furthermore, there are already several working PoCs in the wild, so it is highly likely that malicious actors have now started using this vulnerability due to its ease and the number of vulnerable assets to target.

Apache Log4j version 2.15.0 fixes this vulnerability, so it is urgent to install this patch to any exposed instance.

We classify this alert at level 5 out of 5, because there is a significant number of devices that may be impacted by this vulnerability. Moreover, it is currently very easy to exploit it with the readily available PoC, and attacks are indeed already happening in the wild, as confirmed by our Managed Detection services.

What you should do

It is strongly recommended to upgrade to version 2.15.0 of Apache Log4j.

It is also possible to achieve the following temporary mitigations:

  • Start server with log4j2.formatMsgNoLookups=True
  • Add -Dlog4j2.formatMsgNoLookups=true to your JVM args
    In order to identify if you are already affected, you might check the log files for any services using vulnerable log4j versions for user-controlled strings, like for example, “Jndi:ldap”

Impacted products

The list of applications impacted by this vulnerability is growing as expected, as this log4j component is widely used within a java environment. The impact review is still ongoing by most of the vendors, with some products already confirmed impacted, some still under investigation and some confirmed non-impacted ones.

Non-impacted products:

Palo Alto will publish updates on a dedicated web pagehere, but they confirmed that no product is affected yet, although this library is listed in their license documentation. F5, Pulse Secure, Check Point also confirmed they are not vulnerable.

Under investigation

Among the vendors that are still being investigating their products, we have for example:

  • Cisco
  • SonicWall
  • Atlassian (not vulnerable, except in specific configurations applied by a client)
  • and many more.

Confirmed impacted products

The following vendors already confirmed some products vulnerable for example:

As the vendors are still in the process of investigating if their products are affected by this vulnerability, Orange Cyberdefense CERT is engaged to continuously update our Vulnerability Intelligence database, so if you’ve subscribed to our Managed Vulnerability Intelligence Watch service, please ensure that your list of products monitored is up to date.

Attacks

We observed several obfuscation techniques used by hackers to avoid detection mechanisms. Hackers used native functions & encoding format allowed by Log4j to hide the common detection patterns. Currently, WAF rules and detection tools do not match all the possibilities, thus upgrading the log4j library (or use the proposed mitigation) is still the best option.

Moreover, we believe with high confidence that many different threat actors have begun to exploit this vulnerability. Netlab has for instance detected two different waves of attacks using the log4j flaw to extend respectively the Muhstik and Mirai botnets, that both target Linux devices. The IP addresses scanning or exploiting this vulnerability

Our engagement

Orange Cyberdefense teams are strongly committed to help our clients deal with this crisis and conducts necessary investigations if any. Suspected cases are being investigated with our customers already. In case of suspicious events detected by our CyberSOC and CERT team, an alert will be sent to our customers through the existing processes. The new IOCs discovered will be added to our Orange Cyberdefense Datalake repository.

Threat level 5/5 -An easily exploitable critical RCE vulnerability in Apache module log4j

Incident Response Hotline

Facing cyber incidents right now?

Contact our 24/7/365 world wide service incident response hotline.