S 5.90 Use of IPSec under Windows

Initiation responsibility: IT Security Officer, Head of IT

Implementation responsibility: Administrator

Windows offers IPSec-compliant functionality to protect communications. IPSec is an international standard that permits cryptographic protection of IP-based communication: The decision whether or not to use IPSec to protect communications must be made on a case-by-case basis. When planning the use of Windows, this must already be taken into account and defined by means of a policy.

IPSec consists of the following functions:

General information on the selection of suitable cryptographic procedures can be found in S 2.164 Selection of a suitable cryptographic procedure. When using IPSec, an algorithm belonging to the SHA-2 family, i.e. SHA-224, SHA-256, SHA-384 or SHA-512, should be used as the hash method.

These are, for example, supported in the IPSec client which is part of the Windows Vista and Windows 7 firewall. The function is available by default since Windows 7 and in Windows Vista since the Service Pack 1. Without Service Pack 1 installed, this IPSec client supports only the weaker MD5 and SHA1 hash methods in Windows Vista. Windows XP without Service Pack 3 installed also supports only the weaker hash methods. They should no longer be used.

In order to ensure that not only the integrity and confidentiality of the data transmitted, but also that the data is actually exchanged between the right communication partners, the communication partners must be authenticated. The Windows implementation allows the following procedures for authentication of the communication end points:

The first time an IPSec connection is established, the communication partners first negotiate the algorithms and procedures to be subsequently used for authentication, for protecting integrity, and for maintaining confidentiality, and the results are then stored in the Security Association (SA).

The parameters stored in the SA are then used for all future communication connections until the validity of the SA parameters expires and the procedures are renegotiated. This is generally done fully automatically by the components in the IPSec implementation.

The master key and the session key need to be generated for the actual encryption. In general, the master key, which is used to generate all the other keys, is normally only created once for each connection, but the session keys are recreated several times at regular intervals. It is also possible to recreate the master key at regular intervals, but this requires reauthentication of the communication partners. Reauthentication is usually executed automatically by the components of the IPSec implementation, which has a significant effect on the performance.

IPSec knows two different methods to protect communications: ESP (Encapsulated Security Payload) and AH (Authentication Header). Under Windows Server 2008 and higher, AH is no longer supported, since this method is hardly of any practical importance due to the related disadvantages (no implementation of network addresses per NAT possible).

To control IPSec-based communication, Windows offers IPSec policies that specify which IPSec parameters are to be used for a connection. In Windows Vista and Windows Server 2008, the IPSec policies are also referred to as connection security rules. The following can be achieved using the various policies:

Windows 2000 and higher provides three predefined IPSec policies:

These predefined rules can be adapted in detail to the local requirements. It is recommended in this case to make a copy of the policy first and make the changes to the copy.

Filter rules are used in connection with an IPSec policy in order to be able to define different IPSec parameters, for example depending on the protocol used. It is possible to specify, for example, that HTTP connections do not have to be encrypted but FTP connections always need to be encrypted.

Windows Vista and Windows 7 allow the configuration of the IPSec policies using group policies in Computer Configuration | Windows Settings | Windows Firewall with Advanced Security | Connection Security Rules; for Windows Server 2008, the configuration editor is in Administrative Tools| Windows Firewall with Advanced Security | Connection Rules. For Vista, Windows 7 and Server 2008, Microsoft does not provide any predefined IPSec policies. However, the Connection Security Rule Wizard can help you configure the IPSec policies. IPSec is enabled using group policies or is enabled locally in the Properties dialogue of a network connection. The enabling in the Properties dialogue is not available in Vista, Windows 7 and Server 2008. Here, IPSec is enabled by creating connection security rules.

Under Windows Server 2008 and higher, the configuration of rules for the local firewall and IPSec in the surface was brought together to simplify administration and to eliminate sources of error resulting from contradictory IPSec and firewall rules.

In general, the following must be taken into account when using IPSec in Windows:

Review questions: