Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Sharpforce/XSS-Exploitation-Tool

An XSS Exploitation Tool
https://github.com/Sharpforce/XSS-Exploitation-Tool

cross-site-scripting xss xss-attacks

Last synced: about 1 month ago
JSON representation

An XSS Exploitation Tool

Awesome Lists containing this project

README

        

# XSS Exploitation Tool

XSS Exploitation Tool is a penetration testing tool that focuses on the exploit of Cross-Site Scripting vulnerabilities.

> This tool is only for educational purpose, do not use it against real environment

# Features

- Technical Data about victim browser
- Geolocation of the victim
- Snapshot of the hooked/visited page
- Source code of the hooked/visited page
- Exfiltrate input field data
- Exfiltrate cookies
- Keylogging
- Display alert box
- Redirect user

# Installation

## Installing on host

> Tested on Debian 12

You may need Apache, Mysql database and PHP with modules:

```
$ sudo apt-get install apache2 default-mysql-server php php-mysql php-curl php-dom
$ sudo rm /var/www/index.html
```

Install Git and pull the XSS-Exploitation-Tool source code:

```
$ sudo apt-get install git

$ cd /tmp
$ git clone https://github.com/Sharpforce/XSS-Exploitation-Tool.git
$ sudo mv XSS-Exploitation-Tool/* /var/www/html/
```

Install composer, then install the application dependencies:

```
$ sudo apt-get install composer
$ cd /var/www/html/
$ sudo chown -R $your_debian_user:$your_debian_user /var/www/
$ composer install
$ sudo chown -R www-data:$www-data /var/www/
```

### Init the database

```
$ sudo mysql
```

Creating a new user with specific rights:

```
MariaDB [(none)]> grant all on *.* to xet@localhost identified by 'xet';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> quit
Bye
```

Creating the database (will result in an empty page):

Visit the page http://server-ip/reset_database.php

### Adapt the javascript hook file

The file hook.js is a hook. You need to replace the ip address in the first line with the XSS Exploitation Tool server ip address:

```javascript
var address = "your server ip";
```

## Using Docker

Adapt the hook.js file as explained above before building the image.

Build the image:
```
$ docker-compose -f docker-compose.yml build
```

Adapt environment variables in docker-compose.yml file and run the tool:
```
$ docker-compose -f docker-compose.yml up
```

This will spin up the server and the database, visit the page http://localhost:8080 to see the XSS Exploitation Tool interface.

NOTE: A default user for mysql is created with the credentials in the docker-compose.yml.

# How it works

First, create a page (or exploit a Cross-Site Scripting vulnerability) to insert the Javascript hook file (see exploit.html at the root dir):

```
?vulnerable_param=
```

Then, when victims visit the hooked page, the XSS Exploitation Tool server should list the hooked browsers:

![clients](https://github.com/user-attachments/assets/5dd1a5f1-6479-4ca3-9aa0-9910b910d48c)

# Screenshots

![browser_details](https://github.com/user-attachments/assets/9be549b1-4a2e-4c4a-ae49-82d1e70a6c0f)

![geo](https://github.com/user-attachments/assets/79a33009-fe0a-42d1-8581-8637c0976f0e)

## Disclaimer

This tool is intended for educational purposes only and should be used exclusively in authorized penetration testing environments. Unauthorized access to or use of systems that you do not own is illegal. The author is not responsible for any misuse of this tool.

## License

This project is licensed under the GPL-3.0.