XSS is a widely used method among search engine spammers (At least it was a couple of months ago.)
In this crash course I will try to explain what is XSS, how to find XSS vulnerabilities, how to protect your sites from XSS and the most important part… How to profit from it ![]()
What is XSS?
Inserting HTML/JavaScript into a site truth vulnerable user input. For example, a search form, a comment box or even a “submit story feature“.
Real World Scenario
Imagine that you are surfing a really cool site (For example this one) and you want to submit it to your bookmarking site like Digg or Reddit. Let’s say that you are using Kudos.no for your bookmarks. So you click on the “submit it icon” and you get redirected to:
http://www.kudos.no/nysak/?kudosKnapp=1&url=anysite.com
If you take a look at that site, there is a form with the URL you want to submit.
Now let’s try another URL:
http://www.kudos.no/nysak/?kudosKnapp=1&url=othersite.com
As you can see, the &url parameter is inserted automatically in the form. Here is part of the HTML source code of that form:
1 | <input type="text" name="storyLink" id="storyLink" value="http://somesite.com" /> |
Everything seems OK, right? Now this is what is happening on the backend of the site:
1 2 3 4 5 | <?php $story = $_GET['url']; //some code print '<input type="text" name="storyLink" id="storyLink" value="'.$story.'" />'; //more code ?> |
Everything you send in the &url parameter is being printed in that <input> tag, and without the proper sanitization that is a very bad idea. Here is why it’s a bad idea:
http://www.kudos.no/nysak/?kudosKnapp=1&url=http://somesite”><script>alert(”XSS”)</script>
As you can see, instead of just sending an URL, we are sending HTML too. Here is the source code of the page:
1 | <input type="text" name="storyLink" id="storyLink" value="http://somesite"><script>alert("XSS")</script>" /> |
Did you saw the alert pop-up? You have successfully injected your own JavaScript!
I’m working on Part II, meanwhile you can keep reading about XSS in this blog.
Lots of good blackhat techniques and tools featured. XSS Crash Course is an excellent post.
What I liked most about this post is how you not only talked about making money but how to protect your sites from xss.
Everyone should bookmark this site because we all know busin3ss is on spam 2.0 going on 3.
Congrats!
webguy332
how worth links from xss are?
how implement xss for increase link popularity, blog&ping the xss links, submit xss links to directory?
it is a damn great blog!!
http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
use above to easy url encoding
Nice post - just off to read more!
As another poster says this helps people on both sides! Personally I’m be looking to protect my sites from any possible exploits.
Great blog btw,
Si
Hello! Good Site! Thanks you! babveqrmambudy
hey thanks for the course, its great. It would be nice to know when and where you can recognize an exploitable site.
thx