Merge branch 'dsprenkels/organization'
authorDaan Sprenkels <dsprenkels@gmail.com>
Mon, 21 Nov 2016 09:21:09 +0000 (10:21 +0100)
committerDaan Sprenkels <dsprenkels@gmail.com>
Mon, 21 Nov 2016 09:21:09 +0000 (10:21 +0100)
checklist/ASVS-checklist.xlsx
report/v2_authentication.tex
report/v7_cryptography.tex

index 4149d39..5d63682 100644 (file)
Binary files a/checklist/ASVS-checklist.xlsx and b/checklist/ASVS-checklist.xlsx differ
index 69d1d00..d2407c4 100644 (file)
@@ -241,20 +241,28 @@ e-mail or SMS should be a last resort and is known weak.
     e-mail, which is considered weak (but not unsafe).
 \end{result}
 
-\notapplicable{\item
+\item
+\fail{}
 Verify that account lockout is divided into soft and hard
 lock status, and these are not mutually exclusive. If an
 account is temporarily soft locked out due to a brute force
 attack, this should not reset the hard lock status.
 
-%     The application has not implemented any lockout mechanisms.
-}
+\begin{result}
+    The application has not implemented any lockout mechanisms.
+\end{result}
 
-\notapplicable{\item
+\item
+\pass{}
 Verify that if shared knowledge based questions (also
 known as ``secret questions'') are required, the questions
 do not violate privacy laws and are sufficiently strong to
-protect accounts from malicious recovery.}
+protect accounts from malicious recovery.
+
+\begin{result}
+    The application uses no shared knowledge based questions, and thus not
+    violate any privacy laws.
+\end{result}
 
 \item
 \fail{}
@@ -266,12 +274,15 @@ use of a configurable number of previous passwords.
     require variation in the use of different passwords.
 \end{result}
 
-\notapplicable{\item
+\item
+\pass{}
 Verify that risk based re-authentication, two factor or
-transaction signing is in place for high value transactions.}
+transaction signing is in place for high value transactions.
 
-% There are no (really) risk based action or which re-authentication would be
-% fit
+\begin{result}
+    There are no (really) risk based action or which re-authentication would be
+    fit.
+\end{result}
 
 \item
 \fail{}
@@ -283,36 +294,45 @@ commonly chosen passwords and weak passphrases.
     use some password strength estimator like \texttt{zxcvbn}\footnote{\url{https://github.com/dropbox/zxcvbn}}.
 \end{result}
 
+\notapplicable{
 \item
-\fail{}
+\fail{}
 Verify that all authentication challenges, whether
 successful or failed, should respond in the same average
 response time.
 
-\begin{result}
-    String comparisation for checking password hases and password reset tokens
-    are not in constant time.
-\end{result}
+% \begin{result}
+%     String comparisation for checking password hashes and password reset
+%     tokens are not in constant time.
+% \end{result}
+}
 
+\notapplicable{
 \item
-\fail{}
+\fail{}
 Verify that secrets, \API{} keys, and passwords are not
 included in the source code, or online source code
 repositories.
 
-\begin{result}
-    The database credentials are hard coded in \code{config.php}. These
-    credentials should ideally be passed using environment variables.
-\end{result}
+% \begin{result}
+%     The database credentials are hard coded in \code{config.php}. These
+%     credentials should ideally be passed using environment variables.
+% \end{result}
+}
 
 \setcounter{enumi}{30}
 
-\notapplicable{\item
+\item
+\fail{}
 Verify that if an application allows users to authenticate,
 they can authenticate using two-factor authentication or
 other strong authentication, or any similar scheme that
 provides protection against username + password
-disclosure.}
+disclosure.
+
+\begin{result}
+    No surch features are implemented.
+\end{result}
 
 \item
 \fail{}
index b7bef87..1a015f2 100644 (file)
 
 
   \addtocounter{enumi}{3}
-  \notapplicable{
     \item
+    \fail{}
     Verify that all random numbers, random file names, random \GUID{}s, and random
     strings are generated using the cryptographic module’s approved random
     number generator when these random values are intended to be not guessable
     by an attacker.
-  }
+    \begin{result}
+    The application uses \PHP{}'s \code{mt\_rand()} function to generate the
+      initial password. This function uses a Mersenne Twister and does not
+      generate cryptographically secure values.
+    \end{result}
+
 
     \item
     \fail{}
     Verify that cryptographic algorithms used by the application have been
     validated against FIPS 140{-}2 or an equivalent standard.
     \begin{result}
+    \begin{itemize}[leftmargin=*]
+      \item
     The application uses MD5 for password hashing, which is insecure by current
-    standards
+      standards of FIPS 140{-}2.
+      \item
+    The application uses \code{crypt()} for passwords, and does not supply a
+       salt in these cases. This means \PHP{} will use DES{-}based algorithm,
+       which is insecure by the current standard of FIPS 140{-}2.
+    \end{itemize}
     \end{result}
 
-  \notapplicable{
+  \notapplicable{%
     \item
     Verify that cryptographic modules operate in their approved mode according
     to their published security policies.
   }
 
-  \notapplicable{
     \item
+    \fail{}
     Verify that there is an explicit policy for how cryptographic keys are
     managed (e.g., generated, distributed, revoked, and expired). Verify that
     this key lifecycle is properly enforced.
-  }
+    \begin{result}
+      There is no such policy. The unique application key that is used to sign
+      passwords in generated by \code{mt\_rand()}, which is insuitable for
+      generating cryptographically secure values. The lifecycle of this key is
+      unlimited.
+    \end{result}
+
 
   \addtocounter{enumi}{1}
-  \notapplicable{
+  \notapplicable{%
     \item
     Verify that all consumers of cryptographic services do not have direct
     access to key material. Isolate cryptographic processes, including master
     (HSM).
   }
 
-  \notapplicable{
     \item
+    \fail{}
     \textit{Personally Identifiable Information} should be stored encrypted at
     rest and ensure that communication goes via protected channels.
-  }
+    \begin{result}
+      The information stored consists of an email address, the user's real
+      name and a biography. All of these are stored in the database unencrypted.
+    \end{result}
 
-  \notapplicable{
     \item
+    \fail{}
     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?
-  }
+    \begin{result}
+      This does not happen anywhere, any passwords submitted to the application
+      will stay in memory for an undefined amount of time.
+    \end{result}
 
-  \notapplicable{
     \item
+    \pass{}
     Verify that all keys and passwords are replaceable, and are generated or
     replaced at installation time.
-    % FIXME(dsprenkels) This *is* relevant (passwords)
-  }
+    \begin{result}
+      All users can replace their password in their profile. Note that there is
+      no `confirmation field' which makes it easy to change an password to an
+      unintended value.
+    \end{result}
 
-  \notapplicable{
+  \notapplicable{%
     \item
     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}