science >> Wetenschap >  >> Elektronica

Wat is Log4j? Een cybersecurity-expert legt de nieuwste kwetsbaarheid op internet uit, hoe erg deze is en wat er op het spel staat

Krediet:Pixabay/CC0 Publiek domein

Log4Shell, een internetkwetsbaarheid die miljoenen computers treft, omvat een obscuur maar bijna alomtegenwoordig stukje software, Log4j. De software wordt gebruikt om allerlei activiteiten vast te leggen die zich onder de motorkap afspelen in een breed scala aan computersystemen.

Jen Easterly, directeur van de U.S. Cybersecurity &Infrastructure Security Agency, noemde Log4Shell de ernstigste kwetsbaarheid die ze in haar carrière heeft gezien. Er zijn al honderdduizenden, misschien wel miljoenen pogingen gedaan om de kwetsbaarheid te misbruiken.

Dus wat is dit bescheiden stukje internetinfrastructuur, hoe kunnen hackers er misbruik van maken en wat voor chaos zou er kunnen ontstaan?

Wat doet Log4j?

Log4j legt gebeurtenissen vast - fouten en routinematige systeembewerkingen - en communiceert hierover diagnostische berichten naar systeembeheerders en gebruikers. Het is open-source software die wordt geleverd door de Apache Software Foundation.

Een veelvoorkomend voorbeeld van Log4j op het werk is wanneer u typt of op een slechte weblink klikt en een 404-foutmelding krijgt. De webserver met het domein van de weblink die u probeerde te bereiken, vertelt u dat zo'n webpagina niet bestaat. Het registreert die gebeurtenis ook in een logboek voor de systeembeheerders van de server met behulp van Log4j.

Soortgelijke diagnostische berichten worden in alle softwaretoepassingen gebruikt. In de online game Minecraft wordt Log4j bijvoorbeeld door de server gebruikt om activiteiten vast te leggen, zoals het totale gebruikte geheugen en gebruikerscommando's die in de console zijn ingevoerd.

Hoe werkt Log4Shell?

Log4Shell werkt door misbruik te maken van een functie in Log4j waarmee gebruikers aangepaste code kunnen opgeven voor het opmaken van een logbericht. Met deze functie kan Log4j bijvoorbeeld niet alleen de gebruikersnaam registreren die is gekoppeld aan elke poging om in te loggen op de server, maar ook de echte naam van de persoon, als een afzonderlijke server een map bevat die gebruikersnamen en echte namen koppelt. Om dit te doen, moet de Log4j-server communiceren met de server met de echte namen.

Helaas kan dit soort code voor meer worden gebruikt dan alleen het opmaken van logberichten. Met Log4j kunnen servers van derden softwarecode indienen die allerlei acties op de beoogde computer kan uitvoeren. Dit opent de deur voor snode activiteiten zoals het stelen van gevoelige informatie, het overnemen van het beoogde systeem en het doorgeven van kwaadaardige inhoud aan andere gebruikers die communiceren met de getroffen server.

Het is relatief eenvoudig om Log4Shell te exploiteren. Ik kon het probleem in slechts een paar minuten reproduceren in mijn exemplaar van Ghidra, een reverse-engineering-framework voor beveiligingsonderzoekers. Er is een zeer lage drempel voor het gebruik van deze exploit, wat betekent dat een groter aantal mensen met kwade bedoelingen het kan gebruiken.

Log4j is overal

Een van de grootste zorgen over Log4Shell is de positie van Log4j in het software-ecosysteem. Loggen is een fundamenteel kenmerk van de meeste software, waardoor Log4j zeer wijdverbreid is. In addition to popular games like Minecraft, it's used in cloud services like Apple iCloud and Amazon Web Services, as well as a wide range of programs from software development tools to security tools.

This means hackers have a large menu of targets to choose from:home users, service providers, source code developers and even security researchers. So while big companies like Amazon can quickly patch their web services to prevent hackers from exploiting them, there are many more organizations that will take longer to patch their systems, and some that might not even know they need to.

Open-source software like Log4j is used in so many products and tools that some organizations don’t even know which pieces of code are on their computers.

The damage that can be done

Hackers are scanning through the internet to find vulnerable servers and setting up machines that can deliver malicious payloads. To carry out an attack, they query services (for example, web servers) and try to trigger a log message (for example, a 404 error). The query includes maliciously crafted text, which Log4j processes as instructions.

These instructions can create a reverse shell, which allows the attacking server to remotely control the targeted server, or they can make the target server part of a botnet. Botnets use multiple hijacked computers to carry out coordinated actions on behalf of the hackers.

A large number of hackers are already trying to abuse Log4Shell. These range from ransomware gangs locking down minecraft servers to hacker groups trying to mine bitcoin and hackers associated with China and North Korea trying to gain access to sensitive information from their geopolitical rivals. The Belgian ministry of defense reported that its computers were being attacked using Log4Shell.

Although the vulnerability first came to widespread attention on Dec. 10, 2021, people are still identifying new ways to cause harm through this mechanism.

Stopping the bleeding

It is hard to know whether Log4j is being used in any given software system because it is often bundled as part of other software. This requires system administrators to inventory their software to identify its presence. If some people don't even know they have a problem, it's that much harder to eradicate the vulnerability.

Another consequence of Log4j's diverse uses is there is no one-size-fits-all solution to patching it. Depending on how Log4j was incorporated in a given system, the fix will require different approaches. It could require a wholesale system update, as done for some Cisco routers, or updating to a new version of software, as done in Minecraft, or removing the vulnerable code manually for those who can't update the software.

Log4Shell is part of the software supply chain. Like physical objects people purchase, software travels through different organizations and software packages before it ends up in a final product. When something goes wrong, rather than going through a recall process, software is generally "patched," meaning fixed in place.

However, given that Log4j is present in various ways in software products, propagating a fix requires coordination from Log4j developers, developers of software that use Log4j, software distributors, system operators and users. Usually, this introduces a delay between the fix being available in Log4j code and people's computers actually closing the door on the vulnerability.

Some estimates for time-to-repair in software generally range from weeks to months. However, if past behavior is indicative of future performance, it is likely the Log4j vulnerability will crop up for years to come.

As a user, you are probably wondering what can you do about all this. Unfortunately, it is hard to know whether a software product you are using includes Log4j and whether it is using vulnerable versions of the software. However, you can help by heeding the common refrain from computer security experts:Make sure all of your software is up to date.