---
title: "CAPEC-331: ICMP IP Total Length Field Probe"
url: https://radicalnotion.ai/capec/capec-331
type: capec
description: "An adversary sends a UDP packet to a closed port on the target machine to solicit an IP Header's total length field value within the echoed 'Port Unreachable\" error message. This type of behavior is useful for building a signature-base of operating system responses, particularly when error messages contain other types of information that is useful identifying specific operating system responses."
updated: 2026-06-01
source: RadicalNotion.AI
license: CC BY-NC 4.0 (https://creativecommons.org/licenses/by-nc/4.0/)
---

# CAPEC-331: ICMP IP Total Length Field Probe

- **Abstraction:** Detailed
- **Status:** Stable
- **Typical severity:** Low
- **Likelihood of attack:** Medium
- **CAPEC catalog version:** 3.9

## Description

An adversary sends a UDP packet to a closed port on the target machine to solicit an IP Header's total length field value within the echoed 'Port Unreachable" error message. This type of behavior is useful for building a signature-base of operating system responses, particularly when error messages contain other types of information that is useful identifying specific operating system responses.

RFC1122 specifies that the Header of the request must be echoed back when an error is sent in response, but some operating systems and firmware alter the integrity of the original header. Non-standard ICMP/IP implementations result in response that are useful for individuating remote operating system or router firmware versions. There are four general response types that can be used to distinguish operating systems apart: 1) the IP total length field may be calculated correctly, 2) an operating system may add 20 or more additional bytes to the length calculation, 3) the operating system may subtract 20 or more bytes from the correct length of the field or 4) the IP total length field is calculated with any other incorrect value.

## Prerequisites

- The ability to monitor and interact with network communications. Access to at least one host, and the privileges to interface with the network interface card.

## Resources required

- A tool capable of sending/receiving UDP datagram packets from a remote system to a closed port and receive an ICMP Error Message Type 3, "Port Unreachable."

## Consequences

| Scope | Impact | Note |
| --- | --- | --- |
| Confidentiality | Read Data | - |
| Confidentiality, Access Control, Authorization | Bypass Protection Mechanism, Hide Activities | - |

## Related weaknesses (CWE)

- [CWE-204](https://radicalnotion.ai/cwe/cwe-204): Observable Response Discrepancy

## Related attack patterns

| Relationship | CAPEC | Name |
| --- | --- | --- |
| Parent | [CAPEC-312](https://radicalnotion.ai/capec/capec-312) | Active OS Fingerprinting |

## Frequently asked questions

### What is CAPEC-331?

An adversary sends a UDP packet to a closed port on the target machine to solicit an IP Header's total length field value within the echoed 'Port Unreachable" error message. This type of behavior is useful for building a signature-base of operating system responses, particularly when error messages contain other types of information that is useful identifying specific operating system responses.

### What weaknesses does CAPEC-331 target?

CAPEC-331 exploits one CWE weakness: CWE-204 (Observable Response Discrepancy).

### How severe is CAPEC-331?

MITRE rates CAPEC-331 as Low severity with medium likelihood of attack.

Primary source: [MITRE CAPEC](https://capec.mitre.org/data/definitions/331.html)

---

Source: [RadicalNotion.AI](https://radicalnotion.ai/capec/capec-331). Licensed CC BY-NC 4.0; attribute RadicalNotion.AI and link the source page when you reuse this data.
