This module provides the GruyereExploitationCLI.
To install the GruyereExploitationCLI, follow these steps:
- Clone the repository:
git clone https://github.com/Dermot10/app_vulnerability_code.git - Install the required dependencies:
pip install -r requirements.txt
This command-line interface (CLI) provides a set of commands to perform various web security exploits using a browser automation tool.
This command exploits the DOM (Document Object Model) with an XSS (Cross-Site Scripting) attack. It injects custom JavaScript or HTML payload into the DOM of the specified URL.
- Arguments:
<url>: Gruyere home page url.<payload>: Text or HTML to inject into the DOM.
This command exploits a URL with a reflected XSS attack. It sends a malicious payload to the URL, which gets reflected back in the response, potentially executing arbitrary scripts in the user's browser.
- Arguments:
<url>: Gruyere home page url.
This command exploits the Gruyere server to read the contents of the secret.txt file using path traversal. It retrieves the file data from the specified URL and saves it to the specified location on the local system.
- Arguments:
<url>: The URL of the Gruyere home page.<new_secret_destination>: The file name and existing location to write the data to.
This command exploits a URL with a path traversal vulnerability to upload a file to the Gruyere server. It injects a file into the specified URL's path, allowing unauthorized file uploads.
- Arguments:
<url>: The URL of the Gruyere web page to exploit.<filename>: The path and file you want to inject into the URL.
This command exploits cookies to elevate user privileges. It leverages cookies to bypass authentication and gain elevated privileges, such as admin privileges.
Username - administrator Password - secret
- Arguments:
<url>: Gruyere home page url.
This command remotely logs in to a specified URL. It simulates the login process by providing the username and password, allowing for further testing and exploration.
- Arguments:
<url>: The URL of the Gruyere login page.<username>: The username for login.<password>: The password for login.
This command retrieves the cookies from a webpage. Cookies are granted and never revoked, and they can be used to bypass authentication or gain unauthorized access. To check the cookies for the user, use the remote login command after creating a user.
- Arguments:
<url>: The URL of the Gruyere home web page.
This command uploads a file containing HTML to the specified webpage. This can be used to exploit vulnerabilities related to file uploads, such as executing malicious scripts or compromising the server.
- Arguments:
<url>: The URL of the Gruyere upload page.<file>: The file to upload.
Note: Each command includes a delay after execution to allow for proper handling and observation of the exploit. Modify the sleep duration as needed for your specific use case.
To use the CLI, execute the desired command with the required arguments. For example:
$ python main.py exploit-dom-xss "https://example.com" "<script>alert('XSS');</script>""This project is licensed under the MIT License. See the LICENSE file for more information."