Web Application Attack: Cross site scripting (aka XSS)

Reflected XSS

Reflected XSS is a technique that uses the web server’s domain and attached your own script onto the domain; the attacker then uses this link and sends to unsuspected user, once the user clicked on the link the script is executed by user’s browser.

Test for XSS

If xss is positive a popup will appear. WordPress has prevention against xss hence I cannot write down the script tags.

This means the site is vulnerable to xss.

Preparing a link that attaches attacker’s script

The attacker sets up a fake site that is a trusted site to victim. The attacker crafts an email that looks convincing and sends to a victim.

Victim unwittingly clicked on run.

A meterpreter session was created on Attacker's machine.

About reflected xss attack

Modern browser stops xss effectively, the lab demonstration was successful with Winxp IE6.0. Using IE8.0 and higher version of IE, Chrome and Firefox can stop script from being executed by the browser. Noscript add-on is a good add-on for your firefox browser.

Stored XSS

Stored xss is a technique where the script is stored in the web server, whenever a user’s browser visits the web server, the script is executed by victim’s browser.

The attacker planted the script onto the web server.

script was planted. from now on, whomever click on the site the script will be sent to victim's browser and if the browser has no protection against script execution the victim's browser will simply execute the script.

A victim visited the blog and the victim's browser executed the script.

Conclusion

To prevent xss as a web user, you should use Google Chrome or Chromium browser, the Google Chrome browser is excellent in suppressing script execution. If you are using firefox, new firefox version also stop suspected script execution however I would recommend you to use Noscript add-on.

Advertisements
This entry was posted in Security, Vulnerability Assessment and Pentest and tagged , , , , , , . Bookmark the permalink.

One Response to Web Application Attack: Cross site scripting (aka XSS)

  1. Pingback: Web Application Attack: Cross site scripting (aka XSS)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s