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
https://forums.phpfreaks.com/topic/181038-xss-attacks/
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
https://forums.phpfreaks.com/topic/181038-xss-attacks/#findComment-955216
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
https://forums.phpfreaks.com/topic/181038-xss-attacks/#findComment-955220
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
https://forums.phpfreaks.com/topic/181038-xss-attacks/#findComment-955225
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.