Cross Site Scripting
Last updated
Last updated
Application instead of encoding the input data, treats the input data provided by the user as HTML / JavaScript code which leads to possibility of injecting malicious scripts to the website.
In this way attacker can deliver the script to the victim which when executed can perform any action as targeted user (e.g. steal his session cookie).
The most frequently used character to test for XSS injection:
As mentioned in the previous chapter attacker is able to steal victim's session cookie with Cross Site Scripting (if cookie is not protected with Http Only flag). Below there can be found step by step process how attacker can perform this attack.
Sometimes as attackers we have to bypass the input filters which forces us to compress the JavaScript code with JSCompress.
Convert it into CharCode using the following JavaScript code:
Execute the encoded payload: