diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 9f09a67..4cde79f 100755 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -10,8 +10,9 @@ class AdminController < ApplicationController if params[:field].nil? fields = "*" else - #fields = params[:field].map {|k,v| k }.join(",") - fields = params[:field].map {|k,v| Analytics.parse_field(k) }.join(",") + fields = params[:field].map {|k,v| k }.join(",") + # This seems to be a bit safer + #fields = params[:field].map {|k,v| Analytics.parse_field(k) }.join(",") end if params[:ip] diff --git a/app/views/layouts/tutorial/injection/_injection_command.html.erb b/app/views/layouts/tutorial/injection/_injection_command.html.erb index 41d9dc4..b009cce 100644 --- a/app/views/layouts/tutorial/injection/_injection_command.html.erb +++ b/app/views/layouts/tutorial/injection/_injection_command.html.erb @@ -8,13 +8,13 @@
-
+

An OS command injection attack occurs when an attacker attempts to execute system level commands through a vulnerable application. Applications are considered vulnerable to the OS command injection attack if they utilize user input in a system level command. @@ -24,13 +24,13 @@

-
+

This manifestation of the bug occurs within the Benefits model. A system command is used to make a copy of the file the user has chosen to upload. User-supplied input is leveraged in creating this system command. @@ -81,13 +81,13 @@

-
+

Command Injection - ATTACK

@@ -139,13 +139,13 @@

-
+
Let's create a backup when uploading a file, wonder how they are naming it?
diff --git a/app/views/layouts/tutorial/injection/_sqli_scope.html.erb b/app/views/layouts/tutorial/injection/_sqli_scope.html.erb new file mode 100644 index 0000000..c9c131d --- /dev/null +++ b/app/views/layouts/tutorial/injection/_sqli_scope.html.erb @@ -0,0 +1,78 @@ +
+
+
+ A1 - SQL Injection - ActiveRecord Scope +
+
+
+
+
+ +
+
+

+ Insert +

+
+
+
+
+ +
+
+

+ Insert +

+
+
+
+
+ +
+
+

SQL Injection - ATTACK

+

+ insert +

+

SQL Injection - SOLUTION

+

+ insert +

+
+
+
+
+ +
+
+ insert +
+
+
+
+
+
\ No newline at end of file diff --git a/app/views/tutorials/injection.html.erb b/app/views/tutorials/injection.html.erb index 20f2167..2da3861 100755 --- a/app/views/tutorials/injection.html.erb +++ b/app/views/tutorials/injection.html.erb @@ -5,6 +5,11 @@ <%= render :partial => "layouts/tutorial/injection/injection_first"%>
+
+
+ <%= render :partial => "layouts/tutorial/injection/sqli_scope"%> +
+
<%= render :partial => "layouts/tutorial/injection/injection_command"%>