Giter Club home page Giter Club logo

asfandalimemon25 / cve-2023-50164analysis- Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

CVE-2023-50164 An attacker can manipulate file upload params to enable paths traversal and under some circumstances this can lead to uploading a malicious file which can be used to perform Remote Code Execution. Users are recommended to upgrade to versions Struts 2.5.33 or Struts 6.3.0.2 or greater to fix this issue.

Python 50.79% Java 47.02% HTML 2.19%
apache dockerfile exploit vulnerability webapplications

cve-2023-50164analysis-'s Introduction

CVE-2023-50164: Apache Struts Vulnerable Application

A critical security vulnerability, identified as CVE-2023-50164 (CVE: 9.8) was found in Apache Struts, allowing attackers to manipulate file upload parameters that can potentially lead to unauthorized path traversal and remote code execution (RCE).

Application

A simple testing application is developed for CVE analysis

Running Using Docker File

First Build the application using docker build command:

docker build -t exploitable -f DOCKERFILE .

Then, Run the application using docker run command:

docker run -p 8080:8080 exploitable

In this case you can reach the app on port 8080

Running using MVN Jetty

You can deploy it to Tomcat or any other servlet, or run it by mvn jetty:run. In this case you can reach the app on port 9999. The exploit script works only in cases when the app is deployed to Tomcat since the exploitation path is to upload a WAR webshell. However, many other exploitation path can work in case of the same vulnerability based on the used technologies and other circumstances.

How to run the Exploit

Install PIP packages:

pip install requests requests_toolbelt                                                    

Then, You can change the path as per your application URL and run the below command:

python exploit.py --url http://localhost:8080/upload.action

Its recommended to run the application and exploit on Windows host. The exploit may not work on *nix based system sometimes.

Note

This exploit script has been created for the purposes of research. It is not intended to be used for any malicious or unauthorized activities.

cve-2023-50164analysis-'s People

Contributors

asfandalimemon25 avatar jakabakos avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.