The Log4Shell vulnerabilities — CVE-2021–44228, CVE-2021–4104 and CVE-2021–45105 — are currently dominating headlines due to the confluence of three factors: how easy the vulnerability is to exploit, the severity of the exploit, and how wide-spread Apache is. Organisations across the globe are being told, rightly so, to patch now, but that doesn’t cover the nuance of maintaining modern IT networks.
First, what is the Log4Shell vulnerability? Log4j is a common Java-based tool for sending text to be stored in log files or databases. As a part of multiple Apache frameworks, it’s used by websites and applications globally. The vulnerability is triggered by sending a specific JNDI (Java Naming and Directory Interface) string to the Log4j software. A correctly formatted text string, if the input is not sanitised, will be executed as code, instructing the Log4j instance to download a malicious Java class from an attacker-controlled LDAP server. The malicious Java class is deserialised and installed.
One of the catches with the Log4Shell vulnerability is that the vulnerability doesn’t have to be on a perimeter device for an external attacker to interact with it, which broadens the exposure. If a webserver that an external party can reach is sent the JNDI string, that webserver can pass that string to an internal Log4j instance. That internal Log4j instance will then pass a request back out to the attacker-controlled LDAP server, resulting in exploitation.
Apache Log4j2 2.0-beta9 through 2.12.1 and 2.13.0 through to 2.15.0 are vulnerable to CVE-2021–44228. From log4j 2.15.0, the behaviour that does not sanitise inputs has been disabled by default. This could be turned on mistakenly at a later date though. From version 2.16.0, this functionality has been completely removed.
Now we have a basic understanding of the vulnerability, what does the focus on patching potentially miss? Perhaps you’re in an industry where you can’t take servers and systems down for regular patching easily. Your systems might be providing key resources to people and have uptime requirements, like utilities. You may also not be able to turn your network off as you’re not sure what elements will come back on. Many organisations run on networks that are older and frailer than they’d care to admit.
But the most common reason for leaving elements of a systems unpatched is simply because the organisation didn’t know that element was even there. Does your organisation have a perfect, thorough and constantly up to date configuration management database (CMDB)? Even if you answered yes, the correct answer is likely no.
The level of attention the Log4Shell vulnerabilities are getting can also lead to tunnel vision. Patching is important, but it’s not the start and end of your security to do list. You may miss some vulnerable servers, or attackers may come in another way. At the end of the day that’s what you’re concerned about, having an attacker in your environment. Log4j might lead to that, but being phished could just as easily land an attacker in your network.
Alongside working through patching difficulties, you need to take a defence in depth approach. Assume the attacker has already gotten in and be on the look out for post exploitation behaviour while also deploying controls (or auditing existing controls) to mitigate or prevent this behaviour. To do this, you need to know what an attacker is likely to do once they have access. To take a further step back, you need to know who your attackers are likely to be to know what they may do.
As an example of figuring out who your threats are, a threat model for the New Zealand financial sector was built based off the methodology defined in SANS MGT551 Building and Leading Security Operations Centres. The below threat modelling exercise was conducted at the beginning of 2021 and considers information about attackers up to the middle of 2021. Threat modelling should be regularly conducted to incorporate new information.
To start with, three questions were considered:
Using open-source intelligence techniques, seventy-three threat actors were identified that had either targeted New Zealand previously, were indiscriminate in their targeting, or specifically targeted the financial sector. This was a point in time assessment, which will always be evolving.
Of those seventy-three threat actors, the number was then reduced. If the group had ever specifically targeted New Zealand, the threat actor was left in the final model. This is because these are the actors that know the New Zealand landscape well and have demonstrated motivation. If they don’t show recent activity, they were shifted to a lower tier of the threat model.
If the group targeted the financial sector but showed that they consistently stuck to only a single geography, they were removed from the threat model. An example being groups that appear to only speak Portuguese solely targeting Brazil and Portugal. Those that didn’t demonstrate such restrictions remained.
Of the remaining groups yet to be ruled in or out, if they were not active in recent years they were excluded. Of the starting seventy-three threat actors, twenty-three remained. They were broken into two categories, a higher threat and lower threat category. The threat actors currently deemed most relevant to the New Zealand financial sector are:
For these groups, the most common TTPs have been defined as:
T1486 — Data Encrypted for Impact. There is a current prevalence of ransomware amongst both financially motivated groups to raise funds, politically motivated groups to cause damage, and the blurring between these two actor groups.
T1105 — Ingress Tool Transfer. Most cited instances were ransomware crews deploying tools as they attempt to move laterally in an environment, locate domain controllers and backups before pushing the ransomware across the environment.
T1059.001 — PowerShell. Most threat actors need access to a command and scripting interpreter once they are in the environment, PowerShell being the most used.
T1027 — Obfuscated Files or Information. Most tools used by threat actors will use different methods to obfuscate the tool’s code to impede reverse engineering, and to obfuscate indicators to avoid detection.
T1083 — File and Directory Discovery. All threat actors need to move laterally in an environment and need to discover where they can move to. Politically motivated threat actors will often look for information to exfiltrate based on file types, and ransomware groups will use similar tactics, with the ransomware itself looking for specific file types to encrypt.
Given this, next we will discuss the controls to go along with patching CVE-2021–44228.
Mitigation:
Detections:
Mitigation:
Detections:
Mitigations:
Detections:
Mitigation:
Detections:
Mitigation:
Detections:
For a more thorough breakdown that covers threat actors and their tools, please see the full report or feel free to contact us.
“Arachne Digital’s team works closely with us in integrating our tool, Speculo, with their data. Speculo is designed to help organisations get a full picture of their cyber risk with reliable analytics and a streamlined risk assessment process. The integration of Arachne Digital’s threat intelligence into Speculo provides evidence-based insights into cyber risks, making the tool more relevant to our customers. Arachne facilitated multiple face-to-face meetings and video calls, provided technical resources, comprehensive documentation, and example reports. This collaboration ensured that we could seamlessly integrate and utilize their data, significantly enriching the value we deliver to our clients.
Arachne Digital’s commitment to excellence and their proactive approach in supporting our needs have made them an indispensable partner. We highly recommend their services to any organisation looking to strengthen their threat intelligence capabilities.”
Arachne Digital is proud to partner with the DISARM Foundation as the inaugural member of their Partner Programme, launched at the beginning of 2024.
This partnership is crucial in supporting the DISARM Foundation’s mission to maintain and enhance the DISARM Framework, ensuring it remains a free and continuously updated resource in the fight against disinformation.
Through our collaboration, Arachne Digital provides valuable feedback, promotes the integration of the framework into our operations, and encourages wider adoption within the defender community. This partnership highlights our commitment to combating evolving threats and fostering a secure digital environment.