Description
This lab will introduce you to browser-based attacks, as well as to how one might go
about preventing them.
When working on the exercises, you may find the following hints and tools useful:
Firefox Developer Tools which can be accessed by pressing Ctrl-Shift-I in the
browser.
The Console tab contains the Javascript console, which lets you see which
exceptions are being thrown and why. You can print debug information to the
console using console.log() function.
The Inspector and Element Picker (arrow icon on the top-left in the
developer toolbox) let you peek at the structure of the page and the
properties and methods of each node it contains.
The Network tab lets you see the requests sent by the browser and the server
responses. These include cookies, HTTP headers and form data.
In Firefox 44, these tabs should be enabled by default in the developer toolbox.
If you don’t see them, adjust the ‘Default Firefox Developer Tools’ and ‘Available Toolbox
Buttons’ preferences in the developer toolbox options.
You may need to use CSS to make your attacks invisible to the user. You should
know what basic syntax like
means, and you should feel free to use stealthy attributes like style=”display:
none; visibility: hidden; height: 0; width: 0; position: absolute”
in the HTML of your attacks. Beware that frames and images may behave
strangely with display: none, so you might want to use visibility: hidden
instead. For instance, to create a hidden iframe, try