NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Portscan Detection with Sampled NetFlow

Ignasi Paredes-Oliva, Pere Barlet-Ros, Josep Solé-ParetaTma 2009

TL;DR

This paper investigates how network traffic sampling, a common technique to reduce router load, impacts the effectiveness of portscan detection algorithms. The authors found that while flow sampling generally performed better with one algorithm (TRW), packet sampling surprisingly outperformed flow-based methods with another (TAPS), challenging previous assumptions.

What Problem Does This Paper Address?

Network monitoring is crucial for security and management, but high-speed links generate massive amounts of data. To cope, network devices often employ sampling techniques, like Sampled NetFlow, to reduce the volume of traffic data processed. However, this sampling can distort the data, potentially hindering the accuracy of security tools like portscan detectors. Portscans are often precursors to more significant attacks, making their reliable detection vital. This paper addresses the critical question of how different sampling methods (packet sampling, flow sampling, and sample-and-hold) affect the performance of two popular portscan detection algorithms (TRW and TAPS), particularly when aggressive sampling rates are used.

Methods

The researchers evaluated two portscan detection algorithms:

  • Threshold Random Walk (TRW): This algorithm identifies scanners by tracking the ratio of failed connection attempts to successful ones. A modification (TRWSYN) was used to identify failed connections as single SYN-packets.
  • Time-based Access Pattern Sequential hypothesis testing (TAPS): This method focuses on the ratio of destination IPs to destination ports (or vice-versa) for a given source IP. A significantly higher ratio suggests scanning activity.

They tested three sampling methods:

  • Packet Sampling (PS): Each packet is sampled with a fixed probability p.
  • Flow Sampling (FS): Each flow (defined by a 5-tuple: source/destination IPs and ports, protocol) is sampled with a probability p.
  • Sample and Hold (SH): Packets from already seen flows are passed through, while new flows are sampled with a probability p.

A key methodological contribution is how they ensured comparability between sampling methods. Instead of using the same sampling rate N (which has different meanings for each method), they conducted experiments under two scenarios:

  1. Equal portion of packets: They adjusted the sampling parameters for FS and SH to ensure they sampled the same percentage of packets as PS.
  2. Equal portion of flows: They adjusted the sampling parameters for PS and SH to ensure they sampled the same percentage of flows as FS.

Datasets

The study used a 30-minute NetFlow traffic trace from the Gigabit access link of the Universitat Politècnica de Catalunya (UPC). This trace provided real-world data from a large university network.

Key Insights and Ideas

  • Challenging Conventional Wisdom: Contrary to some prior studies that favored flow sampling for portscan detection, this research found that packet sampling could outperform flow-based methods (FS and SH) when used with the TAPS algorithm, especially when comparing based on an equal fraction of packets.
  • Algorithm-Specific Sensitivity: The robustness to sampling varied significantly between the two detection algorithms. TRW's performance degraded dramatically with increasing sampling rates, while TAPS remained effective even at very high sampling intervals (low sampling rates).
  • The Importance of the Comparison Metric: The choice of whether to equalize the fraction of packets or the fraction of flows between sampling methods had a notable impact on the results, highlighting the need for careful experimental design.
  • TRW's Vulnerability: TRW's reliance on specific packet features (like single SYN-packet flows) made it particularly susceptible to packet loss due to sampling, leading to a high number of false positives in some scenarios.
  • TAPS's Resilience: TAPS's connectionless-oriented approach and its focus on broader traffic patterns made it inherently more robust to sampling, maintaining a low false positive rate across most configurations.

Key Results

  • TRW Performance: Success ratio for TRW degraded significantly with increasing sampling rates, reaching zero at higher sampling intervals. False positive ratios were higher when comparing based on an equal fraction of packets, with PS showing a notable peak.
  • TAPS Performance: TAPS demonstrated much better resilience to sampling. Its success ratio remained relatively high even at high sampling intervals. False positive rates for TAPS were consistently low (< 2%) across all sampling methods and comparison metrics.
  • Packet vs. Flow Sampling with TAPS: When comparing based on an equal fraction of packets, PS performed best for TAPS. However, when comparing based on an equal fraction of flows, the accuracy was similar across PS, FS, and SH for TAPS.
  • TRW vs. TAPS: TAPS detected significantly more scanners than TRW, both with and without sampling. TAPS also consistently showed lower false positive ratios than TRW.

Limitations and Future Work

  • Single Network Scenario: The study was conducted on a single network trace from a university. The authors suggest validating results with more NetFlow traces from diverse networks to confirm their findings.
  • Limited Algorithms: The research focused on two specific portscan detection algorithms. Extending the study to include other sampling methods and anomaly detection algorithms is a planned future work.
  • Ground Truth Definition: The authors acknowledge that their "ground truth" of scanners (detected without sampling) might include some false positives. Their focus was on the degradation due to sampling rather than absolute detection accuracy.

The authors aim to extend their work by exploring more sampling methods and anomaly detection algorithms, and by validating their findings across a wider range of network environments.

Summary updated

BibTeX
@inproceedings{paredesoliva2009portscan,
  author = {Ignasi Paredes-Oliva and Pere Barlet-Ros and Josep Solé-Pareta},
  title = {{Portscan Detection with Sampled NetFlow}},
  booktitle = {Tma},
  year = {2009},
  doi = {10.1007/978-3-642-01645-5\_4},
}

Loading related content...

Figure