Skip to content

Dermot10/app_vulnerability_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GruyereExploitationCLI

This module provides the GruyereExploitationCLI.

Installation

To install the GruyereExploitationCLI, follow these steps:

  1. Clone the repository: git clone https://github.com/Dermot10/app_vulnerability_code.git
  2. Install the required dependencies: pip install -r requirements.txt

Exploit Browser CLI

This command-line interface (CLI) provides a set of commands to perform various web security exploits using a browser automation tool.

Commands and arguments

exploit-dom-xss

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.

exploit-reflected-xss

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.

exploit-gruyere-server

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.

exploit-path-traversal

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.

exploit_cookies_elevate_privileges

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.

remote_login

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.

check_cookies

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.

exploit_upload

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.

Usage

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."

About

CLI tool used as a demo to get the developer role at H&B. It's purpose is to remotely launch cyber attacks on a dummy site through web-browser automation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors