🧨XSS Context Besed
Path-based xss with different types of methods
Inecject payload in every path and check xss
append fake parameters in every path and check the xss vulnerability
PATH Based - XSS Injection
Example:
https://premierbuild.com/asad"><img src=a onerror=alert(document.domain)>/..CFIDE/administrator/index.cfm
https://www.premierbuild.com/asad%22%3E%3Cimg%20src=a%20onerror=alert(document.domain)%3E/..CFIDE/administrator/index.cfm
https://mobile.premierbuild.com/asad%22%3E%3Cimg%20src=a%20onerror=alert(document.domain)%3E/..CFIDE/administrator/index.cfm
https://m.atlas.kfc.co.uk:8443/MicroStrategyLibrary/style/vge01'-alert(document.domain)-'vephk/favicon.ico
https://app-webtech-web.plutopreprod.tv/stream-br/category/5"><svg onload=alert(document.cookie)>"f862733747338000786e085/view-all
https://www.allianz.es/xx<a href="javascript:prompt(document%2edomain)">aaaa.childrenlist.html
https://www.allianz.es/seguros/especialidades/"><img src=a onerror=alert(document.domain)>.childrenlist.html<form action="/gym.php" method="POST">---------------------------------------------------------------
My-XSS-Probe:
If Payload Encode then Search .replace in Source-Code
Double URL Escape encoding:
Unicode Escape encoding:
HTML entity Escape encoding:
---------------------------------------------------------------
HTML Context:
Sunerio:
---------------------------------------------------------------
Attribute Context:
Sunerio:
---------------------------------------------------------------
URL Context:
Script Tag:
Sunerio:
Anchor Tag:
Sunerio:
Iframe Tag:
Sunerio:
Form Tag:
Sunerio:
Frameset Tag:
Sunerio:
---------------------------------------------------------------
javascript Context:
Single Qoute:
Sunerio:
Double Qoute:
Sunerio:
Without Qoute:
Sunerio:
---------------------------------------------------------------
---------------------------------------------------------------
Parameters
looking in your Burp proxy History for ?parameter=
Note: Do not waste time browsing things such as jquery.js.
Typically these files do not contain anything that will be of use to you.
Go for the custom-made specific endpoint.js files.
---------------------------------------------------------------
HTML Injections ……
You can customize the payloads to find what it reflects and manually make a bypass payload.
Simple HTML Injection
Use when input lands inside an attribute’s value outside the tag except the ones described in the next case.
The most straightforward one is that input is reflected just right in the code between existing tags, after or before them. Without the need to escape or break anything,

---------------------------------------------------------------
HTML entity and URL encoding:
if Block onerror,onload,onclick Event-handler – Use this
Use when input lands inside an attribute’s value of an HTML tag or outside tag. But if Block onerror, onload, onclick Event-handler “Then Use “onpointerrawupdate” event-handler case below.
Always look to the attribute value (Double Quotes) or (Single Quotes) then add the payload
---------------------------------------------------------------
---------------------------------------------------------------
Simple HTML Injection – Attribute Breakout
Use when input lands inside an attribute’s value of an HTML tag or outside tag except the ones described in the “Tag Block Breakout” case below.
Always look to the attribute value (Double Quotes) or (Single Quotes) then add the payload
---------------------------------------------------------------
Simple HTML Injection – Comments Breakout
Use when input lands inside the comments section (between <!--and --> ) of the HTML document.
---------------------------------------------------------------
inside Comments Bypass
Vector to use if only anything inside HTML comments is allowed.
Regex example: /<!--.*-->/
---------------------------------------------------------------
HTML Injection in JS (Javascript) Block – Script Breakout
Input sometimes lands into a javascript block (script tags), but the website blocks single or Double Quotes, usually in the value of some variable of the code. However because the HTML tags have priority in the browser’s parsing, we can simply terminate the block and insert a new tag.

Always look to the attribute value (Double Quotes) or (Single Quotes) then add the payload
---------------------------------------------------------------
Simple HTML Injection – Tag Block Breakout
Use when input lands inside or between opening/closing of some tags like title, style, script, iframe, noscript, xmp, pre, and textarea, respectively.
Always look to the attribute value (Double Quotes) or (Single Quotes) then add the payload
---------------------------------------------------------------
HTML Injection - Inline
Almost simple but with a little “> prepended to break out of the current tag.
Always look to the attribute value (Double Quotes) or (Single Quotes) then add the payload

--------------------------------------------------------------
HTML Injection - Inline: No Tag Breaking
Use when input lands inside an attribute’s value of an HTML tag but that tag can’t be terminated by greater than sign (>).
When input lands in an HTML attribute and there’s filtering of greater than character (>), it’s not possible to break out of the current tag like in the previous case.


Always look to the attribute value (Double Quotes) or (Single Quotes) then add the payload
---------------------------------------------------------------
HTML Injection - Source
Use when input lands as a value of the following HTML tag attributes: href, src, data, or action (also formaction). The second one is exclusive to script tags.
---------------------------------------------------------------
HTML Injection – Script Breakout
Use when input lands anywhere within a script block. The vectors make use of the native (since input lands in the middle of a script block) to close the injected script.
---------------------------------------------------------------
Multi Reflection HTML Injection - Double Reflection (Single Input)
Use to take advantage of multiple reflections on the same page. They also have attribute-breaking capabilities with a double quote for most common scenarios.
---------------------------------------------------------------
Multi Reflection i HTML Injection - Triple Reflection (Single Input)
Use to take advantage of multiple reflections on the same page.
---------------------------------------------------------------
Multi-Input Reflections HTML Injection - Double & Triple
Use to take advantage of multiple input reflections on the same page. Also useful in HPP (HTTP Parameter Pollution) scenarios, where there are reflections for repeated parameters. 4th payload makes use of comma-separated reflections of the same parameter.
---------------------------------------------------------------
Multi-Input Reflections HTML Injections - JSON Encode Bypass
Use to take advantage of multiple input reflections on the same page. Useful when the 1st reflection has no execution potential and the 2nd reflection is on JSON encoded Javascript block. Vectors for parameters “p” and “q” and for “pq” which means just one parameter reflecting in those 2 different places of the code.
---------------------------------------------------------------
Multi Reflection HTML Injection - Alert Reuse
A vector that reflects at least twice in which the payload alert(1) is also the HTML tag or element. 2nd payload fires without user interaction.
---------------------------------------------------------------
HTML Injection – Escaped Quote Filter Bypass
Use when quotes are escaped with a backslash (" or ') in HTML context. Escaping quotes in an HTML Context is useless to prevent the breakout but changes the vector in a way that can fool filters and WAFs.
---------------------------------------------------------------
Markdown Vector
Use in text boxes, comment sections, etc that allows some markup input. Click to fire.
---------------------------------------------------------------
CommonMark Vectors
Use in text boxes, comment sections, etc that allows some markup (CommonMark-like) input. Click to fire.
---------------------------------------------------------------
Onscroll Universal Vector
That vector fires without user interaction using the onscroll event handler. It works with address, blockquote, body, center, dir, div, dl, dt, form, li, menu, ol, p, pre, ul, and h1 to h6 HTML tags.
---------------------------------------------------------------
Type Juggling
Use to pass an “if” condition matching a number in loose comparisons.
---------------------------------------------------------------
SQLi Error-Based Vector
Use in endpoints where a SQL error message can be triggered (with a quote or backslash).
---------------------------------------------------------------
PATH Based - XSS Injection
---------------------------------------------------------------
PHP_SELF HTML Injection
Use when the current URL is used by PHP code as an “action” attribute of an HTML form. Inject between php filename and the start of URL query (?) using a leading slash (/)
---------------------------------------------------------------
URL Reflection HTML Injection in PHP
When the URL is reflected somehow in the source code, we can add our own XSS vector/payload to it. For PHP pages it’s possible to add anything in the URL after the page name (without changing it) with the use of a slash character (/).
try Endpoint: .php/"><svg onload=alert(1)>
try Endpoint: .htm/"><svg onload=alert(1)>

---------------------------------------------------------------
HTML Injection in JSP Path
try Endpoint: .jsp/"><svg onload=alert(1)>
try Endpoint: .do/"><svg onload=alert(1)>
try Endpoint: .htm/"><svg onload=alert(1)>
Use in JSP-based applications in the path of URL.
---------------------------------------------------------------
Vectors Exclusive for ASP Pages
try Endpoint: .asp/"><svg onload=alert(1)>
try Endpoint: .htm/"><svg onload=alert(1)>
Use to bypass <[alpha] filtering in .asp pages.
XSS in ASP pages reflected inside span and < blocked
---------------------------------------------------------------
Vectors Exclusive for ASP Page - Percentage Padding
Use to bypass <[alpha] and keyword filtering in .asp pages.
---------------------------------------------------------------
Body Vectors
A collection of body vectors.
---------------------------------------------------------------
Weird XSS vectors
Just some odd/weird vectors that I don’t see mentioned often.
---------------------------------------------------------------
Less Known XSS Vectors
A collection of less-known XSS vectors.
---------------------------------------------------------------
Mixed Case Bypass
Use to bypass case-sensitive filters.
---------------------------------------------------------------
Unclosed Tags
Use to avoid filtering based on the presence of both lower than (<) and greater than (>) signs. It requires a native greater than sign in source code after input reflection.
---------------------------------------------------------------
Uppercase Vector
Use when the application reflects input in uppercase. Replace “&” with “%26” and “#” with “%23” in URLs.
---------------------------------------------------------------
Extra Content for Script Tags
Use when the filter looks for “<script>” or “<script src=...” with some variations but without checking for other non-required attributes.
---------------------------------------------------------------
Fake Tags
Just some HTML vectors to try to fool filters.
---------------------------------------------------------------
Fake Twin Tags
Some HTML vectors try to fool filters using the same attribute for the real and the fake tag.
---------------------------------------------------------------
Alert without Parentheses – HTML Entities
Use only in HTML injections when parentheses are not allowed. Replace “&” with “%26” and “#” with “%23” in URLs.
---------------------------------------------------------------
PHP Email Validation Bypass
Use to bypass the FILTER_VALIDATE_EMAIL flag of PHP’s filter_var() function.
---------------------------------------------------------------
Second-order HTML Injection
Use when your input will be used twice like stored normalized in a database and then retrieved for later use or inserted into DOM.
---------------------------------------------------------------
Other SVG Vectors with Event Handlers
Use against blacklists.
---------------------------------------------------------------
Vectors without Event Handlers
Use as an alternative to event handlers, if they are not allowed. Some require user interaction as stated in the vector itself (also part of them).
---------------------------------------------------------------
Vectors with Agnostic Event Handlers > Bypass Filter HTML Tag
Use the following vectors when all known HTML tag names are not allowed. Any alphabetic char or string can be used as a tag name in place of “k”. They require user interaction as stated by their very text content (which makes part of the vectors too) except the last ones.
---------------------------------------------------------------
Vector Without Alert - Eval + URL
Use as an alternative to call alert, prompt, and confirm. The first payload is the primitive form while the second replaces eval with the value of the id attribute of the vector used. URL must be in one of the following ways, in the URL path after the PHP extension or in a fragment of the URL, except in the last vector (it already has its payload). Plus sign (+) must be encoded in URLs.
---------------------------------------------------------------
Vector without Parentheses, Backticks or Entities
Use as alternative to alert(1), alert1 or HTML Entities versions of those.
1 or HTML Entities versions of those.---------------------------------------------------------------
SVG Vectors without Event Handlers
Use to avoid filters looking for event handlers or src, data, etc. The last one is Firefox only, already URL encoded.
---------------------------------------------------------------
Using Attributes to Store Strings
The following vectors make use of the mandatory attribute to store the address of the import() function. Since it returns a valid image, “onload” is used instead of “onerror” in the 2nd vector below.
---------------------------------------------------------------
Agnostic Event Handlers Vectors – CSS3 Based
Vectors with event handlers that can be used with arbitrary tag names useful to bypass blacklists.
---------------------------------------------------------------
Vectors for Fixed Input Length
Use when input must have a fixed length like in most common following hashes.
---------------------------------------------------------------
Inner & Outer HTML Properties Alternative
These last vectors make use of innerHTML and outerHTML properties of elements to get the same result as the location ones. But they require to creation of a complete HTML vector instead of a “javascript:alert(1)” string. The following collections of elements can be used here with index 0 to make it easier to follow: all[0], anchors[0], embeds[0], forms[0], images[0], links[0], and scripts[0]. They all can replace the head or body elements used below.
Last updated