3 % ----------------------------------------------------------------------
5 \label{section:IPSECgeneral}
7 % ciphersuites current 2013-12-09
10 \subsubsection{Settings}
12 \paragraph*{Assumptions}\mbox{}\\
14 We assume the use of IKE (v1 or v2) and ESP for this document.
16 \paragraph*{Authentication}\mbox{}\\
18 IPSEC authentication should optimally be performed via RSA signatures,
19 with a key size of 2048 bits or more. Configuring only the trusted CA
20 that issued the peer certificate provides for additional protection
21 against fake certificates.
23 If you need to use Pre-Shared Key authentication:
26 \item Choose a \textbf{random}, \textbf{long enough} PSK (see below)
27 \item Use a \textbf{separate} PSK for any IPSEC connection
28 \item Change the PSKs regularly
31 The size of the PSK should not be shorter than the output size of
32 the hash algorithm used in IKE \footnote{It is used in a HMAC, see
33 RFC2104~\cite{rfc2104} and the discussion starting
34 in \url{http://www.vpnc.org/ietf-ipsec/02.ipsec/msg00268.html}.}.
36 For a key composed of upper- and lowercase letters, numbers, and two
37 additional symbols\footnote{64 possible values = 6 bits},
38 table~\ref{tab:IPSEC_psk_len} gives the minimum lengths in characters.
45 IKE Hash & PSK length \\
53 \label{tab:IPSEC_psk_len}
56 \paragraph*{Cryptographic Suites}\mbox{}\\
58 IPSEC Cryptographic Suites are pre-defined settings for all the items
59 of a configuration; they try to provide a balanced security level and
60 make setting up VPNs easier.
61 \footnote{RFC6379~\cite{rfc6379}, RFC4308~\cite{rfc4308}}
63 When using any of those suites, make sure to enable ``Perfect Forward
64 Secrecy`` for Phase 2, as this is not specified in the suites. The
65 equivalents to the recommended ciphers suites in section
66 \ref{section:recommendedciphers} are shown in
67 table~\ref{tab:IPSEC_suites}.
72 \begin{tabular}{p{2.5cm}p{2.5cm}l}
74 Configuration A & Configuration B & Notes\\
76 \verb|Suite-B-GCM-256| &
77 \verb|Suite-B-GCM-128| \newline
79 & All Suite-B variants use NIST elliptic curves\\
82 \caption{IPSEC Cryptographic Suites}
83 \label{tab:IPSEC_suites}
86 \paragraph*{IKE or Phase 1}\mbox{}\\
88 Alternatively to the pre-defined cipher suites, you can define your
89 own, as described in this and the next section.
91 IKE or Phase 1 is the mutual authentication and key exchange phase;
92 table~\ref{tab:IPSEC_ph1_params} shows the parameters.
94 Use only ``main mode``, as ``aggressive mode`` has known security
95 vulnerabilities \footnote{\url{http://ikecrack.sourceforge.net/}}.
102 & Configuration A & Configuration B \\
104 Mode & Main Mode & Main Mode \\
105 Encryption & AES-256 & AES, CAMELLIA (-256 or -128) \\
106 Hash & SHA2-* & SHA2-*, SHA1 \\
107 DH Group & Group 14-18 & Group 14-18 \\
108 % Lifetime & \todo{need recommendations; 1 day seems to be common
112 \caption{IPSEC Phase 1 parameters}
113 \label{tab:IPSEC_ph1_params}
116 \paragraph*{ESP or Phase 2}\mbox{}\\
118 ESP or Phase 2 is where the actual data are protected; recommended
119 parameters are shown in table \ref{tab:IPSEC_ph2_params}.
126 & Configuration A & Configuration B \\
128 Perfect Forward Secrecy & yes & yes \\
130 \parbox[t]{5cm}{\raggedright
131 \mbox{AES-GCM-16}, \mbox{AES-CTR}, \mbox{AES-CCM-16}, \mbox{AES-256}}
133 \parbox[t]{5cm}{\raggedright
134 \mbox{AES-GCM-16}, \mbox{AES-CTR}, \mbox{AES-CCM-16}, \mbox{AES-256}, \mbox{CAMELLIA-256}, \mbox{AES-128}, \mbox{CAMELLIA-128}} \\
135 Hash & SHA2-* (or none for AEAD) & SHA2-*, SHA1 (or none for AEAD) \\
136 DH Group & Same as Phase 1 & Same as Phase 1 \\
137 % Lifetime & \todo{need recommendations; 1-8 hours is common} & \\
140 \caption{IPSEC Phase 2 parameters}
141 \label{tab:IPSEC_ph2_params}
144 \subsubsection{References}
147 ``A Cryptographic Evaluation of IPsec'', Niels Ferguson and Bruce
148 Schneier: \url{https://www.schneier.com/paper-ipsec.pdf}
151 %----------------------------------------------------------------------
152 \subsection{Check Point FireWall-1}
155 \item[Tested with Version:] \mbox{}
158 \item R77 (should work with any currently supported version)
161 \item[Settings:] \mbox{}
163 Please see section \ref{section:IPSECgeneral} for guidance on
164 parameter choice. In this section, we will configure a strong setup
165 according to ``Configuration A''.
167 This is based on the concept of a ``VPN Community'', which has all the
168 settings for the gateways that are included in that community.
169 Communities can be found in the ``IPSEC VPN'' tab of SmartDashboard.
173 \includegraphics[width=0.592\textwidth]{img/checkpoint_1.png}
174 \caption{VPN Community encryption properties}
175 \label{fig:checkpoint_1}
178 Either chose one of the encryption suites in the properties dialog
179 (figure \ref{fig:checkpoint_1}), or proceed to
180 ``Custom Encryption...'', where you can set encryption and hash for
181 Phase 1 and 2 (figure \ref{fig:checkpoint_2}).
185 \includegraphics[width=0.411\textwidth]{img/checkpoint_2.png}
186 \caption{Custom Encryption Suite Properties}
187 \label{fig:checkpoint_2}
190 The Diffie-Hellman groups and Perfect Forward Secrecy Settings can be
191 found under ``Advanced Settings'' / ``Advanced VPN Properties''
192 (figure \ref{fig:checkpoint_3}).
196 \includegraphics[width=0.589\textwidth]{img/checkpoint_3.png}
197 \caption{Advanced VPN Properties}
198 \label{fig:checkpoint_3}
201 \item[Additional settings:] \mbox{}
203 For remote Dynamic IP Gateways, the settings are not taken from the
204 community, but set in the ``Global Properties'' dialog under ``Remote
205 Access'' / ``VPN Authentication and Encryption''. Via the ``Edit...''
206 button, you can configure sets of algorithms that all gateways support
207 (figure \ref{fig:checkpoint_4}).
211 \includegraphics[width=0.474\textwidth]{img/checkpoint_4.png}
212 \caption{Remote Access Encryption Properties}
213 \label{fig:checkpoint_4}
216 Please note that these settings restrict the available algorithms for
217 \textbf{all} gateways, and also influence the VPN client connections.
219 %\item[Justification for special settings (if needed):]
223 \item[References:]\mbox{}
228 \href{https://sc1.checkpoint.com/documents/R77/CP_R77_VPN_AdminGuide/html_frameset.htm}{VPN
229 R77 Administration Guide} (may require a
230 UserCenter account to access)
234 % \item[How to test:]
239 %% cipherstrings current 2013-12-09
240 % ----------------------------------------------------------------------
245 \item[Tested with Version:] \mbox{}\\
248 \item OpenVPN 2.3.2 from Debian ``wheezy-backports'' linked against openssl (libssl.so.1.0.0)
249 \item OpenVPN 2.2.1 from Debian 7.0 linked against openssl
251 \item OpenVPN 2.3.2 for Windows
254 \item[Settings:] \mbox{}
256 \paragraph{General}\mbox{}
258 We describe a configuration with certificate-based authentication; see
259 below for details on the \verb|easyrsa| tool to help you with that.
261 OpenVPN uses TLS only for authentication and key exchange. The
262 bulk traffic is then encrypted and authenticated with the OpenVPN
263 protocol using those keys.
265 Note that while the \verb|tls-cipher| option takes a list of ciphers
266 that is then negotiated as usual with TLS, the \verb|cipher|
267 and \verb|auth| options both take a single argument that must match on
270 \paragraph{Server Configuration}\mbox{}
272 % the cipherlist here is config B without the ECDHE strings, because
273 % it must fit in 256 bytes...
274 % DO NOT CHANGE TO THE CIPHERSTRING MACRO!
275 \begin{lstlisting}[breaklines]
276 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
281 \paragraph{Client Configuration}\mbox{}
283 Client and server have to use compatible configurations, otherwise they can't communicate.
284 The \verb|cipher| and \verb|auth| directives have to be identical.
286 % the cipherlist here is config B without the ECDHE strings, because
287 % it must fit in 256 bytes...
288 % DO NOT CHANGE TO THE CIPHERSTRING MACRO!
289 \begin{lstlisting}[breaklines]
290 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
294 # http://openvpn.net/index.php/open-source/documentation/howto.html#mitm
295 remote-cert-tls server
297 tls-remote server.example.com
300 \item[Justification for special settings (if needed):] \mbox{}\\
302 OpenVPN 2.3.1 changed the values that the \verb|tls-cipher| option
303 expects from OpenSSL to IANA cipher names. That means from that
304 version on you will get ``Deprecated TLS cipher name'' warnings for
305 the configurations above. You cannot use the selection strings from
306 section \ref{section:recommendedciphers} directly from 2.3.1 on, which
307 is why we give an explicit cipher list here.
309 In addition, there is a 256 character limit on configuration file line
310 lengths; that limits the size of cipher suites, so we dropped all
313 The configuration shown above is compatible with all tested versions.
315 \item[References:] \mbox{}\\
317 \url{http://openvpn.net/index.php/open-source/documentation/security-overview.html}
322 \item[Additional settings:] \mbox{}
324 \paragraph{Key renegotiation interval}\mbox{}
326 The default for renegotiation of encryption keys is one hour
327 (\verb|reneg-sec 3600|). If you
328 transfer huge amounts of data over your tunnel, you might consider
329 configuring a shorter interval, or switch to a byte- or packet-based
330 interval (\verb|reneg-bytes| or \verb|reneg-pkts|).
332 \paragraph{Fixing ``easy-rsa''}\mbox{}
334 When installing an OpenVPN server instance, you are probably using
335 \emph{easy-rsa} to generate keys and certificates.
336 The file \verb|vars| in the easyrsa installation directory has a
337 number of settings that should be changed to secure values:
339 \begin{lstlisting}[breaklines]
341 export KEY_EXPIRE=365
342 export CA_EXPIRE=1826
345 This will enhance the security of the key generation by using RSA keys
346 with a length of 2048 bits, and set a lifetime of one year for the
347 server/client certificates and five years for the CA certificate.
349 In addition, edit the \verb|pkitool| script and replace all occurences
350 of \verb|sha1| with \verb|sha256|, to sign the certificates with
353 \item[Limitations:] \mbox{}
355 Note that the ciphersuites shown by \verb|openvpn --show-tls| are
356 \emph{known}, but not necessarily \emph{supported}
357 \footnote{\url{https://community.openvpn.net/openvpn/ticket/304}}.
359 Which cipher suite is actually used can be seen in the logs:
361 \verb|Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-CAMELLIA256-SHA, 2048 bit RSA|
366 % ----------------------------------------------------------------------
369 PPTP is considered insecure, Microsoft recommends to ``use a more secure VPN
370 tunnel''\footnote{\url{http://technet.microsoft.com/en-us/security/advisory/2743314}}.
372 There is a cloud service that cracks the underlying MS-CHAPv2
373 authentication protocol for the price of USD~200\footnote{\url{https://www.cloudcracker.com/blog/2012/07/29/cracking-ms-chap-v2/}},
374 and given the resulting MD4 hash, all PPTP traffic for a user can
377 % ----------------------------------------------------------------------
378 \subsection{Cisco ASA}
379 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.
381 \item[Tested with Version:]
382 9.1(3) - X-series model
383 \item[Settings:] \mbox{}
384 \begin{lstlisting}[breaklines]
385 crypto ipsec ikev2 ipsec-proposal AES-Fallback
386 protocol esp encryption aes-256 aes-192 aes
387 protocol esp integrity sha-512 sha-384 sha-256
388 crypto ipsec ikev2 ipsec-proposal AES-GCM-Fallback
389 protocol esp encryption aes-gcm-256 aes-gcm-192 aes-gcm
390 protocol esp integrity sha-512 sha-384 sha-256
391 crypto ipsec ikev2 ipsec-proposal AES128-GCM
392 protocol esp encryption aes-gcm
393 protocol esp integrity sha-512
394 crypto ipsec ikev2 ipsec-proposal AES192-GCM
395 protocol esp encryption aes-gcm-192
396 protocol esp integrity sha-512
397 crypto ipsec ikev2 ipsec-proposal AES256-GCM
398 protocol esp encryption aes-gcm-256
399 protocol esp integrity sha-512
400 crypto ipsec ikev2 ipsec-proposal AES
401 protocol esp encryption aes
402 protocol esp integrity sha-1 md5
403 crypto ipsec ikev2 ipsec-proposal AES192
404 protocol esp encryption aes-192
405 protocol esp integrity sha-1 md5
406 crypto ipsec ikev2 ipsec-proposal AES256
407 protocol esp encryption aes-256
408 protocol esp integrity sha-1 md5
409 crypto ipsec ikev2 sa-strength-enforcement
410 crypto ipsec security-association pmtu-aging infinite
411 crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set pfs group14
412 crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set ikev2 ipsec-proposal AES256-GCM AES192-GCM AES128-GCM AES-GCM-Fallback AES-Fallback
413 crypto map Outside-DMZ_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
414 crypto map Outside-DMZ_map interface Outside-DMZ
416 crypto ikev2 policy 1
417 encryption aes-gcm-256
420 prf sha512 sha384 sha256 sha
421 lifetime seconds 86400
422 crypto ikev2 policy 2
423 encryption aes-gcm-256 aes-gcm-192 aes-gcm
426 prf sha512 sha384 sha256 sha
427 lifetime seconds 86400
428 crypto ikev2 policy 3
429 encryption aes-256 aes-192 aes
430 integrity sha512 sha384 sha256
432 prf sha512 sha384 sha256 sha
433 lifetime seconds 86400
434 crypto ikev2 policy 4
435 encryption aes-256 aes-192 aes
436 integrity sha512 sha384 sha256 sha
438 prf sha512 sha384 sha256 sha
439 lifetime seconds 86400
440 crypto ikev2 enable Outside-DMZ client-services port 443
441 crypto ikev2 remote-access trustpoint ASDM_TrustPoint0
443 ssl server-version tlsv1-only
444 ssl client-version tlsv1-only
445 ssl encryption dhe-aes256-sha1 dhe-aes128-sha1 aes256-sha1 aes128-sha1
446 ssl trust-point ASDM_TrustPoint0 Outside-DMZ
449 \item[Justification for special settings (if needed):] \mbox{}
450 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.
452 3DES has been completely disabled as such Windows XP AnyConnect Clients will no longer be able to connect.
454 The Cisco ASA platform does not currently support RSA Keys above 2048bits.
456 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.
459 \url{http://www.cisco.com/en/US/docs/security/asa/roadmap/asaroadmap.html}\\
460 \url{http://www.cisco.com/web/about/security/intelligence/nextgen_crypto.html}
462 % add any further references or best practice documents here
464 %%\item[How to test:]
465 % 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.
475 % ----------------------------------------------------------------------
476 %%\subsection{Juniper VPN}
477 %%\todo{write this subsubsection. AK: ask Hannes}
482 % ----------------------------------------------------------------------
483 %\subsection{L2TP over IPSec}
484 %\todo{write this subsubsection}
489 % ----------------------------------------------------------------------
491 %\todo{write this subsubsection}