Add request parameters as sources for DOM-based XSS check#286
Open
faf0-addepar wants to merge 3 commits intos0md3v:masterfrom
Open
Add request parameters as sources for DOM-based XSS check#286faf0-addepar wants to merge 3 commits intos0md3v:masterfrom
faf0-addepar wants to merge 3 commits intos0md3v:masterfrom
Conversation
The DOM scanner colors sources and sinks in script lines. Moreover, that scanner collects all colored lines: https://github.com/s0md3v/XSStrike/blob/0ecedc1bba149931e3b32e53422d5b7c089ba9dc/core/dom.py#L50 As coloring is disabled on Windows, macOS, and iOS, no potentially tainted lines will be collected on these platforms: https://github.com/s0md3v/XSStrike/blob/0ecedc1bba149931e3b32e53422d5b7c089ba9dc/core/colors.py#L8-L9 Consequently, the report of potential DOM vulnerabilities is always empty. This change fixes this bug by surrounding sources and sinks with `*` characters. Also, this change removes unused colors imports.
Currently, the DOM-based XSS checker doesn't consider request parameters as an input source. This change allows the DOM-based XSS checker to detect code injected via request parameters.
Contributor
Author
|
@s0md3v please review when you have a moment |
|
Since @s0md3v seems to have abandoned this project, I've gone ahead and took the liberty to make a fork: XSStrike-Reborn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does it implement/fix? Explain your changes.
Currently, the DOM-based XSS checker doesn't consider request parameters
as an input source.
This change allows the DOM-based XSS checker to detect code injected via
request parameters.
Where has this been tested?
Python Version: 3.7.5
Operating System: macOS
Does this close any currently open issues?
No
Does this add any new dependency?
No
Does this add any new command line switch/option?
No
Any other comments you would like to make?
#285 should be merged first, as this change relies on it.
Some Questions