I am studying web application security penetration testing. The scenario is that in a test environment, a demo web application designed for practice, there is a vulnerability in cross-site scripting. I have an xss payload that is based on javascript:
<div style="width: expression(alert(/XSS/))"></div>
I know that expressions are not recommended with IE 8. It works fine in IE7. So, when I introduced the above payload, the web application returns with
<div></div>
Resets all other attributes and values. But when I change the payload like
<div style="width: expression'(alert(/XSS/))'">
An invalid payload means that it will not be executed. So, I am trying to find out if there is an alternative for defining an expression in a style attribute in a string, for example, if we can place something other than single_quote that does not break the code. Or, if there is any other way to execute javascript through a style attribute.
source share