If I blocked Javascript to be executed. Then what are the ways by which XSS can occur and what are possible threats in case of intranet application.
|
|
Lets say an application was using the Content Security Policy properly, and an attacker could inject HTML, but is unable to get JavaScript to execute. A good paper on this attack scenario is Postcards from the post-xss world, and one of the attacks that is described is using "dangling markup injection". In this attack, the goal is to read a CSRF token on the page using a partial
|
|||||
|
|
If you take OWASPs definition of XSS very strictly I would say no it's not possible:
unless you are using some other type of client side script. That said, you could still be vulnerable to HTML Injection, which is closely related to XSS. With this type of attack someone could potentially craft an attack such as injecting a form that requested credentials and submitted to a malicious server. |
|||
|
|
|
Many attack scenarios remain possible. The definitive resources on HTML injection attacks without Javascript are:
Those two papers mention many possible attacks, including:
These attacks and many more are described in the papers cited above. For information about web security, I recommend the following book:
In the future, when you have questions about obscure aspects of web security, that'd be the first resource I'd recommend you check. It's chock-full of great nuggets and wise advice. For this particular question, see also http://security.stackexchange.com/a/1491/971. |
|||
|
|
|
Even if the client browser does not allow scripts to run. An attacker can still modify the DOM by injecting HTML tags. Some possible examples...
Note that stealing the session cookie is not the only risk associated with xss attacks.. A fake login form loaded inside an iframe can also do a lot of damage |
||||
|
|