CSS injection: what's the worst that can happen?

不想你离开。 提交于 2019-12-30 00:50:13

问题


We are doing a security evaluation.

There is a chance that a malicious user can inject arbitrary CSS into another user's web pages, although we are not sure it can actually be exploited.

I understand he could totally change the page look, even causing nothing to be displayed at all. Is that all? What is the worst that could happen? Can JavaScript be embedded in CSS? Can he "steal" the other user's cookies? And initiate another session?


回答1:


Take a look here:

  • Ultimate XSS CSS injection
  • HTML/CSS Injections - Primitive Malicious Code (or, What’s the worst that could happen?)
  • XSS Prevention Cheat Sheet on OWASP



回答2:


Yes to all of the above. Injection of arbitrary CSS can lead to javascript execution. Look at:

  • XSS Cheat Sheet

The worst thing that could happen is dependent on the environment. In some cases stealing a session cookie and accessing the users session maybe the worst thing to happen (e.g., banks, online stock trading) this may not be the case for your situation. Other examples of attacks would be gaining control of the browser, gaining access to the client's machine, etc.



来源:https://stackoverflow.com/questions/718611/css-injection-whats-the-worst-that-can-happen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!