3 \label{section:IPSECgeneral}
5 % ciphersuites current 2013-12-09
8 \item[Settings:] \mbox{}
10 \paragraph*{Assumptions}\mbox{}\\
12 We assume the use of IKE (v1 or v2) and ESP for this document.
14 \paragraph*{Authentication}\mbox{}\\
16 IPSEC authentication should optimally be performed via RSA signatures,
17 with a key size of 2048 bits or more. Configuring only the trusted CA
18 that issued the peer certificate provides for additional protection
19 against fake certificates.
21 If you need to use Pre-Shared Key authentication:
24 \item Choose a \textbf{random}, \textbf{long enough} PSK (see below)
25 \item Use a \textbf{separate} PSK for any IPSEC connection
26 \item Change the PSKs regularily
29 The size of the PSK should not be shorter than the output size of
30 the hash algorithm used in IKE \footnote{It is used in a HMAC, see
31 RFC2104\cite{rfc2104}.}.
33 For a key composed of upper- and lowercase letters, numbers, and two
34 additional symbols\footnote{64 possible values = 6 bits},
35 table~\ref{tab:IPSEC_psk_len} gives the minimum lengths in characters.
42 IKE Hash & PSK length \\
50 \label{tab:IPSEC_psk_len}
53 \paragraph*{Cryptographic Suites}\mbox{}\\
55 IPSEC Cryptographic Suites are pre-defined settings for all the items
56 of a configuration; they try to provide a balanced security level and
57 make setting up VPNs easier.
58 \footnote{RFC6379\cite{rfc6379}, RFC4308\cite{rfc4308}}
60 When using any of those suites, make sure to enable ``Perfect Forward
61 Secrecy`` for Phase 2, as this is not specified in the suites. The
62 equivalents to the recommended ciphers suites in section
63 \ref{section:recommendedciphers} are shown in
64 table~\ref{tab:IPSEC_suites}.
69 \begin{tabular}{p{2.5cm}p{2.5cm}l}
71 Configuration A & Configuration B & Notes\\
73 \verb|Suite-B-GCM-256| &
74 \verb|Suite-B-GCM-128| \newline
76 & All Suite-B variants use NIST elliptic curves\\
79 \caption{IPSEC Cryptographic Suites}
80 \label{tab:IPSEC_suites}
83 \paragraph*{IKE or Phase 1}\mbox{}\\
85 Alternatively to the pre-defined cipher suites, you can define your
86 own, as described in this and the next section.
88 IKE or Phase 1 is the mutual authentication and key exchange phase;
89 table~\ref{tab:IPSEC_ph1_params} shows the parameters.
91 Use only ``main mode``, as ``aggressive mode`` has known security
92 vulnerabilities \footnote{\url{http://ikecrack.sourceforge.net/}}.
99 & Configuration A & Configuration B \\
101 Mode & Main Mode & Main Mode \\
102 Encryption & AES-256 & AES, CAMELLIA (-256 or -128) \\
103 Hash & SHA2-* & SHA2-*, SHA1 \\
104 DH Group & Group 14--18, 19--21 & Group 14--21 \\
105 % Lifetime & \todo{need recommendations; 1 day seems to be common
109 \caption{IPSEC Phase 1 parameters}
110 \label{tab:IPSEC_ph1_params}
113 \paragraph*{ESP or Phase 2}\mbox{}\\
115 ESP or Phase 2 is where the actual data are protected; recommended
116 parameters are shown in table \ref{tab:IPSEC_ph2_params}.
123 & Configuration A & Configuration B \\
125 Perfect Forward Secrecy & yes & yes \\
127 \parbox[t]{5cm}{\raggedright
128 \mbox{AES-GCM-16}, \mbox{AES-CTR}, \mbox{AES-CCM-16}, \mbox{AES-256}}
130 \parbox[t]{5cm}{\raggedright
131 \mbox{AES-GCM-16}, \mbox{AES-CTR}, \mbox{AES-CCM-16}, \mbox{AES-256}, \mbox{CAMELLIA-256}, \mbox{AES-128}, \mbox{CAMELLIA-128}} \\
132 Hash & SHA2-* (or none for AES-GCM) & SHA2-*, SHA1 (or none for AES-GCM) \\
133 DH Group & Same as Phase 1 & Same as Phase 1 \\
134 % Lifetime & \todo{need recommendations; 1-8 hours is common} & \\
137 \caption{IPSEC Phase 2 parameters}
138 \label{tab:IPSEC_ph2_params}
141 \item[References:] \mbox{}
143 ``A Cryptographic Evaluation of IPsec'', Niels Ferguson and Bruce
144 Schneier: \url{https://www.schneier.com/paper-ipsec.pdf}
148 \subsubsection{Check Point FireWall-1}
151 \item[Tested with Version:] \mbox{}
154 \item R77 (should work with any currently supported version)
157 \item[Settings:] \mbox{}
159 Please see section \ref{section:IPSECgeneral} for guidance on
160 parameter choice. In this section, we will configure a strong setup
161 according to ``Configuration A''.
163 This is based on the concept of a ``VPN Community'', which has all the
164 settings for the gateways that are included in that community.
165 Communities can be found in the ``IPSEC VPN'' tab of SmartDashboard.
169 \includegraphics[width=0.592\textwidth]{checkpoint_1.png}
170 \caption{VPN Community encryption properties}
171 \label{fig:checkpoint_1}
174 Either chose one of the encryption suites in the properties dialog
175 (figure \ref{fig:checkpoint_1}), or proceed to
176 ``Custom Encryption...'', where you can set encryption and hash for
177 Phase 1 and 2 (figure \ref{fig:checkpoint_2}).
181 \includegraphics[width=0.411\textwidth]{checkpoint_2.png}
182 \caption{Custom Encryption Suite Properties}
183 \label{fig:checkpoint_2}
186 The Diffie-Hellman groups and Perfect Forward Secrecy Settings can be
187 found under ``Advanced Settings'' / ``Advanced VPN Properties''
188 (figure \ref{fig:checkpoint_3}).
192 \includegraphics[width=0.589\textwidth]{checkpoint_3.png}
193 \caption{Advanced VPN Properties}
194 \label{fig:checkpoint_3}
197 \item[Additional settings:] \mbox{}
199 For remote Dynamic IP Gateways, the settings are not taken from the
200 community, but set in the ``Global Properties'' dialog under ``Remote
201 Access'' / ``VPN Authentication and Encryption''. Via the ``Edit...''
202 button, you can configure sets of algorithms that all gateways support
203 (figure \ref{fig:checkpoint_4}).
207 \includegraphics[width=0.474\textwidth]{checkpoint_4.png}
208 \caption{Remote Access Encryption Properties}
209 \label{fig:checkpoint_4}
212 Please note that these settings restrict the available algorithms for
213 \textbf{all} gateways, and also influence the VPN client connections.
215 %\item[Justification for special settings (if needed):]
219 \item[References:]\mbox{}
224 \href{https://sc1.checkpoint.com/documents/R77/CP_R77_VPN_AdminGuide/html_frameset.htm}{VPN
225 R77 Administration Guide} (may require a
226 UserCenter account to access)
230 % \item[How to test:]
235 %% cipherstrings current 2013-12-09
236 \subsubsection{OpenVPN}
240 \item[Tested with Version:] \mbox{}\\
243 \item OpenVPN 2.3.2 from Debian ``wheezy-backports'' linked against openssl (libssl.so.1.0.0)
244 \item OpenVPN 2.2.1 from Debian 7.0 linked against openssl
246 \item OpenVPN 2.3.2 for Windows
249 \item[Settings:] \mbox{}
251 \paragraph{General}\mbox{}
253 We describe a configuration with certificate-based authentication; see
254 below for details on the \verb|easyrsa| tool to help you with that.
256 OpenVPN uses TLS only for authentication and key exchange. The
257 bulk traffic is then encrypted and authenticated with the OpenVPN
258 protocol using those keys.
260 Note that while the \verb|tls-cipher| option takes a list of ciphers
261 that is then negotiated as usual with TLS, the \verb|cipher|
262 and \verb|auth| options both take a single argument that must match on
265 \paragraph{Server Configuration}\mbox{}
267 % this is only a DoS-protection, out of scope:
268 % # TLS Authentication
273 % ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-CAMELLIA256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:AES256-SHA
274 % the cipherlist here is config B without the ECDHE strings, because
275 % it must fit in 256 bytes...
276 \begin{lstlisting}[breaklines]
277 tls-cipher DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-RSA-AES128-SHA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
282 \paragraph{Client Configuration}\mbox{}
284 Client and server have to use compatible configurations, otherwise they can't communicate.
285 The \verb|cipher| and \verb|auth| directives have to be identical.
287 \begin{lstlisting}[breaklines]
288 tls-cipher DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-RSA-AES128-SHA:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
292 # http://openvpn.net/index.php/open-source/documentation/howto.html#mitm
293 remote-cert-tls server
295 tls-remote server.example.com
298 \item[Justification for special settings (if needed):] \mbox{}\\
300 OpenVPN 2.3.1 changed the values that the \verb|tls-cipher| option
301 expects from OpenSSL to IANA cipher names. That means from that
302 version on you will get ``Deprecated TLS cipher name'' warnings for
303 the configurations above. You cannot use the selection strings from
304 section \ref{section:recommendedciphers} directly from 2.3.1 on, which
305 is why we give an explicit cipher list here.
307 In addition, there is a 256 character limit on configuration file line
308 lengths; that limits the size of cipher suites, so we dropped all
311 The configuration shown above is compatible with all tested versions.
313 \item[References:] \mbox{}\\
315 \url{http://openvpn.net/index.php/open-source/documentation/security-overview.html}
320 \item[Additional settings:] \mbox{}
322 \paragraph{Key renegotiation interval}\mbox{}
324 The default for renegotiation of encryption keys is one hour
325 (\verb|reneg-sec 3600|). If you
326 transfer huge amounts of data over your tunnel, you might consider
327 configuring a shorter interval, or switch to a byte- or packet-based
328 interval (\verb|reneg-bytes| or \verb|reneg-pkts|).
330 \paragraph{Fixing ``easy-rsa''}\mbox{}
332 When installing an OpenVPN server instance, you are probably using
333 {\it easy-rsa} to generate keys and certificates.
334 The file \verb|vars| in the easyrsa installation directory has a
335 number of settings that should be changed to secure values:
337 \begin{lstlisting}[breaklines]
339 export KEY_EXPIRE=365
340 export CA_EXPIRE=1826
343 This will enhance the security of the key generation by using RSA keys
344 with a length of 2048 bits, and set a lifetime of one year for the
345 server/client certificates and five years for the CA certificate.
347 In addition, edit the \verb|pkitool| script and replace all occurences
348 of \verb|sha1| with \verb|sha256|, to sign the certificates with
351 \item[Limitations:] \mbox{}
353 Note that the ciphersuites shown by \verb|openvpn --show-tls| are {\it
354 known}, but not necessarily {\it
355 supported} \footnote{\url{https://community.openvpn.net/openvpn/ticket/304}}.
357 Which cipher suite is actually used can be seen in the logs:
359 \verb|Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-CAMELLIA256-SHA, 2048 bit RSA|
366 PPTP is considered insecure, Microsoft recommends to ``use a more secure VPN
367 tunnel''\footnote{\url{http://technet.microsoft.com/en-us/security/advisory/2743314}}.
369 There is a cloud service that cracks the underlying MS-CHAPv2
370 authentication protocol for the price of USD~200\footnote{\url{https://www.cloudcracker.com/blog/2012/07/29/cracking-ms-chap-v2/}},
371 and given the resulting MD4 hash, all PPTP traffic for a user can
374 \subsubsection{Cisco ASA}
375 The following settings reflect our recommendations as best as possible on the Cisco ASA platform. These are - of course - just settings regarding SSL/TLS (i.e. Cisco AnyConnect) and IPSec. For further security settings regarding this platform the appropriate Cisco guides should be followed.
377 \item[Tested with Version:]
378 9.1(3) - X-series model
379 \item[Settings:] \mbox{}
380 \begin{lstlisting}[breaklines]
381 crypto ipsec ikev2 ipsec-proposal AES-Fallback
382 protocol esp encryption aes-256 aes-192 aes
383 protocol esp integrity sha-512 sha-384 sha-256
384 crypto ipsec ikev2 ipsec-proposal AES-GCM-Fallback
385 protocol esp encryption aes-gcm-256 aes-gcm-192 aes-gcm
386 protocol esp integrity sha-512 sha-384 sha-256
387 crypto ipsec ikev2 ipsec-proposal AES128-GCM
388 protocol esp encryption aes-gcm
389 protocol esp integrity sha-512
390 crypto ipsec ikev2 ipsec-proposal AES192-GCM
391 protocol esp encryption aes-gcm-192
392 protocol esp integrity sha-512
393 crypto ipsec ikev2 ipsec-proposal AES256-GCM
394 protocol esp encryption aes-gcm-256
395 protocol esp integrity sha-512
396 crypto ipsec ikev2 ipsec-proposal AES
397 protocol esp encryption aes
398 protocol esp integrity sha-1 md5
399 crypto ipsec ikev2 ipsec-proposal AES192
400 protocol esp encryption aes-192
401 protocol esp integrity sha-1 md5
402 crypto ipsec ikev2 ipsec-proposal AES256
403 protocol esp encryption aes-256
404 protocol esp integrity sha-1 md5
405 crypto ipsec ikev2 sa-strength-enforcement
406 crypto ipsec security-association pmtu-aging infinite
407 crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set pfs group14
408 crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set ikev2 ipsec-proposal AES256-GCM AES192-GCM AES128-GCM AES-GCM-Fallback AES-Fallback
409 crypto map Outside-DMZ_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
410 crypto map Outside-DMZ_map interface Outside-DMZ
412 crypto ikev2 policy 1
413 encryption aes-gcm-256
416 prf sha512 sha384 sha256 sha
417 lifetime seconds 86400
418 crypto ikev2 policy 2
419 encryption aes-gcm-256 aes-gcm-192 aes-gcm
422 prf sha512 sha384 sha256 sha
423 lifetime seconds 86400
424 crypto ikev2 policy 3
425 encryption aes-256 aes-192 aes
426 integrity sha512 sha384 sha256
428 prf sha512 sha384 sha256 sha
429 lifetime seconds 86400
430 crypto ikev2 policy 4
431 encryption aes-256 aes-192 aes
432 integrity sha512 sha384 sha256 sha
434 prf sha512 sha384 sha256 sha
435 lifetime seconds 86400
436 crypto ikev2 enable Outside-DMZ client-services port 443
437 crypto ikev2 remote-access trustpoint ASDM_TrustPoint0
439 ssl server-version tlsv1-only
440 ssl client-version tlsv1-only
441 ssl encryption dhe-aes256-sha1 dhe-aes128-sha1 aes256-sha1 aes128-sha1
442 ssl trust-point ASDM_TrustPoint0 Outside-DMZ
445 \item[Justification for special settings (if needed):] \mbox{}
446 New IPsec policies have been defined which do not make use of ciphers that may be cause for concern. Policies have a "Fallback" option to support legacy devices.
448 3DES has been completely disabled as such Windows XP AnyConnect Clients will no longer be able to connect.
450 The Cisco ASA platform does not currently support RSA Keys above 2048bits.
452 Legacy ASA models (e.g. 5505, 5510, 5520, 5540, 5550) do not offer the possibility to configure for SHA256/SHA384/SHA512 nor AES-GCM for IKEv2 proposals.
455 \url{http://www.cisco.com/en/US/docs/security/asa/roadmap/asaroadmap.html}\\
456 \url{http://www.cisco.com/web/about/security/intelligence/nextgen_crypto.html}
458 % add any further references or best practice documents here
460 %%\item[How to test:]
461 % describe here or point the admin to tools (can be a simple footnote or \ref{} to the tools section) which help the admin to test his settings.
471 %%\subsubsection{Juniper VPN}
472 %%\todo{write this subsubsection. AK: ask Hannes}
475 %%\begin{description}
476 %%\item[Tested with Version:] \todo{version?}
478 %%\item[Settings:] \mbox{}
480 %%\begin{lstlisting}[breaklines]
481 %% %Here goes your setting string
484 %%\item[Additional settings:] \mbox{}
486 %Here you can add additional settings
488 %%\begin{lstlisting}[breaklines]
489 %% %copy \& paste additional settings
492 %%\item[Justification for special settings (if needed):] \mbox{}
494 % in case you have the need for further justifications why you chose this and that setting or if the settings do not fit into the standard Variant A or Variant B schema, please document this here
496 %%\item[References:] \todo{add references}
498 % add any further references or best practice documents here
500 %%\item[How to test:]
501 % describe here or point the admin to tools (can be a simple footnote or \ref{} to the tools section) which help the admin to test his settings.
507 \subsubsection{L2TP over IPSec}
508 \todo{write this subsubsection}
512 \item[Tested with Version:] \todo{version?}
514 \item[Settings:] \mbox{}
516 \begin{lstlisting}[breaklines]
517 %Here goes your setting string
520 \item[Additional settings:] \mbox{}
522 %Here you can add additional settings
524 \begin{lstlisting}[breaklines]
525 %copy \& paste additional settings
528 \item[Justification for special settings (if needed):] \mbox{}
530 % in case you have the need for further justifications why you chose this and that setting or if the settings do not fit into the standard Variant A or Variant B schema, please document this here
532 \item[References:] \todo{add references}
534 % add any further references or best practice documents here
537 % describe here or point the admin to tools (can be a simple footnote or \ref{} to the tools section) which help the admin to test his settings.
546 \subsubsection{Racoon}
547 \todo{write this subsubsection}
551 \item[Tested with Version:] \todo{version?}
553 \item[Settings:] \mbox{}
555 \begin{lstlisting}[breaklines]
556 %Here goes your setting string
559 \item[Additional settings:] \mbox{}
561 %Here you can add additional settings
563 \begin{lstlisting}[breaklines]
564 %copy \& paste additional settings
567 \item[Justification for special settings (if needed):] \mbox{}
569 % in case you have the need for further justifications why you chose this and that setting or if the settings do not fit into the standard Variant A or Variant B schema, please document this here
571 \item[References:] \todo{add references}
573 % add any further references or best practice documents here
576 % describe here or point the admin to tools (can be a simple footnote or \ref{} to the tools section) which help the admin to test his settings.