[ Home ] [ Slides ] [ Examples ] [ Exercises ] [ Resources ]

Exercise Cross Site Scripting - XSS (Solutions)

Try some XSS examples

You had to try the following examples:

Write your own Cross Site Scripting

Reflected XSS in an e-mail

You have to use an email editor that allows HTML emails. Then you write something that looks like the following file:
reflected.php (source)
Here are the most important features:

Stored XSS

Write a Stored-XSS attack (means add a new line in your guestbook that contains this attack) that changes the action of your search form and sends the information to another site that redirects finally to the right page (quite similar to the example for the login in the xss examples page).
Unfortunately, if the message (the one containing XSS) isn't displayed anymore. Since this message contains the javascript, it won't be executed anymore. If we want to let it execute, we have to insert in the redirect an instruction that can be used by a reflected XSS. But this starts to be complicated for an exercise.
Copyright Emmanuel Benoist 2008-2013