jamesxg1 Posted April 22, 2010 Share Posted April 22, 2010 Hiya! I know XSS is un-secure but I was wondering how I would code a XSS code, I have tried to Google it but there is nothing, all I am finding is XSS preventation. I was wondering if someone knows a tutorial or maybe if someone can show me an example of how to make an XSS script. Many thanks James. Quote Link to comment https://forums.phpfreaks.com/topic/199434-how-do-i-code-a-xss-script/ Share on other sites More sharing options...
jcbones Posted April 22, 2010 Share Posted April 22, 2010 You want a cross site code? <?php echo file_get_contents('http://www.google.com'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/199434-how-do-i-code-a-xss-script/#findComment-1046714 Share on other sites More sharing options...
Rustywolf Posted April 22, 2010 Share Posted April 22, 2010 Isnt XSS javascript? Its bascally just echoing something from the $_GET['function'] <?php echo $_GET['xss']; ?> Quote Link to comment https://forums.phpfreaks.com/topic/199434-how-do-i-code-a-xss-script/#findComment-1046717 Share on other sites More sharing options...
jcbones Posted April 22, 2010 Share Posted April 22, 2010 NO, XSS is cross site scripting. When someone talks about it, it usually involves some kind of injection attack. But, anytime you are including, or scraping pages from one site to another, it is cross scripting. Quote Link to comment https://forums.phpfreaks.com/topic/199434-how-do-i-code-a-xss-script/#findComment-1046720 Share on other sites More sharing options...
jamesxg1 Posted April 22, 2010 Author Share Posted April 22, 2010 Ah right I see, well I'm trying to make it so that I can provide my customers with a script on their own website without actually have to script, the script will be held on my server and I'm looking for a way for them to include it on their site. Many thanks James. Quote Link to comment https://forums.phpfreaks.com/topic/199434-how-do-i-code-a-xss-script/#findComment-1046722 Share on other sites More sharing options...
mrMarcus Posted April 22, 2010 Share Posted April 22, 2010 to clear things up, XSS is a way to inject malicious code (usually javascript, but not always) into a website/page. XSS is usually achieved by way of improperly secured form data, where a loser, i mean hacker/cracker/whatever, does something as simple as: <script>window.location="http://www.bad-site.com/";</script> into a comment box on a site. now, if the site does not handle (strip or convert entities) the incoming data from a form, that code will be executed each and every time a user reaches that page. now, a simple redirect is harmless in respect that things can get a lot worse, ie. cookie manipulation, etc. anyways, if you just want your users to access one file located on your server, just use include Quote Link to comment https://forums.phpfreaks.com/topic/199434-how-do-i-code-a-xss-script/#findComment-1046732 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.