|
1 | | -# SPDX-License-Identifier: GPL-3.0-or-later |
2 | | -# |
3 | | -# GNS3-Skills - Packet analysis rules for AH |
4 | | -# |
5 | | -# Copyright (C) 2025 Yue Guobin |
6 | | -# |
7 | | - |
8 | | -name: "IPsec AH Packet Analysis" |
9 | | -description: "IPsec AH (Authentication Header) packet analysis for VPN integrity checking" |
10 | | - |
11 | | -# Protocol identifier - LLM uses this to query the protocol definition |
12 | | -protocol_key: "ah" |
13 | | - |
14 | | -# tshark display filter - used for -Y parameter |
15 | | -display_filter: "ah" |
16 | | - |
17 | | -# tshark fields that LLM can use for analysis |
| 1 | +name: IPsec AH Packet Analysis |
| 2 | +description: IPsec AH (Authentication Header) packet analysis for VPN integrity checking |
| 3 | +protocol_key: ah |
| 4 | +display_filter: ah |
18 | 5 | fields: |
19 | | - - label: "Frame Number" |
20 | | - tshark_field: "frame.number" |
21 | | - description: "Packet sequence number in capture" |
22 | | - |
23 | | - - label: "Next Header" |
24 | | - tshark_field: "ah.next_header" |
25 | | - description: "Next header protocol after AH" |
26 | | - |
27 | | - - label: "Length" |
28 | | - tshark_field: "ah.length" |
29 | | - description: "AH header length" |
30 | | - |
31 | | - - label: "SPI" |
32 | | - tshark_field: "ah.spi" |
33 | | - description: "Security Parameters Index" |
34 | | - |
35 | | - - label: "Sequence Number" |
36 | | - tshark_field: "ah.sequence" |
37 | | - description: "AH sequence number (anti-replay)" |
38 | | - |
39 | | - - label: "ICV" |
40 | | - tshark_field: "ah.icv" |
41 | | - description: "Integrity Check Value" |
42 | | - |
| 6 | +- label: Frame Number |
| 7 | + tshark_field: frame.number |
| 8 | + description: Packet sequence number in capture |
| 9 | +- label: Next Header |
| 10 | + tshark_field: ah.next_header |
| 11 | + description: Next header protocol after AH |
| 12 | +- label: Length |
| 13 | + tshark_field: ah.length |
| 14 | + description: AH header length |
| 15 | +- label: SPI |
| 16 | + tshark_field: ah.spi |
| 17 | + description: Security Parameters Index |
| 18 | +- label: Sequence Number |
| 19 | + tshark_field: ah.sequence |
| 20 | + description: AH sequence number (anti-replay) |
| 21 | +- label: ICV |
| 22 | + tshark_field: ah.icv |
| 23 | + description: Integrity Check Value |
43 | 24 | filter_examples: |
44 | | - - name: "Specific SPI" |
45 | | - filter: "ah.spi == 0x12345678" |
46 | | - description: "Filter for specific AH SPI" |
47 | | - |
48 | | - - name: "AH transport mode" |
49 | | - filter: "ah.next_header == 4 or ah.next_header == 6 or ah.next_header == 17" |
50 | | - description: "Filter for AH transport mode (direct protocol)" |
51 | | - |
52 | | - - name: "AH tunnel mode" |
53 | | - filter: "ah.next_header == 4" |
54 | | - description: "Filter for AH tunnel mode (IP-in-IP)" |
55 | | - |
56 | | - - name: "AH with IPv4" |
57 | | - filter: "ah and ip" |
58 | | - description: "Filter for AH with IPv4 payload" |
59 | | - |
| 25 | +- name: Specific SPI |
| 26 | + filter: ah.spi == 0x12345678 |
| 27 | + description: Filter for specific AH SPI |
| 28 | +- name: AH transport mode |
| 29 | + filter: ah.next_header == 4 or ah.next_header == 6 or ah.next_header == 17 |
| 30 | + description: Filter for AH transport mode (direct protocol) |
| 31 | +- name: AH tunnel mode |
| 32 | + filter: ah.next_header == 4 |
| 33 | + description: Filter for AH tunnel mode (IP-in-IP) |
| 34 | +- name: AH with IPv4 |
| 35 | + filter: ah and ip |
| 36 | + description: Filter for AH with IPv4 payload |
60 | 37 | checks: |
61 | | - - name: "ah_sequence_gap" |
62 | | - severity: major |
63 | | - message: "AH sequence gap: possible replay or packet loss" |
64 | | - condition: "ah.sequence jumps by more than expected window" |
65 | | - |
66 | | - - name: "ah_replay_attack" |
67 | | - severity: critical |
68 | | - message: "AH possible replay attack: duplicate sequence {ah.sequence}" |
69 | | - condition: "Duplicate ah.sequence for same ah.spi" |
| 38 | +- name: ah_sequence_gap |
| 39 | + severity: major |
| 40 | + message: 'AH sequence gap: possible replay or packet loss' |
| 41 | + description: ah.sequence jumps by more than expected window |
| 42 | + condition: null |
| 43 | +- name: ah_replay_attack |
| 44 | + severity: critical |
| 45 | + message: 'AH possible replay attack: duplicate sequence {ah.sequence}' |
| 46 | + description: Duplicate ah.sequence for same ah.spi |
| 47 | + condition: null |
0 commit comments