Merge branch 'master' of gitlab.science.ru.nl:mlubbers/ssproject1617
authorDaan Sprenkels <dsprenkels@gmail.com>
Wed, 16 Nov 2016 11:16:40 +0000 (12:16 +0100)
committerDaan Sprenkels <dsprenkels@gmail.com>
Wed, 16 Nov 2016 11:16:40 +0000 (12:16 +0100)
report/preamble.tex
report/v11_httpsec.tex
report/v2_authentication.tex
report/v3_session.tex
report/v4_access.tex
report/v5_input.tex
report/v7_cryptography.tex
report/v8_error.tex

index 0e1a1ce..03b12fd 100644 (file)
@@ -66,7 +66,7 @@
 
 
 % Reference naar de source
-\newcommand{\srcref}[2]{{\small\texttt{#1}} (line (s) #2)}
+\newcommand{\srcref}[2]{{\small\texttt{#1}} (line(s) #2)}
 
 % Pass en fail
 \newcommand{\pass}{{\large\ding{51}}}
index 4fb8da8..186dccb 100644 (file)
@@ -37,7 +37,8 @@ viewed in a 3rd-party X-Frame.
 \begin{result}
     The application will never supply an \code{X-FRAME-OPTIONS} header. While
     this is not really a problem for the home page, a 3rd party X-Frame should
-    not be able to refer to the administrative interfaces of the application.
+    not be able to refer to the administrative interfaces of the application
+    and this should be fixed.
 \end{result}
 
 \item\pass{}
index 74875af..57a210e 100644 (file)
@@ -199,7 +199,8 @@ attacks.
         \item Email validation, to harden brute force email address discovery
         \item Installation database check, to prevent guessing attacks for the database password
         \item Login, to prevent login guessing
-        \item And comment submission, to prevent spam, phishing et cetera (by using CAPTCHA).
+        \item And comment submission, to prevent spam, phishing et cetera (by
+        using some CAPTCHA software).
     \end{itemize}
 \end{result}
 
@@ -275,7 +276,7 @@ commonly chosen passwords and weak passphrases.
 
 \begin{result}
     No password strengthening measures are implemented. The app should
-    use some password strength estimator like \code{zxcvbn}.
+    use some password strength estimator like \texttt{zxcvbn}\footnote{\url{https://github.com/dropbox/zxcvbn}}.
 \end{result}
 
 \item
index d1a02b4..18f106a 100644 (file)
     Verify the user is prompted with the option to terminate all other active
     sessions after a successful change password process.
     \begin{result}
-    There is no such option, also notqeable is that there is no confirmation for
+    There is no such option, also notaeable is that there is no confirmation for
       the password change.
     \end{result}
 
index 45b7515..8975299 100644 (file)
@@ -94,13 +94,15 @@ Fail, because the role and distinct user systems are stubs.
 \end{result}
 
 \item
-\pass{}
+\fail{}
 Verify that all user and data attributes and policy
 information used by access controls cannot be
 manipulated by end users unless specifically authorized.
 
 \begin{result}
-This item is the main remaining security concern. I haven't found any obvious fail in the login system, but given the architecture and security status of the whole \CMS{}, I'm not very sure of it.
+This item is the main remaining security concern, as the login form allows SQL
+injections that are capable to alter any information stored in the database.
+This is described in more detail in item V2.6 on page~\pageref{auth:6}.
 \end{result}
 
 \notapplicable{
index 4eb09e4..5e81429 100644 (file)
@@ -11,7 +11,7 @@
 
        % They skip 5.2
        \addtocounter{enumi}{1}
-       \item\fail{} Verify that server side input validation failures result in 
+       \item\fail{} Verify that server side input validation failures result in
                request rejection and are logged.
 
                \begin{result}
@@ -78,7 +78,7 @@
 
        \item\pass{} Verify that the application is not susceptible to common
                \XML{} attacks, such as XPath query tampering, \XML{} External Entity
-               attacks, and \XML{} injection attacks. 
+               attacks, and \XML{} injection attacks.
 
                \begin{result}
                No \XML{} or related techniques are used and thus the application is
                against a defined schema including allowed characters, length and
                pattern (e.g.\  credit card numbers or telephone, or validating that two
                related fields are reasonable, such as validating suburbs and zip or
-               post codes match). 
+               post codes match).
 
                \begin{result}
                Email addresses are validated against \PHP's stander functionality.
                \begin{CJK}{UTF8}{min}ねこ\end{CJK} or O'Hara)
 
                \begin{result}
-               Emailaddresses with non-ASCII characters are rejected. Unicode
+               Email addresses with non-ASCII characters are rejected. Unicode
                characters are displayed correctly.
                \end{result}
 
        \item\fail{} Make sure untrusted \HTML{} from WYSIWYG editors or similar are
                properly sanitized with an \HTML{} sanitizer and handle it
-               appropriately according to the input validation task and encoding task. 
+               appropriately according to the input validation task and encoding task.
 
                \begin{result}
                This is not the case, any \HTML{} is allowed.
                ensure that \HTML{} sanitization is enabled instead.
 
                \begin{result}
-               See previous item.
+               Just as with the previous item, any \HTML{} is allowed.
                \end{result}
 
        \item\pass{} Verify that data transferred from one DOM context to another,
index da88237..4d32911 100644 (file)
   }
 
     \item
-    \TODO{}
     Verify that cryptographic algorithms used by the application have been
     validated against FIPS 140{-}2 or an equivalent standard.
     \begin{result}
-    The application uses md-5 for password hashing, which should be insecure by
+    The application uses MD5 for password hashing, which should be insecure by
       now.
     \end{result}
 
     Verify that sensitive passwords or key material maintained in memory is
     overwritten with zeros as soon as it no longer required, to mitigate memory
     dumping attacks.
+    % FIXME(dsprenkels) Passwords should be zero'd?
   }
 
   \notapplicable{
     \item
     Verify that all keys and passwords are replaceable, and are generated or
     replaced at installation time.
+    % FIXME(dsprenkels) This *is* relevant (passwords)
   }
 
   \notapplicable{
@@ -76,6 +77,8 @@
     Verify that random numbers are created with proper entropy even when the
     application is under heavy load, or that the application degrades gracefully
     in such circumstance.
+    % FIXME(dsprenkels) This *is* relevant: password generation of the admin
+    %                   password in the install script uses a Mersenne twister!
   }
 
 \end{enumerate}
index e6b2776..200fd44 100644 (file)
@@ -1,28 +1,28 @@
 \begin{enumerate}[label={V8.\arabic*}]
-       \item\fail{} Verify that the application does not output error 
-               messages or stack traces containing sensitive data 
-               that could assist an attacker, 
-               including session id, 
-               software/framework versions and personal 
+       \item\fail{} Verify that the application does not output error
+               messages or stack traces containing sensitive data
+               that could assist an attacker,
+               including session id,
+               software/framework versions and personal
                information.
 
                \begin{result}
-               Disabled by default but there is no way to enable error logging 
+               Disabled by default but there is no way to enable error logging
                without outputting detailed error information. \emph{PDOException::getMessage}
                is directly logged to the specified logging target (user or logfile).
                \end{result}
-       
-       \item\pass{} Verify that error handling logic in security controls 
+
+       \item\pass{} Verify that error handling logic in security controls
                denies access by default.
 
                \begin{result}
-               The limited number of errors actually handled do block access. 
+               The limited number of errors actually handled do block access.
                The software passes this check, this however is a side effect of limited error handling.
                \end{result}
-       
-       \item\fail{} Verify security logging controls provide the ability 
-               to log success and 
-               particularly failure events that 
+
+       \item\fail{} Verify security logging controls provide the ability
+               to log success and
+               particularly failure events that
                are identified as security-relevant.
 
                \begin{result}
                Only actual crashes/unrecoverable errors are logged.
                Failed/unauthorized installation attempts won't get logged either.
                \end{result}
-       
-       \item\fail{} Verify that each log event includes necessary 
-               information that would allow for a detailed 
-               investigation of the timeline when an event 
+
+       \item\fail{} Verify that each log event includes necessary
+               information that would allow for a detailed
+               investigation of the timeline when an event
                happens.
 
                \begin{result}
-               Log information is very minimal and doesn't include the date and time unless it's part of the exception message. 
+               Log information is very minimal and doesn't include the date and time unless it's part of the exception message.
                Only information available regarding the moment an error occoured is the date used as the log filename.
                \end{result}
-       
+
        \item\pass{} Verify that all
-               events that include untrusted data 
-               will not execute as code in the intended log 
+               events that include untrusted data
+               will not execute as code in the intended log
                viewing software.
 
                \begin{result}
                Plaintext logfiles are used and if any data injected into the logfile ends up being executed this would be a security flaw of the text editor used as a viewer.
                \end{result}
-       
-       \item\pass{} Verify that security logs are protected from 
+
+       \item\pass{} Verify that security logs are protected from
                unauthorized access and modification.
 
                \begin{result}
                because the log files are part of the main program directory.
                Clear documentation which warns users about this behavior is missing.
                \end{result}
-       
-       \item\pass{} Verify that the application does not log 
-               sensitive 
-               data as defined under local privacy laws or 
-               regulations, organizational sensitive data as 
-               defined by a risk assessment, or sensitive 
-               authentication data that could assist an attacker, 
-               including user's session identifiers, passwords, 
-               hashes, or AP
-               I tokens.
+
+       \item\pass{} Verify that the application does not log
+               sensitive
+               data as defined under local privacy laws or
+               regulations, organizational sensitive data as
+               defined by a risk assessment, or sensitive
+               authentication data that could assist an attacker,
+               including user's session identifiers, passwords,
+               hashes, or API tokens.
 
                \begin{result}
                The application itself does not log any usernames/passwords.
                could append sensitive data to the exception message.
                Documentation suggesting users should verify that the database driver they end up using doesn't include sensitive data in exception messages is absent.
                \end{result}
-       
-\notapplicable{\item Verify that all non-printable symbols and field 
-               separators are properly encoded in log entries, to 
+
+\notapplicable{\item Verify that all non-printable symbols and field
+               separators are properly encoded in log entries, to
                prevent log injection.}
 
-\notapplicable{\item Verify that log fields from trusted and untrusted 
+\notapplicable{\item Verify that log fields from trusted and untrusted
                sources are distinguishable in log entries.}
-       
+
        \item\fail{} Verify that an audit log or similar allows for non-repudiation of key transactions.
 
                \begin{result}
                It's not possible to retreive the IP address from which a password reset has been issued.
                Only potential requests are logged even before it's verified such an action exists.
                \end{result}
-       
-\notapplicable{\item Verify that security logs have some form of 
-               integrity checking or controls to prevent 
+
+\notapplicable{\item Verify that security logs have some form of
+               integrity checking or controls to prevent
                unauthorized modification.}
-       
-\notapplicable{\item Verify that the 
-               logs are stored on a different 
-               partition than the application is running with 
+
+\notapplicable{\item Verify that the
+               logs are stored on a different
+               partition than the application is running with
                proper log rotation.}
-       
-       \item\fail{} Time sources should be synchronized to ensure 
+
+       \item\fail{} Time sources should be synchronized to ensure
                logs have the correct time.
 
                \begin{result}
-               Time information is not inserted into log messages. 
+               Time information is not inserted into log messages.
                The actual log files however are named after the current system date, this gives a precision of 24 hours.
                \end{result}
 \end{enumerate}