Cookie Control

This site uses cookies to store information on your computer.

Some cookies on this site are essential, and the site won't work as expected without them. These cookies are set when you submit a form, login or interact with the site by doing something that goes beyond clicking on simple links.

We also use some non-essential cookies to anonymously track visitors or enhance your experience of the site. If you're not happy with this, we won't set these cookies but some nice features of the site may be unavailable.

(One cookie will be set to store your preference)
(Ticking this sets a cookie to hide this popup if you then hit close. This will not store any personal information)

About this tool

About Cookie Control

         

Secure Web 2.0 (& Drupal) Part 3

Tue, 05/26/2015 - 13:42 -- pottol
OWASP-TopTen2013

The solution: use Drupal and secure it.

a) Drupal vs OWASP Top Ten

 

https://d25m59h0ya0u4t.cloudfront.net/pub/uploadedImages/7554676OWASP.Top10.jpg

 

vulnerabilities and threats. CMS Security should be addressed.

 

A1 Injection

Injection flaws, such as SQL, OS, and LDAP injection occur when untrusted data is sent to an interpreter as part of a command or query. The attacker’s hostile data can trick the interpreter into executing unintended commands or accessing data without proper authorization.

SQL Injection: You shouldn't use data that you don't trust (as a feed, a user input, another database, etc) directly in a database query without escape it:

index.php?id=12 mysql_query("UPDATE mytable SET value = '". $value ."' WHERE id = ". $_GET['id']);

Instead you should use Drupal functions passing the user input as parameters:

db_query("UPDATE {mytable} SET value = :valueWHERE id = :id", array( ':value' => $value, ':id' => $id);

If you need to include dynamic table or column names in your query, you can use db_escape_table().

A2 Broken Authentication and Session Management

Application functions related to authentication and session management are often not implemented correctly, allowing attackers to compromise passwords, keys, or session tokens, or to exploit other implementation flaws to assume other users’ identities.

Apply the Drupal Solutions to common Auth and Session Issues:

 

Security Issue

Drupal Solution

Weak password storage and account management

Passwords are stored hashed

Session hijacking / fixation

Session IDs changed when permissions change

Lack of session timeout / logout

Drupal works with Apache's SSL transport

Modules to set certain URLs to use SSL

 

Comments