skip to content

During an authorised firewall test, what does hping3 traffic look like in the firewall log and to a sensor, and how do you keep the test bounded?

level: seniorimportance: nice to knowfreq 8%

answer

  1. few packets, one source
  2. unusual flag combinations
  3. defaults leave a pattern
  4. count and interval bound it
  5. reconcile sent against logged

basics

~20 s

A few single packets from one source to one host, with unusual flag and port combinations, window 64 and a rising source port. Bound it with -c and -i, and reconcile its summary with the log.

solid answer

~40 s

A defender sees a few single packets, one second apart by default, from one source to one destination, with changing flags and ports, destination port 0 when none is set, TCP window 64 and a source port that rises by one per packet unless `-k` is used. That is the tool's footprint, but every field can be set, so a default is a hint and not proof. To keep the test bounded, set `-c` and `-i`, name the target and port in the change record, run from a documented source address and tell the log owners the window. Afterwards reconcile the summary's packets-sent count with the firewall's log lines for that source, and explain any gap before accepting the result.

go deeper

for a junior

Recall that the footprint is a few single packets from one source, often with odd flags and port 0, and that -c bounds the run.

for a middle

Explain the default fields (window 64, TTL 64, rising source port, one-second pace) and how -c, -i and -k change them.

for a senior

Reconcile sent probes against log lines, explain gaps by rule logging and path, and treat default values as hints.

for a principal

Set the standard for how such tests are scoped, recorded and announced so the logs of a change window can always be read afterwards.

## What the receiver sees hping3 sends one packet per probe, so a test is a handful of packets, not a stream. In a firewall log or a sensor the footprint of a rule-validation run is: - **One source, one target.** A short run of packets from a single address to a single destination, often with several flag combinations in sequence, which reads as a test matrix. - **Unusual flags and ports.** A bare probe is a TCP packet with no flags to destination port 0. With flags chosen, you see lone ACK, FIN, RST or other combinations that ordinary clients rarely send first. - **Default header values.** TCP window 64, TTL 64, a random IP identification, and a source port that starts at a random value and rises by one per packet unless `-k` holds it still. - **A steady pace.** One packet a second by default, set with `-i`; `--fast` is an alias for ten packets a second, `-i u10000`. ## Why a default is only a hint Every one of those values can be set with an option, so a window of 64 or a rising source port marks a sloppy or default-configured probe, not a certain tool. A sensor rule keyed on a default value will fire on a default hping3 run and miss a differently configured packet, and the same value may come from other software. How a signature is written and tuned belongs to the intrusion-detection material; here the point is that the tool's own fingerprint is real but weak evidence. ## Keeping the test bounded 1. **Set a count.** `-c N` makes hping3 send N probes and then wait about a second for replies; without it the run is unlimited. 2. **Keep the pace.** The one-second default is gentle; if you set `-i`, record it. 3. **Name the scope.** Target host, port and flag combinations are written in the change record, and nothing outside it is probed. 4. **Fix the source.** Run from a documented address in the source zone the rule applies to, so the log lines are attributable. 5. **Tell the watchers.** The people who read the firewall log and the sensor know the window and source in advance; authorisation and deconfliction are covered by their own leaf. 6. **Keep the evidence.** File the exact command lines and the hping3 output beside the log extract, so the pair can be re-read months later. 7. **Stop on surprise.** If an unexpected reply appears, such as a host you did not intend, stop and re-check the scope instead of probing further. ## Reconciling the run with the logs The closing summary reports packets sent, packets received and the loss percentage, and the firewall log should hold an entry for each probe that matched a logging rule. Reconcile them: if hping3 says five probes were sent and the log shows three, find out why before accepting the result. | Difference | Possible reasons | |---|---| | Fewer log lines than probes sent | A matching rule has logging off; probes did not reach the device; log rate limiting; a different device handled them | | More log lines than probes | Retransmissions, other traffic from the same source, a second device logging the same flow | | Different action than expected | Rule order, a different matching rule, an interface or zone mismatch | Whether an allowed packet is logged at all depends on the rule's logging setting, so a gap is a question to answer, not an assumption. ## What the test cannot prove A clean run shows how this path treated these packets from this source. It says nothing about other sources, other zones or other protocols, and an empty sensor alert does not prove the probes went unnoticed or that detection is absent, because sensors may not be tuned to alert on low-volume probing at all. ## Rules of engagement Written scope, a change window you own, a bounded count and a known source are the conditions; without them the same packets are an unauthorised probe. Record the exact command lines in the change record, so a reviewer can repeat the test and a log reader can match each line to a probe.

  • Why is a fixed window of 64 weak evidence that a packet came from hping3?
    It is hping3's default, but every header field can be set by the operator, and other software may send the same value. A sensor rule keyed on it fires on a default run and misses a configured one, so treat it as a hint to investigate and corroborate with the packet pattern.
  • The run sent five probes and the firewall log shows three. How do you proceed?
    Do not assume. Check whether the matching rule logs the action at all, whether the probes reached that device, and whether log rate limiting or a second device is involved. Re-run with a control probe if needed, and record the explanation before you accept the result.

  • Default header values prove a packet came from hping3
  • An empty sensor alert proves the probes went unnoticed
  • A test needs no count because probes are one packet each
  • Telling the log owners in advance defeats the purpose of the test
  • Every probe must show in the firewall log, whatever the rule's logging setting