CVE-2017-5638

Table of Contents

  1. Overview
  2. Dependencies
  3. Usage

Overview

This project is a prove-of-concept for the Apache Struts vulnerabilty. The goal was to create software that can generate and test random IPs for the vulnerabilty described above.

Use this project on your own risk and for educational purpose only.

Dependencies

  • cURL

    • cURL is used to send the crafted header to a certain IP address on a certain Port.
  • Nmap

    • Nmap is used to create the random IP addresses that contains an open port 80 or 443.

Usage

Generate random IPs and save them to a text file.

./get_ip.sh [Number of hosts to scan] [What port to scan] [Filename to write output]
./get_ip.sh 10000 80 output.txt

Check for vulnerability for a specific IP address.

./struts_check.sh [ip address] [port]
./struts_check.sh 127.0.0.1 80

Check for vulnerability for a list of IP addresses.

./main.sh [Text file containing IP adresses] [Port]
./main.sh output.txt 443

Execute a command on a server without the Apache struts vulnerability patch

./struts_attack.sh [IP Adres] [Command]
./struts_attack.sh https://127.0.0.1 whoami