Jump to content

XSS attacks


mikesta707

Recommended Posts

Ok, I kind of understand what they are. Cross site scripting attacks, and they involve malicious code and yada yada yada

 

But at the same time, I have no clue what XSS attacks are. Anyone willing to explain them? or show me a site that explains them pretty well?

 

 

 

you can't yada yada sex...

Link to comment
Share on other sites

Say you had a site that people could post comments on and you don't check for certain tags or entities.  If I wrote a comment that included:

 

<br />
window.location=&#039;http://www.google.com&#039;;<br />

 

Then every time a user saw my comment, assuming they have JS enabled, they would be redirected to Google.  This is just a simple example, but you can imagine what sort damage you could do by executing certain code.

Link to comment
Share on other sites

It's right in the acronym, although the X is a bit tricky.  Cross (X) Site (S) Scripting (S).

 

Break it down:

 

"Cross Site"  I'm on your site, but somehow I ended up running code from another site.

 

"Scripting" -- ie. it's javascript/clientside code that is executing. 

Link to comment
Share on other sites

I see, are these similar to javascript injections? are they the same thing? Or is the Javascript added to the page itself (in the source)?

 

It's the same thing. Really you could inject any HTML to an XSS vulnerable page, but injecting Javascript is the by far most common attack vector.

 

Say for instance a login page was vulnerable. You could use XSS to harvest credentials by adding an onsubmit event to the form that submits the form data to an external script that logs it. You could also steal people's cookies unless they're set to HTTP only.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.