apache-struts
                                
                                 apache-struts copied to clipboard
                                
                                    apache-struts copied to clipboard
                            
                            
                            
                        This repository contains sample attacks that can be used to exploit vulnerabilities in the Jakarta Multipart Parser of Apache Struts
Description
This project is derived from the original project found here and aims to demonstrate the CVE-2017-5638 exploitation found in vulnerable versions of Apache Struts.
Build
- 
Apache Struts application container image ./build.sh --registry <registry_name> --type app --push
- 
Apache Struts exploit container image ./build.sh --registry <registry_name> --type exploit --push
Run Apache Struts Application (Kubernetes)
- 
In the apache-struts.yamlmanifest file and update theimagekey to point to theapache-struts-appcontainer image created in the previous setp. Update or deleteimpagePullSecretsas necessary.
- 
Deploy the Apache Struts pods: kubectl apply -f 1-deployment.yaml
- 
Deploy the Apache Struts service (external load balancer): kubectl apply -f 2-service.yaml
Run Apache Struts Exploit (Docker)
- 
To run the standard Apache Struts exploit, modify the image,host,src_ip, anddst_ipvariables in therun_exploit.shfile for your requirements and run the shell script:./run_exploit.sh
- 
To run the reverse web shell Apache Struts exploit, modify the image,host,port,src_ip, andsrc_portvariables in therun_webshell.shfile for your requirements and open the designatedsrc_porton the exploit host usingnetcat:nc -lvp <src_port>On the same exploit host but in a new terminal window, run the shell script: ./run_webshell.shOnce the exploit has completed and the GETresponse has been returned, you should have full shell access to the host, pod, or container asrootuser.