Tool for test XSS vulnerabilities of a site
This tool is a simple XSS payloads injector that can:
- Inject manual payloads
- Inject automatic payloads (Generated in automatic way for all js code inserted)
- Use modules for XSS exploits like keylogging,reverse shell,credentials harvester ...
- Report all in a Web Panel (Django Powered)
- Connect and send requests under HTTP/sor SOCKS4/5 proxies
- Search for vuln sites (I recommend you under http proxy for not be banned from Google engine)
- Synchronization between terminal script and web panel
- Test for requirements installation
- Read payloads or target urls from text file (txt file accepted)
- List of proxyes
- CSRF and ClickJacking test
- Report in text file (for save the session output)
- Identify a session with title,authors and description (It will be reported in Web Panel)
- It offer a simple 'base-class' for the creation of other modules for XSS exploiting
- Insert output div in report on web panel
- Add Team Support (now you can collaborate with your team on the self attacks from different locations)
- Fix code (some things are hard coded 😱)
- Create modules for XSS payloads
- Add POST support (now only GET)
This tool is very simple to use, but I want document all functions for test the final code and for delete any doubts;
The help command show in few lines, what does every function, and what arguments it want;
You can see it just typing: python Xss.py -h
or py Xss.py --help
, and it will show you an output like this:
This option allows to specify a custom payload to inject (specify it using -i
or --inject
agrument) in a specified site (you do specify it using the --url
or -u
argument);
For avoid problems, insert the script and the url (with the vulnerable resource to test) in single apices ('');
The output will be similar to this:
This script provide the -lp
or --list_proxies
, that accept a number; The number will identify the number of proxies to return;
Insert a number between 1 and 20, because higher number will list much obsolete proxies;
IMPORTANT: Proxies aren't tested then, some of this will report errors if you use it.
The output will be suchlike:
This script allows to use proxed connection for avoid being discovered, and it support HTTP proxies (recommended);
For use proxies, you do specify the -p
or --proxy
arguments, and pass the complete url address of the proxy, like this:
IMPORTANT: The headers that you can see in the photo are different from the output without proxy arg; This because when you use the proxy, some of these tunnells the connection, and return their headers, not of the target url.
IMPORTANT2: If you are under proxy, and you want use your default proxy, set --proxy
as localhost
or 127.0.0.1
IMPORTANT3: If you want send requests under TOR, open the service and start it: start the Tor Bundle or execute the follow commands:
service tor start
, and then, set the proxy parameter like this: -p 'socks5://127.0.0.1:9150'
; For test if you're under TOR correctly, execute the test_tor.py file like this: py test_tor.py
The url argument (--url
or -u
), accept url within the resource to test, then, you cannot insert a simple web address of a site, but you do insert the web address and the GET resource of the site:
In other words:
:exclamation: :-1: py Xss.py --url 'https://www.google.com/'
py Xss.py --url 'https://www.google.com/search?q='
👍 (example)
This script allows you to generate payloads from a simple piece of code (javascript);
The -a
or --automatic
, generate payloads from the payloads in the 'payloads' list in the python code, and return another list within more payloads;
Example case (default): in the list 'payloads' you have only this: alert(123456789)
, but if you insert the -g
or --generated_payloads
, you can view more than one payload ...... :
For have even more payloads, insert the pieces of js code that you want inject in various shapes in the 'payload' list (you can find it in the primary part of code).
IMPORTANT: Not confuse -a
with -g
:
-a
inject all the payloads that you can see with -g-
in a target site, while -g
show only they ......
Example:
py Xss.py -g
:
py Xss.py -a --url 'http://site.com/search_result.php?Code=' -p localhost
:
You can save an attack session simply using the -r
or --report_on_file
argument; It will create automatically a file with memorized all that you can view from the terminal; The file is marked and named with the data of the day,hours and minutes;
The argument doesn't accept arguments, and the result will be such this:
IMPORTANT: With some proxy, you receive an error, or the text will be only the first line of the terminal;
In this evenience, change proxy or try with a simple -p localhost
for avoid other problems
This script can read payloads from a file and inject they in the specified url.
For do it, insert the -fp
or --file_payloads
argument, with the name of the file where the script can read all the payloads.
Simply:
In this example you can see how the elementary payload <script>alert(document.cookie)</script>
, united with the -a
argument, will be generated in more than one !!!
Using the -ft
or --file_target_url
argument, you can extract from the file, all the site to attack;
You do simply specify the file with the target's urls; The output will be similar to this:
This script can crawl all the Google engine, and using the dorks (interesting technique that Google use for indicize all the pages), you can view if a site present probability vulnerable resource that accept html/text/other code.
For use it, use the -s
or --search
, with argument the site to scan;
Like this:
This option control the headers and see their values; Usig the result, you can try or not with CSRF and ClickJacking attacks (manually)
The -t
or --test
argument will test the requirements for bring a term the script installation.
You can also use the setup.py
You can use modules specifing the -M
or --module
argument;
You can find more infos typing py Xss.py -Mh
.
For use a Module, do it:
mv module.py module
, and then, typepy Xss.py -M module
- Type
Y
(if you want use it), and wait that it finish. - See the result that the console show IMPORTANT: You cannot use modules with Web Panel For create other modules, you do bring step-by-step all the steps:
- Create a new class with name 'Module'
- Insert the script in a string, and execute it with the eval() function
- Instantiate all the base method and the variables (name, description,author,date,help(),execute(),ecc....)
- Load and execute it as a simple module (You can see an example from the 'ExampleModule')
This script can organize you attacks as session of attack that you can synch with the web panel; For identify an attack, use this options:
--title
(most important for identify an attack)--completed
(mark as completed attack or uncompleted)--desc
(insert a description of the attack)--auth
(insert the attack's author)
Using the -rW
or --report_on_web
option, you can report it as a session on the web panel;
For do it, you do specify all as a simple attack and add the argument -rW
, like this:
py Xss.py -a -p localhost -u 'http://www.vuln.site/vuln.php?resource=' -c -rW --title 'HackWorld' --desc 'Simple example of desc' --auth 'Mik' --completed
Before:
Command:
After:
And then, you can view the report (insert always the tile, or the session will not appear):
- click on the title, you will redirected in another page, reclick the title and then .... : (I have added the output panel on the report) For create Session from the web panel:
- Go on
localhost:8000/admin
- Login with credentials that you have used for create the
superuser
- Click on
Add
or onEdit
, and do what you want 😈 👽
This script is provided of:
-rWh
(for help you in Web Panel Report),-h
(simple help message),-Mh
(for help you in module creation and usage)
With the script, there are the configuration file for the Web Panel (powered by Django);
- Open the terminal, go to the path of the 'manage.py' file
- Insert the command:
py manage.py makemigrations
, and afterpy manage.py migrate
(for make the db) - Now, insert:
py manage.py runserver
, andpy manage.py createsuperuser
; Insert your credentials for a new account - And then, go on
localhost:8000/home/
, or onlocalhost:8000/admin
: Now you can manage your XSSer !!! IMPORTANT: If you have some problem with db, or index, go on the 'manage.py path', and execute it:rm -rf db.sqlite3
, now do the first point for recreate the db. If the problem persist, contact me !!!
Bug isn't only an error