TURMOIL IPSEC VPN SESSIONIZATION

Open PDF
Creating agency: NSA National Security Agency (US)
Document date: 2008-08-15
Pages: 18
Genre: manual
Banner:
Classification: TOP SECRET COMINT
Dissemination: REL TO USA, AUS, CAN, GBR, NZL

An NSA technical specification document describing how TURMOIL detects and sessionizes IPSec VPN protocol traffic — covering the six IPSec protocol stacks targeted for collection, the specific keyword and bitmask patterns used by the Atomic Event Generator to identify each packet type at wire speed, and the sessionization parameters used to group related packets into coherent sessions for downstream processing.

Long Description:
This is a TOP SECRET//COMINT//REL TO USA, FVEY technical specification dated August 2008, published by Der Spiegel under the German title "Technische Erläuterung, wie TURMOIL die IPsec Datenpakete von VPN Netzen abzweigt und angreift" ("Technical explanation of how TURMOIL intercepts and attacks IPSec data packets from VPN networks"). The document defines the detection and sessionization requirements for six IPSec protocol stacks within TURMOIL's Packet Processing Framework. The six protocol stacks covered are IP/ESP, IP/AH/ESP, IP/UDP/ISAKMP, IP/UDP/nulls/ISAKMP, IP/TCP/ISAKMP, and IP/TCP/nulls/ISAKMP. For each stack the document provides three things: the exact hexadecimal keyword and bitmask pair loaded into the First Stage Packet Filter by the Atomic Event Generator for detection, the set of packet fields used for sessionization, and an annotated packet header diagram showing which fields are used. For ESP detection, TURMOIL uses a keyword matching IPv4 packets with IP Next Protocol = 0x32 (ESP) and ESP Sequence Number = 5, implementing a 1/16 sampling rate on ESP traffic to manage processing load — only every sixteenth ESP packet is selected for the AEG, with sessionization based on source IP, destination IP and ESP Security Parameter Index. For AH/ESP detection, packets must match both IP Next Protocol = 0x33 (AH) and AH Next Payload = 0x32 (ESP), with sessionization on both AH SPI and ESP SPI. The document notes that the DFCE does not currently recognise AH as a valid transport layer and that fixing this would be difficult, with a proposed workaround using application-specific demux components within the Transform Engine. For IKE detection across UDP and TCP variants, the keywords match ISAKMP version fields (0x10 for version 1.0, with separate keywords for the non-standard version 9.9), along with Next Payload, Exchange Type and Flags field ranges and a packet length constraint of under 64KB. The nulls variants cover the common NAT traversal case where four null bytes are inserted between the UDP or TCP header and the ISAKMP payload. IKE sessionization in all variants uses source IP, destination IP, source port and destination port rather than ISAKMP-specific fields. The summary table confirms that the FIP at the time of writing already handled UDP, TCP and ESP sessionization, while AH/ESP support required new development — specifically changes to both the FIP to recognise AH as a valid layer and the DFCE to pass those packets through. The document proposes application-specific demux components inserted into the Transform Engine as the longer-term solution for sessionization beyond the transport layer. Taken together this document provides the most technically granular published account of exactly how TURMOIL identifies VPN traffic at wire speed — showing the specific binary patterns used to pick IPSec packets out of bulk internet traffic before any higher-level processing begins.
Programs:
TURMOIL, AEG, FIP, PPF

People mentioned:
-

Countries:
-

Tags:
IPSec, VPN decryption, VPN exploitation, sessionization, ESP, IKE, ISAKMP, packet analysis, keyword scanning, bitmask, FSPF, First Stage Packet Filter, FIP, Fast IP Processor, DFCE, PPF, packet processing, Transform Engine, demux, NAT

Identifier:
spiegel_-_media-35528

PDF SHA-256:
aeada037c8b18a7a81a1a15a3f7ba166100c883f0b8322e5de5cd6cb7a1145e9

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

NATIONAL SECURITY AGENCY
UNITED STATES OF AMERICA

TURMOIL

TURMOIL
IPSEC VPN
SESSIONIZATION

Issue No.1...............................................................................................
Issue Date 08/15/08......................................................................................

Responsible Authority
Author : [REDACTED]
Technical P.O.C..: [REDACTED]
Product Approver.........................................................................................

DERIVED FROM: NSA/CSSM 1-52
DATED: 20041123
DECLASSIFY ON: 20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

Table of Contents

Derived From: NSA/CSSM 1-52
Dated: 20041123
DECLASSIFY On: 20291123

Revision History..........................................................................................................4
Reference Documents..................................................................................................4
1.0 (U) SCOPE............................................................................................................5
2.0 (S) ESP SESSIONIZATION...............................................................................5
2.1 (S) IP/ESP...........................................................................................................5
2.1.1 (S) Detection...........................................................................................5
2.1.2 (S) Sessionizing......................................................................................6
2.1.3 (S) The Stack..........................................................................................6
2.2 (S) IP/AH/ESP....................................................................................................7
2.2.1 (S) Detection...........................................................................................7
2.2.2 (S) Sessionizing......................................................................................7
2.2.3 (S) The Stack..........................................................................................8
3.0 (S) IKE SESSIONIZATION...............................................................................9
3.1 (U) IP/UDP/ISAKMP..........................................................................................9
3.1.1 (S) Detection...........................................................................................9
3.1.2 (S) Sessionizing......................................................................................9
3.1.3 (S) The Stack........................................................................................10
3.2 (U) IP/UDP/NULLS/ISAKMP...........................................................................10
3.2.1 (S) Detection.........................................................................................10
3.2.2 (S) Sessionizing....................................................................................11
3.2.3 (U) The Stack.......................................................................................12
3.3 (U) IP/TCP/ISAKMP.........................................................................................12
3.3.1 (S) Detection.........................................................................................12
3.3.2 (S) Sessionizing....................................................................................13
3.3.3 (S) The Stack........................................................................................14
3.4 (U) IP/TCP/NULLS/ISAKMP...........................................................................14
3.4.1 (S) Detection.........................................................................................14
3.4.2 (S) Sessionizing....................................................................................15
3.4.3 (S) The Stack........................................................................................16
4.0 (U) SUMMARY..................................................................................................17

PAGE 2 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

PAGE 3 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

REVISION HISTORY

Issue Date Author Amendments
0.1 8/15/08 ET First draft of document

REFERENCE DOCUMENTS

PAGE 4 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

1.0 (U) SCOPE

This document describes the sessionization requirements for the various IPSec VPN protocols processed in Turmoil. The list of IPSec protocol stacks of interest is shown here:

  • IP/ESP
  • IP/AH/ESP
  • IP/UDP/ISAKMP
  • IP/UDP/nulls/ISAKMP
  • IP/TCP/ISAKMP
  • IP/TCP/nulls/ISAKMP

Currently, IP/ESP, IP/UDP, and IP/TCP are successfully sessionized by the FIP. Other IPSec stacks have been observed in the field, and we have requirements to process them in Turmoil. For completeness, all of the stacks are discussed in this document, even though some are currently being processed.

2.0 (S) ESP SESSIONIZATION

2.1 (S) IP/ESP

2.1.1 (S) DETECTION

The AEG loads the FSPF with the following keyword and mask pair for this protocol:

keyword: 45 FF FF FF FF FF FF FF FF 32 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F5
mask: FF 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0F

This indicates that the packets that satisfy the following parameters will be selected by this keyword for processing in the ESP_AEG:

  • IPv4 packet
  • IP Header Length = 5
  • IP Next Protocol = ESP (0x32)
  • ESP Sequence Number = 5

The ESP Sequence Number requirement implements a "sampling" function on the ESP, reducing the ESP traffic by a factor of 1/16, to limit the ESP loading in the AEG.

PAGE 5 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

2.1.2 (S) SESSIONIZING

The ESP packets would be sessionized by the following set of parameters:

  • IP Next Protocol = 50 (0x32)
  • IP Source Address
  • IP Destination Address
  • ESP Spi

2.1.3 (S) THE STACK

The fields utilized in sessionization are highlighted in red in the diagram below.

0                               1 1                             3
                                5 6                             1

|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|          ---
|Version| Header|  Type         |                               |           ^
|       | length| of service    |      Total length (bytes)     |           |
|       |       | (TOS)         |                               |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                               |3 bit|                         |           |
|        Identification         | flag|    Fragment offset      |           |
|                               |0 D M|                         |          IP 
|                               |  F F|                         |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|    Time       |     Next      |                               |           |
| to live (TTL) |   protocol    |       Header checksum         |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                       source IP address                       |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                    destination IP address                     |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                        options (if any)                       |           v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| ----     ---
|                  Security Parameters Index                    | ^Int.     ^
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| |Cov      |
|                       Sequence Number                         | |ered     |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| | ----    |
|                                                               | |    ^    |
~                  Payload Data  (variable)                     ~ |    |    |
|                                                               | |Conf.    |
|       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| | Cov-   ESP
|       |                  Padding (0-255 bytes)                | |ered*    |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| |   |     |
|                               |  Pad Length   | Next Header   | v   v     |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| ------    |
|                                                               |           |
~               Integrity Check Value-ICV  (variable)           ~           |
|                                                               |           v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|          ---

PAGE 6 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

2.2 (S) IP/AH/ESP

2.2.1 (S) DETECTION

The AEG loads the FSPF with the following keyword and mask pair for this protocol:

keyword: 45 FF FF FF FF FF FF FF FF 33 FF FF FF FF FF FF FF FF FF FF 32 FF FF FF FF FF FF FF FF
FF FF F5
mask: FF 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00
00 00 0F

This indicates that the packets that satisfy the following parameters will be selected by this keyword for processing in the ESP_AEG:

  • IPv4 packet
  • IP Header Length = 5
  • IP Next Protocol = AH (0x33)
  • AH Next Payload = ESP (0x32)
  • ESP Sequence Number = 5

2.2.2 (S) SESSIONIZING

The AH/ESP packets would be sessionized by the following set of parameters:

  • IP Next Protocol = 51 (0x33)
  • IP Source Address
  • IP Destination Address
  • AH Next Payload = 50 (0x32)
  • AH Spi
  • ESP Spi

The software FSPF is currently programmed to recognize only TCP, UDP, and ESP as valid Network Layers. However, since our AH/ESP keywords start at the Network (IP) Layer, those packets will make it through the FSPF to the AEG. [REDACTED] said that the change to the FSPF to recognize AH at the Transport Layer would be easy to implement.

The DFCE does not currently recognize AH as a valid Transport Layer, and that change will apparently be difficult to implement. The new idea is to develop "application-specific demux" components for the TE, that will perform any desired sessionization based on parameters after the Network (IP) Layer.

PAGE 7 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

2.2.3 (S) THE STACK

0                               1 1                             3
                                5 6                             1
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|          ---
|Version| Header|     Type      |                               |           ^
|       | length| of service    |      Total length (bytes)     |           |
|       |       | (TOS)         |                               |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                               |3 bit|                         |           |
|        Identification         | flag|    Fragment offset      |           |
|                               |0 D M|                         |          IP
|                               |  F F|                         |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|    Time       |     Next      |                               |           |
| to live (TTL) |   protocol    |       Header checksum         |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                       source IP address                       |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                    destination IP address                     |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                        options (if any)                       |           v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|          ---
|  Next Header  |  Payload Len  |            RESERVED           |           ^
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                  Security Parameters Index                    |           |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                       Sequence Number                         |          AH
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|           |
|                                                               |           |
~              Integrity Check Value-ICV (variable)             ~           |
|                                                               |           v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| ----     ---
|                  Security Parameters Index                    | ^Int.     ^
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| |Cov-     |
|                       Sequence Number                         | |ered*    |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| | ----    |
|                                                               | |   ^     |
~                  Payload Data  (variable)                     ~ |   |     |
|                                                               | |Conf.    |
|       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| |Cov-    ESP
|       |                  Padding (0-255 bytes)                | |ered*    |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| |   |     |
|                               |  Pad Length   | Next Header   | v   v     |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-| ------    |
|                                                               |           |
~               Integrity Check Value-ICV  (variable)           ~           |
|                                                               |           v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|          ---

PAGE 8 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

3.0 (S) IKE SESSIONIZATION

3.1 (U) IP/UDP/ISAKMP

3.1.1 (S) DETECTION

The AEG loads the FSPF with the following keyword and mask pair for this protocol:

keyword: 45 FF FF FF FF FF FF FF FF 11 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 10 00 00 FF FF FF FF 00 00
mask: FF 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 FF D8 F8 00 00 00 00 FF FF

This indicates that the packets that satisfy the following parameters will be selected by this keyword for processing in the IKE_AEG:

  • IPv4 packet
  • IP Header Length = 5
  • IP Next Protocol = UDP (0x11)
  • ISAKMP Version = 0x10
  • ISAKMP Next Payload, Exchange Type, and Flags fields all have ranges of valid values
  • ISAKMP Length (header + payload) < 64k

We have a similar keyword/mask pair for ISAKMP Version 9.9.

3.1.2 (S) SESSIONIZING

The UDP/ISAKMP packets would be sessionized by the following set of parameters:

  • IP Next Protocol = UDP (0x11)
  • IP Source Address
  • IP Destination Address
  • UDP Source Port
  • UDP Destination Port

PAGE 9 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

3.1.3 (S) THE STACK

0                               1 1                             3
                                5 6                             1
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        ---
|Version| Header|     Type      |                               |         ^
|       | length| of service    |      Total length (bytes)     |         |
|       |       | (TOS)         |                               |         |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|         |
|                               |3 bit|                         |         |
|        Identification         | flag|    Fragment offset      |         |
|                               |0 D M|                         |        IP
|                               |  F F|                         |         |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|         |
|    Time       |     Next      |                               |         |
| to live (TTL) |   protocol    |       Header checksum         |         |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|         |
|                       source IP address                       |         |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|         |
|                    destination IP address                     |         |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|         |
|                        options (if any)                       |         v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        ---
|          Source Port          |        Destination Port       |         ^
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        UDP
|          Message length       |            Checksum           |         v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        ---
|                          Initiator                            |         ^
|                           Cookie                              |         |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|         |
|                          Responder                            |         |
|                           Cookie                              |         |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|      ISAKMP
| Next Payload  | MjVer | MnVer | Exchange Type |     Flags     |         |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|         |
|                          Message ID                           |         |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|         |
|                            Length                             |         v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        ---

3.2 (U) IP/UDP/NULLS/ISAKMP

3.2.1 (S) DETECTION

The AEG loads the FSPF with the following keyword and mask pair for this protocol:

keyword: 45 FF FF FF FF FF FF FF FF 11 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00
00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 10 00 00 FF FF FF FF 00 00
mask: FF 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF
FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 FF D8 F8 00 00 00 00 FF FF

This indicates that the packets that satisfy the following parameters will be selected by this keyword for processing in the IKE_AEG:

PAGE 10 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123


TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

  • IPv4 packet
  • IP Header Length = 5
  • IP Next Protocol = UDP (0x11)
  • 4 bytes of NULLS between the UDP and ISAKMP layers
  • ISAKMP Version = 0x10
  • ISAKMP Next Payload, Exchange Type, and Flags fields all have ranges of valid values
  • ISAKMP Length (header + payload) < 64k

We have a similar keyword/mask pair for ISAKMP Version 9.9.

3.2.2 (S) SESSIONIZING

The UDP/nulls/ISAKMP packets would be sessionized by the following set of parameters:

  • IP Next Protocol = UDP (0x11)
  • IP Source Address
  • IP Destination Address
  • UDP Source Port
  • UDP Destination Port

PAGE 11 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

3.2.3 (U) THE STACK

0                               1 1                             3
                                5 6                             1
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|Version| Header|     Type      |                               |        ^
|       | length| of service    |      Total length (bytes)     |        |
|       |       | (TOS)         |                               |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                               |3 bit|                         |        |
|        Identification         | flag|    Fragment offset      |        |
|                               |0 D M|                         |       IP
|                               |  F F|                         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|    Time       |     Next      |                               |        |
| to live (TTL) |   protocol    |       Header checksum         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                       source IP address                       |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                    destination IP address                     |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                        options (if any)                       |        v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|          Source Port          |        Destination Port       |        ^
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       UDP
|          Message length       |            Checksum           |        v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|                            NULLS                              |        
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|                          Initiator                            |        |
|                           Cookie                              |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                          Responder                            |        |
|                           Cookie                              |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|     ISAKMP
| Next Payload  | MjVer | MnVer | Exchange Type |     Flags     |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                          Message ID                           |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                            Length                             |        v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---

3.3 (U) IP/TCP/ISAKMP

3.3.1 (S) DETECTION

The AEG loads the FSPF with the following keyword and mask pair for this protocol:

keyword: 45 FF FF FF FF FF FF FF FF 06 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00 10 00 00 FF
FF FF FF 00 00
mask: FF 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 FF D8 F8 00
00 00 00 FF FF

PAGE 12 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

This indicates that the packets that satisfy the following parameters will be selected by this keyword for processing in the IKE_AEG:

  • IPv4 packet
  • IP Header Length = 5
  • IP Next Protocol = TCP (0x06)
  • ISAKMP Version = 0x10
  • ISAKMP Next Payload, Exchange Type, and Flags fields all have ranges of valid values
  • ISAKMP Length (header + payload) < 64k

We have a similar keyword/mask pair for ISAKMP Version 9.9.

3.3.2 (S) SESSIONIZING

The TCP/ISAKMP packets would be sessionized by the following set of parameters:

  • IP Next Protocol = TCP (0x06)
  • IP Source Address
  • IP Destination Address
  • TCP Source Port
  • TCP Destination Port

PAGE 13 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

3.3.3 (S) THE STACK

0                               1 1                             3
                                5 6                             1
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|Version| Header|     Type      |                               |        ^
|       | length| of service    |      Total length (bytes)     |        |
|       |       | (TOS)         |                               |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                               |3 bit|                         |        |
|        Identification         | flag|    Fragment offset      |        |
|                               |0 D M|                         |       IP
|                               |  F F|                         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|    Time       |     Next      |                               |        |
| to live (TTL) |   protocol    |       Header checksum         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                       source IP address                       |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                    destination IP address                     |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                        options (if any)                       |        v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|          Source Port          |        Destination Port       |        ^
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                       Sequence Number                         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                    Acknowledgement Number                     |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       TCP
|  Data  |         |U A P R S F|                                |        |
|Offset  | Reserved|R C S S Y I|            Window              |        |
|        |         |G K H t N N|                                |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|            Checksum           |        Urgent Pointer         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|          options (if any)     |            Padding            |        v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|                          Initiator                            |        ^
|                           Cookie                              |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                          Responder                            |        |
|                           Cookie                              |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|     ISAKMP
| Next Payload  | MjVer | MnVer | Exchange Type |     Flags     |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                          Message ID                           |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                            Length                             |        v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---

3.4 (U) IP/TCP/NULLS/ISAKMP

3.4.1 (S) DETECTION

The AEG loads the FSPF with the following keyword and mask pair for this protocol:

PAGE 14 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

keyword: 45 FF FF FF FF FF FF FF FF 06 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF 00 00 00 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 00
10 00 00 FF FF FF FF 00 00
mask: FF 00 00 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60
FF D8 F8 00 00 00 00 FF FF

This indicates that the packets that satisfy the following parameters will be selected by this keyword for processing in the IKE_AEG:

  • IPv4 packet
  • IP Header Length = 5
  • IP Next Protocol = TCP (0x06)
  • 4 bytes of NULLS between the TCP and ISAKMP layers
  • ISAKMP Version = 0x10
  • ISAKMP Next Payload, Exchange Type, and Flags fields all have ranges of valid values
  • ISAKMP Length (header + payload) < 64k

We have a similar keyword/mask pair for ISAKMP Version 9.9.

3.4.2 (S) SESSIONIZING

The TCP/nulls/ISAKMP packets would be sessionized by the following set of parameters:

  • IP Next Protocol = TCP (0x06)
  • IP Source Address
  • IP Destination Address
  • TCP Source Port
  • TCP Destination Port

PAGE 15 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

3.4.3 (S) THE STACK

0                               1 1                             3
                                5 6                             1
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|Version| Header|     Type      |                               |        ^
|       | length| of service    |      Total length (bytes)     |        |
|       |       | (TOS)         |                               |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                               |3 bit|                         |        |
|        Identification         | flag|    Fragment offset      |       IP
|                               |0 D M|                         |        |
|                               |  F F|                         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|    Time       |     Next      |                               |        |
| to live (TTL) |   protocol    |       Header checksum         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                       source IP address                       |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                    destination IP address                     |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                        options (if any)                       |        v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|          Source Port          |        Destination Port       |        ^
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                       Sequence Number                         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                    Acknowledgement Number                     |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       TCP
|  Data  |         |U A P R S F|                                |        |
|Offset  | Reserved|R C S S Y I|            Window              |        |
|        |         |G K H t N N|                                |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|            Checksum           |        Urgent Pointer         |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|          options (if any)     |            Padding            |        v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|                            NULLS                              |        
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---
|                          Initiator                            |        ^
|                           Cookie                              |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                          Responder                            |        |
|                           Cookie                              |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|     ISAKMP
| Next Payload  | MjVer | MnVer | Exchange Type |     Flags     |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                          Message ID                           |        |
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|        |
|                            Length                             |        v
|-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|       ---

PAGE 16 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

4.0 (U) SUMMARY

The FIP currently recognizes UDP, TCP, and ESP as valid Network Layer protocols, and currently sessionizes those packet types. The new requirement for IP/AH/ESP will require changes to the FIP to recognize AH as a valid layer, and will also require changes to the DFCE to allow those packets through.

There has been talk of having application-specific demuxes developed and inserted into the TE to perform any required sessionization beyond the Transport Layer. For example, the ESP demux would be responsible for sessionizing on Spi value.

The Table below summarizes the various protocol stacks, the parts of the stacks that are used in PPF keyword detection, and how the associated packets should be sessionized.

Protocol Stack Keyword Detection Layers Sessionization Requirements
IP/ESP IP, ESP IP Next Protocol = 50
IP Source Address
IP Destination Address
ESP Spi
IP/AH/ESP IP, AH, ESP IP Next Protocol = 51
IP Source Address
IP Destination Address
AH Next Header = 50
AH Spi
ESP Spi
IP/UDP/ISAKMP

* we have separate keywords for ISAKMP Versions 1.0 and 9.9
IP, UDP, ISAKMP IP Next Protocol = 17
IP Source Address
IP Destination Address
UDP Source Port
UDP Destination Port
IP/UDP/nulls/ISAKMP

* we have separate keywords for ISAKMP Versions 1.0 and 9.9
IP, UDP, ISAKMP IP Next Protocol = 17
IP Source Address
IP Destination Address
UDP Source Port
UDP Destination Port

PAGE 17 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123

IP/TCP/ISAKMP

* we have separate keywords for ISAKMP Versions 1.0 and 9.9
IP, TCP, ISAKMP IP Next Protocol = 6
IP Source Address
IP Destination Address
TCP Source Port
TCP Destination Port
IP/TCP/nulls/ISAKMP

* we have separate keywords for ISAKMP Versions 1.0 and 9.9
IP, TCP, ISAKMP IP Next Protocol = 6
IP Source Address
IP Destination Address
TCP Source Port
TCP Destination Port

PAGE 18 OF 18
TOP SECRET//COMINT//REL TO USA, AUS, CAN, GBR, NZL//20291123