Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the vulnerability can not be exploited locally when it's run from the IntelliJ without using Dockerfile #11

Closed
idavollen opened this issue Apr 5, 2022 · 2 comments

Comments

@idavollen
Copy link

When the war file is deployed in the Docker container, the vulnerability can be exploited after running:

  1. docker build . -t spring4shell && docker run -p 8080:8080 spring4shell
  2. python3 exploit.py --url "http://localhost:8080/helloworld/greeting"
  3. go to http://localhost:8080/shell.jsp?cmd=id

However, if I run this Spring Boot web app locally from IntelliJ (BTW, I had to add server.servlet.context-path=/helloworld in application.properties file) and try these steps:

  1. python3 exploit.py --url "http://localhost:8080/helloworld/greeting"
  2. go to http://localhost:8080/shell.jsp?cmd=id
    I've just got "HTTP Status 404 – Not Found" with http://localhost:8080/shell.jsp?cmd=id

Can someone shed the light on why the vulnerability can't be exploited when it's run locally from IntelliJ?

@idavollen
Copy link
Author

idavollen commented Apr 6, 2022

My question is why this vulnerability can not be exploited when it's run locally from IntelliJ WITHOUT using Dockerfile at all?

@idavollen idavollen changed the title the vulnerability can not be exploited locally the vulnerability can not be exploited locally when it's run from the IntelliJ without using Dockerfile Apr 6, 2022
@ertygiq
Copy link

ertygiq commented May 23, 2022

@idavollen From vulnerability descriptions which I read, it only works when app is packaged as WAR and deployed to standalone Tomcat. They say, it doesn't work when run with built-in Tomcat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants