Defending against Traffic Analysis Attacks with Flexible In-Network Obfuscation

Guorui Xie (Pengcheng Laboratory), Qing Li (Pengcheng Laboratory), Zhenning Shi (Tsinghua Shenzhen International Graduate School), Gianni Antichi (Politecnico di Milano), Yijia Zhu (Xidian University), Kejun Li (Pengcheng Laboratory), Changxing Weng (Pengcheng Laboratory), Sebastiano Miano (Politecnico di Milano), Yong Jiang (Tsinghua Shenzhen International Graduate School and Pengcheng Laboratory), Mingwei Xu (Tsinghua University)

23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 3 · Neurons Meet Routers

Overview

Traffic analysis attacks represent a pervasive threat to modern internet privacy, allowing adversaries to infer user activities, identify visited websites, and fingerprint vulnerable IoT devices by analyzing metadata such as packet size, direction, timing, and IP addresses. Conventional defense mechanisms rely on peer-based obfuscation architectures requiring an entry proxy and a cooperating exit proxy (e.g., OBF-A and OBF-B) to coordinate padding and clean traffic recovery. However, this model introduces significant deployment friction, as commercial third-party proxy operators rarely install customized exit-side infrastructure. Furthermore, existing human-designed obfuscation strategies often incur excessive bandwidth overhead and latency penalties.

Watch on YouTube · Slides

Visual summary for Defending against Traffic Analysis Attacks with Flexible In-Network Obfuscation by Guorui Xie, Qing Li, Zhenning Shi, Gianni Antichi, Yijia Zhu, Kejun Li, Changxing Weng, Sebastiano Miano, Yong Jiang, Mingwei Xu
Visual summary for Defending against Traffic Analysis Attacks with Flexible In-Network Obfuscation by Guorui Xie, Qing Li, Zhenning Shi, Gianni Antichi, Yijia Zhu, Kejun Li, Changxing Weng, Sebastiano Miano, Yong Jiang, Mingwei Xu

Key moments

  1. 0:00 Introduction to traffic analysis attacks and defense workflows
  2. 2:00 Limitations of existing defense solutions and proposed SecureDDoS overview
  3. 4:00 Key challenges in designing the flexible obfuscation framework
  4. 6:00 Core contributions and clone-then-modify obfuscation design
  5. 7:30 Obfuscation operations: packet fragmentation and small TTL insertion
  6. 10:00 Neural network training, policy gradients, and loss function
  7. 13:00 P4 programmable data plane implementation and operations
  8. 15:00 Evaluation results, hardware testbed performance, and conclusion

Defending against Traffic Analysis Attacks with Flexible In-Network Obfuscation

Speakers: Guorui Xie (Pengcheng Laboratory); Qing Li (Pengcheng Laboratory); Zhenning Shi (Tsinghua Shenzhen International Graduate School); Gianni Antichi (Politecnico di Milano); Yijia Zhu (Xidian University); Kejun Li (Pengcheng Laboratory); Changxing Weng (Pengcheng Laboratory); Sebastiano Miano (Politecnico di Milano); Yong Jiang (Tsinghua Shenzhen International Graduate School and Pengcheng Laboratory); Mingwei Xu (Tsinghua University)

Conference: USENIX NSDI

YouTube: https://www.youtube.com/watch?v=bXGpPqtsv-I

Overview

Traffic analysis attacks represent a pervasive threat to modern internet privacy, allowing adversaries to infer user activities, identify visited websites, and fingerprint vulnerable IoT devices by analyzing metadata such as packet size, direction, timing, and IP addresses. Conventional defense mechanisms rely on peer-based obfuscation architectures requiring an entry proxy and a cooperating exit proxy (e.g., OBF-A and OBF-B) to coordinate padding and clean traffic recovery. However, this model introduces significant deployment friction, as commercial third-party proxy operators rarely install customized exit-side infrastructure. Furthermore, existing human-designed obfuscation strategies often incur excessive bandwidth overhead and latency penalties.

This talk introduces SecuRetis, a flexible in-network traffic obfuscation framework that eliminates the need for cooperating exit-side proxies. By shifting obfuscation entirely to the user-side network edge and leveraging programmable data planes, SecuRetis dynamically transforms outbound and inbound packet streams using learned strategies optimized via reinforcement learning. The system achieves robust attack evasion while minimizing bandwidth consumption and preserving application-layer performance.

The research matters because it bridges the gap between theoretical machine learning defense mechanisms and high-speed network systems engineering. By implementing complex, neural-agent-guided obfuscation directly in P4-programmable hardware—such as Intel Tofino and FPGA data planes—SecuRetis demonstrates that advanced privacy protections can operate at line rates up to 100 Gbps without requiring widespread protocol redesign or end-to-end administrative cooperation.

Background

▶ Watch: Introduction to traffic analysis attacks and defense workflows (0:00)

The systems and machine learning communities have long wrestled with the tension between cryptographic encryption and metadata privacy. While protocols like TLS and various Virtual Private Network (VPN) tunnels effectively encrypt packet payloads, they leave observable side-channel information intact. Attackers deploy deep neural network classifiers (DNN attack models) trained on traffic features—packet lengths, inter-arrival times, and burst directions—to map encrypted sessions to specific user actions, browsing histories, or hardware profiles.

Prior defense strategies fall into two primary categories: proxy-based tunneling architectures and end-host padding schemes. Proxy-based approaches route traffic through an entry node (OBF-A) and an exit node (OBF-B) to strip padding and reconstruct clean streams. This introduces deployment bottlenecks, as third-party VPN providers do not natively support arbitrary custom obfuscation protocols at their exit gateways.

Alternatively, end-host solutions attempt to alter traffic patterns locally, but they face fundamental systems and algorithmic constraints. First, asymmetric traffic visibility poses a major hurdle: an end-host can easily manipulate outbound traffic heading toward a server, but it lacks direct control over inbound server-to-client traffic without an exit proxy. Second, heuristic or human-designed padding strategies fail to adapt to evolving attacker classifiers, resulting in inflated bandwidth overhead and noticeable latency degradations for web browsing and IoT telemetry. SecuRetis addresses these limitations by pairing a novel asynchronous manipulation strategy with a reinforcement learning optimization loop and an in-network execution model.

Key Findings

▶ Watch: Key challenges in designing the flexible obfuscation framework (4:00)

SecuRetis demonstrates that high-efficiency traffic obfuscation can be achieved entirely at the user-side network edge without exit-proxy coordination. Comprehensive evaluations across synthetic benchmarks, hardware testbeds, and real-world deployments highlight several headline results:

  • Attack Evasion: SecuRetis reduces the prediction accuracy of unknown attacker DNN models by 96% across multiple evaluated attack scenarios.
  • Bandwidth Efficiency: The framework achieves a 42-fold reduction in bandwidth overhead compared to baseline in-network filtering and padding solutions like Dital.
  • Line-Rate Throughput: Hardware implementations sustain real-traffic processing throughputs of 95 Gbps on Intel Tofino programmable switches and 75 Gbps on FPGA testbeds.
  • Latency Performance: Website load times under SecuRetis are 1.8 times faster than baseline in-network defenses, with over 70% of tested web servers exhibiting additional delays of less than 0.15 seconds. IoT devices connected through software and hardware testbeds incur minimal extra latencies ranging from 0.2 to 0.3 seconds.

Technical Deep Dive

▶ Watch: Obfuscation operations: packet fragmentation and small TTL insertion (7:30)

The architectural core of SecuRetis rests on three foundational pillars: novel asymmetric obfuscation operations, a proxy-guided reinforcement learning loop, and a unified data plane processing paradigm.

Obfuscation Operations

Because SecuRetis deploys exclusively at the user-side node (OBF-A) and cannot rely on an exit proxy (OBF-B) to strip payload padding or reconstruct segments, the system employs two distinct, non-invasive operations that manipulate the packet stream natively:

  1. Packet Fragmentation: To alter outbound size distributions and burst patterns, the system leverages standard router fragmentation behaviors. When an outbound packet of length $L$ bytes is processed, the strategy splits it into two pieces of size $A$ and $L - A$ bytes by dynamically rewriting IP and transport-layer headers to maintain protocol legality.
  2. Small TTL Packet Insertion: To obfuscate inbound traffic from servers without an exit proxy, SecuRetis injects synthetic packets with artificially small Time-to-Live (TTL) values. As these fake packets traverse the intermediate network, their TTL drops to zero, triggering intermediate routers to drop them and return ICMP Time Exceeded messages to the sender. This forces the attacker—positioned above the encrypted tunnel—to observe a complex sequence of normal server responses interspersed with synthetic ICMP replies, effectively masking the true conversational flow.

Neural Strategy Optimization

Finding optimal padding, fragmentation, and insertion parameters is mathematically non-differentiable and must account for unknown attacker DNN architectures. SecuRetis solves this using an LSTM (Long Short-Term Memory) neural agent that generates strategy vectors for outbound packet sequences.

The optimization process employs a proxy DNN that acts as a surrogate attacker. The loss function balances three competing objectives:

  • Attack Evader Penalty: Maximizing the classification error (minimizing prediction confidence) of the proxy DNN on the obfuscated traffic sequence.
  • Overhead Penalty: Minimizing extra bandwidth consumed by injected packets and fragmentation headers.
  • Similarity Constraint: Ensuring that statistical deviations between pre- and post-obfuscation sequences remain bounded, guaranteeing generalization against unknown real-world attackers.

Policy gradients derived from the proxy DNN's feedback update the LSTM agent iteratively until it converges on an optimal obfuscation strategy.

Programmable Data Plane Integration

To execute these strategies at line rate, SecuRetis unifies all obfuscation primitives under a "clone then modify" abstraction implemented in P4 for Intel Tofino switches and FPGA platforms.

The pipeline separates responsibilities between ingress and egress stages:

  • Ingress Pipeline: Matches incoming packets against strategy entries stored in lookup tables and maintains sequence counters.
  • Clone Engine (PRIE): Replicates designated packets from one to two instances when fragmentation or insertion is triggered.
  • Egress Pipeline: Modifies original and cloned packet headers independently to construct legal fragments or valid fake packets.

The strategy allows strategy elements to evaluate to zero, enabling variable-length, non-continuous obfuscation that adapts dynamically without degrading throughput.

Experimental Setup & Results

▶ Watch: Neural network training, policy gradients, and loss function (10:00)

The evaluation of SecuRetis spans three rigorous testing environments: dataset simulations, high-speed synthetic hardware testbeds, and real-world network deployments.

  • Datasets & Attack Scenarios: Evaluated against 9 distinct attacker DNN models and legacy defense baselines across diverse traffic traces.
  • Hardware Testbeds: Benchmarked using an Intel Tofino programmable switch testbed and an FPGA testbed, processing high-speed synthetic traffic ranging from 20 Gbps to 100 Gbps.
  • Real-World Deployment: Tested by visiting 26 web servers and 2 IoT hubs through a commercial NordVPN proxy server, measuring end-user latency and operational overhead.

Headline Results

| Metric | Baseline (Dital) | SecuRetis | Improvement / Factor |

| :--- | :--- | :--- | :--- |

| Attack Accuracy | High (Baseline) | Reduced by 96% | 96% evasion success |

| Bandwidth Overhead | High | 42x lower | 42x reduction |

| Line-Throughput (Tofino) | N/A | 95 Gbps | Line-rate capable |

| Line-Throughput (FPGA) | N/A | 75 Gbps | High-speed processing |

| Web Load Time | Baseline | 1.8x faster | Superior user experience |

In real-world web browsing tests, over 70% of the 26 target web servers experienced negligible added delay (under 0.15 seconds). IoT deployments over the software testbed recorded minimal extra latency overhead of 0.2 to 0.3 seconds.

Practical Implications

▶ Watch: Evaluation results, hardware testbed performance, and conclusion (15:00)

For infrastructure teams and network operators, SecuRetis offers a paradigm shift in deploying metadata privacy protections. By eliminating the requirement for synchronized commercial exit proxies, network administrators can deploy robust traffic analysis defenses entirely at the enterprise or user edge.

For model builders and security engineers, the integration of LSTM-based strategy generators with P4 programmable data planes proves that machine learning agents can guide hardware data planes without introducing unacceptable latency or hardware stalls. However, practitioners must carefully tune the preference parameter ($PR$) governing the probabilistic tradeoff between packet fragmentation and small TTL insertion to match specific upstream link characteristics and prevent accidental bandwidth saturation under heavy traffic bursts.

Key Takeaways

  • Exit-Proxy Independence: SecuRetis removes the need for cooperating third-party exit proxies (OBF-B), solving a major deployment barrier in privacy-enhancing overlay networks.
  • Asymmetric Obfuscation: Combines outbound packet fragmentation with small TTL packet insertion to effectively obfuscate both outbound and inbound traffic streams.
  • Learned Optimization: Employs an LSTM neural agent trained via policy gradients from a surrogate proxy DNN to minimize bandwidth overhead while evading attacks.
  • Line-Rate Programmability: Unified "clone then modify" data plane logic enables high-speed execution in P4 on Intel Tofino switches (95 Gbps) and FPGA platforms (75 Gbps).
  • Superior Efficiency: Delivers a 96% reduction in attacker prediction accuracy and a 42-fold decrease in bandwidth overhead compared to existing in-network filters like Dital.

About the Speaker(s)

The research presented represents a collaborative effort across multiple leading academic and research institutions. Guorui Xie delivered the presentation representing the primary research team from Pengcheng Laboratory, alongside co-authors and researchers from Tsinghua University, Tsinghua Shenzhen International Graduate School, Politecnico di Milano, and Xidian University. The team specializes in high-speed programmable networking, network security, and machine learning-driven traffic engineering.

Reviews

→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)

All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)