diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb index 7854812..4de5cde 100755 --- a/app/controllers/tutorials_controller.rb +++ b/app/controllers/tutorials_controller.rb @@ -10,9 +10,19 @@ class TutorialsController < ApplicationController end def injection + end def xss + @code = %{ +
  • + + Welcome, <%= current_user.first_name.html_safe %> +
  • } end def broken_auth diff --git a/app/views/layouts/tutorial/_sidebar.html.erb b/app/views/layouts/tutorial/_sidebar.html.erb index 6b1f9f9..43a7e21 100755 --- a/app/views/layouts/tutorial/_sidebar.html.erb +++ b/app/views/layouts/tutorial/_sidebar.html.erb @@ -3,7 +3,7 @@
  • <%= link_to tutorials_path, :html => {:method => "get"} do %>
    - +
    Tutorial Home <% end %> diff --git a/app/views/tutorials/xss.html.erb b/app/views/tutorials/xss.html.erb index 2eba576..f204b72 100644 --- a/app/views/tutorials/xss.html.erb +++ b/app/views/tutorials/xss.html.erb @@ -20,7 +20,7 @@
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor + XSS flaws occur whenever an application takes untrusted data and sends it to a web browser without proper validation and escaping. XSS allows attackers to execute scripts in the victim’s browser which can hijack user sessions, deface web sites, or redirect the user to malicious sites.
    @@ -34,7 +34,10 @@
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor +

    Stored Cross-Site Scripting - The following code was taken from app/views/layouts/shared/_header.html.erb

    + +

    <%= @code %>

    +
    @@ -48,7 +51,10 @@
    - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor +

    Stored Cross-Site Scripting ATTACK:

    + +

    When registering, enter your JavaScript tag such as <%= %{