Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Expoitation-de-la-vuln-rabilit-CVE-2022-22965 | Kitploit
Tools/GitHubGitHub/guigui237/expoitation-de-la-vuln-rabilit-cve-2022-22965
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingCommand and Control
GitHubguigui237/expoitation-de-la-vuln-rabilit-cve-2022-22965

Expoitation-de-la-vuln-rabilit-CVE-2022-22965

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository
1 year agoNot yet reviewed

Exploitation of vulnerability CVE-2022-22965

The vulnerability CVE-2022-22965, known as Spring4Shell, is a remote code execution (RCE) flaw in the Java Spring Core framework, present in versions prior to 5.3.18 and 5.2.20. This vulnerability allows an attacker to inject and execute code remotely on a vulnerable server by exploiting a misconfiguration in Tomcat logging. It was discovered in March 2022 and affects activeMQ, Spring MVC, and Spring WebFlux applications running with JDK >= 9.

image

We first ensure that we have a JDK version >= 9, if not we activate it:

image

Prerequisites ✔ The requests and BeautifulSoup modules are required for the exploit to work. We install them with:

root@kitploit:~
pip3 install bs4
pip3 install requests

Network Scan

image

Here, we have the activeMQ service version 5.17.3 listening.

In our exploit strategy we will use a developed Python script named spring4shell.py attached to this project.

Objective of this script: This Python script exploits the CVE-2022-22965 flaw by modifying Tomcat logging parameters to inject a webshell into log files, allowing remote command execution on the compromised server.

Explanation of the Python Code

root@kitploit:~
  Terminal output configuration:
      The settings class adapts terminal display according to chosen options, with colors to differentiate information, warning, and error messages.
  Random variable generation:
      The filename() and password() functions generate random hexadecimal strings to secure the filename and password of the webshell.
  Exploitation of the vulnerability:
      The script sends requests to modify Tomcat logging parameters, injecting JSP code fragments via logs. By configuring logs to write into the webapps/ROOT directory, each entry becomes interpretable as JSP code.
      The injected log file then acts as a webshell accessible via a browser to execute commands.
  Interaction with the Webshell:
      The terminal class opens an interactive interface allowing commands to be sent to the compromised server. Commands are sent as the cmd parameter, and responses are displayed in the terminal.

After executing the script, a link to the webshell is provided: Via the command:

root@kitploit:~
python3 spring4shell.py http://172.17.0.1

image

We obtain direct shell access to our activemq server in order to execute any commands we wish.

End of exploit !!!

Download Tool