Exploiting Log4Shell, Using Rogue-JNDI-NG -A Practical Walkthrough

By Mesbaul Islam • Cybersecurity Researcher Research

The Log4Shell vulnerability (CVE-2021–44228) is one of the most critical remote code execution (RCE) vulnerabilities discovered in recent years. It affects the widely used Apache Log4j logging library and allows attackers to execute arbitrary code on vulnerable systems.

In this write-up, I’ll walk through a hands-on exploitation of Log4Shell in a controlled lab environment, where I successfully gained a root shell using the GitHub project rogue-jndi-ng after testing multiple tools.

Lab Setup

To safely demonstrate this vulnerability, I created a local lab environment:

The lab was intentionally configured to simulate a real-world vulnerable setup.

Reconnaissance

The first step was to identify open ports and services using Nmap:

nmap -sC -sV 192.168.0.105
            

Key Finding: Port 80 (HTTP) was open → Indicates a web application is running

Web Enumeration

After accessing the web application in a browser: http://192.168.0.105

Observations:

At this point, the endpoint looked interesting for input-based vulnerabilities.

Identifying the Vulnerability

After analyzing the application behavior and doing some research, I identified that:

  1. The application is using Apache Log4j
  2. It is vulnerable to JNDI injection (Log4Shell)

Exploit Research

I tested multiple tools initially, but most failed or were unreliable in my setup.

After further research, I found a powerful GitHub project:

👉 rogue-jndi-ng (https://github.com/veracode-research/rogue-jndi-ng.git)

This tool helped successfully trigger the vulnerability and achieve remote code execution.

Exploit Setup

What Happens Here?

Conclusion

This exercise demonstrates how dangerous Log4Shell can be when left unpatched. Despite trying several tools, rogue-jndi-ng proved to be highly effective in achieving exploitation.

Always test vulnerabilities in a controlled lab environment and follow responsible disclosure practices.



Md Mesbaul Islam, Cyber Security Researcher & Ethical Hacker

Want to read with POC? Here is the Medium link

Need a Professional Security Assessment?

I provide Web, API, Mobile Application & Other system Penetration Testing.

Contact Me
← Back to Portfolio