arXiv:2610.27456cs.NIOct 2026

Manuscript Offprint

arXiv:2610.27456

NetGuise: Adversarial Traffic Generation for Early-Stage Classifier Evasion

Binghui Wu, Dinil Mon Divakaran, Mohan Gurusamy

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

BINGHUI WU ®^{\text{®}}, National University of Singapore, Singapore

DINIL MON DIVAKARAN, A*STAR Institute of Advanced Intelligence and Computing (IAIC), Singapore

MOHAN GURUSAMY, National University of Singapore, Singapore

Early-stage encrypted traffic classifiers make decisions from only the first few packets of a connection, enabling low-latency classification in high-speed networks. Although these classifiers often achieve high accuracy on clean traffic, their robustness under realistic traffic morphing remains unclear. Existing adversarial traffic generation methods typically assume access to a complete flow, rely on feature-level perturbations that may not map to valid packet sequences, or require iterative runtime feedback. These assumptions do not fully match early-stage morphing. Attacks are confined to a short and structurally rigid initial packet sequence, and morphing must commit actions within these constraints.

We present NETGUISE, a target-conditioned traffic morphing framework for measuring and exploiting the morphability of early-stage classifiers under realistic shaping constraints. NETGUISE generates packet-level tunnel-layer padding and non-negative delay actions that preserve packet direction, ordering, and packet count while respecting MTU, bandwidth, and latency constraints. We instantiate NETGUISE in the use case of censorship evasion, where blocked traffic must be morphed to resemble a specific allowed application. We evaluate NETGUISE under two complementary observation interfaces. The history-only causal interface observes only the packet history available so far and commits one shaping action at a time, supporting online packet-by-packet execution. The full-window oracle interface provides the complete early-stage window before action generation and serves as our main controlled upper-bound characterization of early-stage morphability across datasets, classifiers, and source-target pairs. The gap between the two interfaces quantifies the additional difficulty introduced by causal execution. On VANT, NETGUISE achieves 33.2% mean targeted evasion under the history-only causal interface, compared with 82.0% under the full-window oracle interface; on UTMobileNet, the corresponding results are 5.6% and 81.8%. Despite this reduction, NETGUISE consistently outperforms the strongest causal baseline, BAP, achieving 33.2% versus 15.48% mean targeted evasion on VANT and 5.6% versus 4.11% on UTMobileNet. On VANT, NETGUISE also reduces bandwidth overhead from 19.80% to 3.02% and generation latency from 37.42 ms/flow to 1.16 ms/flow relative to BAP, while requiring no inference-time classifier queries. Under the full-window oracle interface, NETGUISE achieves up to 85.7% targeted evasion and improves over the strongest baseline by up to 20.3%. It retains 43.5% targeted evasion after four rounds of adaptive censor retraining and maintains 48% targeted evasion under zero-shot cross-environment transfer. Additional defense experiments show that extending the observation horizon and restricting directly manipulable features can substantially reduce evasion, while Mininet load-stress experiments show loss-free operation below the evaluated bottleneck capacity and increasing packet loss after the post-morphing demand exceeds that capacity. These results show that early-stage classifiers can remain morphable despite high clean accuracy, and that robustness evaluation should account for targeted morphability, observation constraints, realistic shaping constraints, defender adaptation, and operational network conditions.

CCS Concepts: • Security and privacy → Network security; • Computing methodologies → Machine learning.

Additional Key Words and Phrases: Network traffic analysis, Censorship Evasion, Adversarial Traffic Morphing

1 Introduction

Network-traffic classifiers are increasingly used to support security, monitoring, and network-management tasks, including anomaly detection, website and IoT device fingerprinting, censorship

This is a preprint of our paper accepted to Proceedings of the ACM on Measurement and Analysis of Computing Systems (POMACS), December 2026, and to be presented at ACM SIGMETRICS 2027. Corresponding author: Binghui Wu (E0675868@u.nus.edu). Authors' Contact Information: Binghui Wu and Mohan Gurusamy, National University of Singapore; Dinil Mon Divakaran, A*STAR Institute of Advanced Intelligence and Computing (IAIC), Singapore.

B. Wu et al.

enforcement, traffic analysis, and performance diagnosis [6, 18, 27, 37, 52, 64, 73]. As encrypted protocols such as TLS [46] become widely deployed, packet payloads are no longer available for deep packet inspection. Modern machine learning (ML)-based traffic classifiers (MTCs) for encrypted traffic have emerged as a dominant paradigm, operating on traffic metadata alone (e.g., packet sizes, directions, and inter-arrival times) [19, 20, 40, 52, 55].

At the same time, large networks further push MTCs toward making early decisions. ISPs, enterprise networks, and programmable data planes [11, 39] must handle large numbers of concurrent flows, making it costly to buffer long flow histories before classification [5]. Such in-network deployment motivates early-stage MTCs, where the classifier makes a decision from only the first few packets of a connection, i.e., an early packet sequence, to reduce latency and processing cost [5, 17, 28, 45]. This early-decision requirement is also reflected in measurements of real-world censorship infrastructure showing that encrypted traffic can be passively detected and blocked in real time [65], while studies of early traffic classification optimize for the number of initial packets that must be observed before a reliable decision is made [5]. More generally, delaying classification requires longer per-flow observation and state, increasing decision latency and cost at high-throughput gateways [57]. Prior works [5, 8, 17, 28, 45, 63, 71] have shown that early packet windows can be highly informative for accurate and low-latency traffic classification. Therefore, first-N-packet classification represents a practical trade-off between classification accuracy, decision latency, and per-flow resource cost.

Despite growing interest in early-stage MTCs, their robustness against adversarial evasion under realistic network constraints remains insufficiently tested. This problem is non-trivial because early-stage classification imposes constraints that are absent, or much weaker, in full-flow settings.

① Limited early-stage action space. Because the classifier observes only an early-stage window, the evader must perturb a short and structurally rigid part of the connection. In this window, packet directions, handshake behavior [46], and early timing patterns leave limited room for realizable and semantics-preserving modification. As a result, perturbations that may be feasible over a complete flow can become infeasible within the first few packets.

② Realizability and perturbation asymmetry. MTCs operate on extracted features, but the evader must produce a concrete packet sequence that can traverse real network stacks [27]. Perturbing features in an abstract space does not guarantee that the result maps back to a valid packet sequence. Violations of TLS handshakes or application-layer semantics can make an adversarial example unrealizable [29]. Moreover, realistic traffic shaping is asymmetric. Although packet sizes can be increased through padding, reducing payload size can change transport-layer behavior and expose the evasion attempt. Similarly, packet delays can be increased, but packets cannot be sent earlier than they arrive. In practice, safe shaping operations are therefore limited to additive padding and non-negative delay [62]. This rules out the symmetric perturbation budgets assumed by many adversarial ML methods [51].

③ History-only causal execution. A stricter challenge arises when future packet information is unavailable to the evader. At packet step t, the evader can use only the packet history observed so far and must commit the current shaping action before later packets are available. Once an action is committed, the corresponding packet cannot be modified again.

Existing adversarial traffic generation methods do not fully satisfy the requirements of early-stage robustness evaluation. Many prior methods [29, 36, 37] assume full-flow access, offline manipulation, feature-space perturbations, or iterative runtime feedback. Some attacks [29, 36, 37, 51] optimize feature-level or flow-level representations rather than concrete packet-level actions. Such perturbations may appear effective against a classifier, but they fail to map back to valid packet sequences, exceed the adversary's permitted operations, or alter the original flow semantics [16, 29]. Solver-based methods can enforce richer constraints, but they typically require white-box access or expensive per-flow solving [29, 47, 51, 62]. Learning-based and mutation-based methods face a different difficulty. Sparse rewards, restricted actions, and abstract perturbation targets make it hard to learn stable targeted packet-level strategies with bounded overhead [36, 37, 41]. Moreover, methods that rely on runtime classifier queries can be expensive and impractical when decisions must be made over short packet windows [5]. These limitations mean that existing evasion methods do not directly provide a controlled robustness-evaluation framework for early-stage MTCs. They highlight the need for an early-stage evader that generates concrete packet-level actions, remains realizable under a specified threat model, supports full-window oracle evaluation, and can be tested under history-only causal execution without runtime queries to the deployed classifier.

To address these gaps, we present NETGUISE, a constraint-aware adversarial traffic morphing framework for evaluating the robustness of early-stage encrypted traffic classifiers under realistic shaping constraints. We evaluate NETGUISE in the censorship setting, while its architectural design is applicable to other metadata-based MTCs. Given a source early-stage window and a specified target class, NETGUISE generates concrete packet-level actions that morph the source window toward the target class. Rather than relying on per-flow solvers or runtime classifier queries, NETGUISE learns a reusable morpher with local surrogate classifiers and transfers it to unseen classifiers in a no-query setting. NETGUISE consists of four components. i) First, a morphability-aware target-reference selection strategy accounts for the asymmetry of additive-only morphing and selects a compatible reference within the specified target class. ii) Second, a sequence encoder maps the source window and selected target reference into a shared packet-level representation space. iii) Third, a target-conditioned Transformer aligns the source and target representations and decodes packet-level padding and delay actions. iv) Fourth, a constraint projection layer maps each raw action into the feasible shaping space, enforcing additive-only padding, non-negative delay, MTU compliance, direction and packet-count preservation, and configured bandwidth and latency budgets. The target class is fixed by the evaluation objective, and NETGUISE selects only a compatible reference within that class. Some references can be reached by adding packet size or delay, whereas others would require shrinking packets or changing directions and are infeasible under the threat model. The design of NETGUISE separates the robustness-evaluation objective from the observation interface. We consider two complementary interfaces with different purposes. Under the history-only causal interface ( IcausalI^{causal}), the morpher observes only the packet history available up to the current time and must commit each shaping action before further packets are observed. This interface supports online packet-by-packet execution. For our controlled characterization, we define a full-window oracle interface ( IoracleI^{oracle}), in which the complete early-stage window is available before actions are generated. Because the action for an early packet may depend on later packets in the same window, we treat this offline setting as an upper bound on early-stage morphability. The oracle interface provides a controlled setting for systematic comparison across datasets, classifier architectures, baselines, and source-target directions under the same observation and shaping constraints.

Although NETGUISE is agnostic to the deployment context, we instantiate and evaluate it in the use case of censorship evasion. This use case is particularly demanding for early-stage morphability evaluation. First, censorship evasion has direct societal relevance because state-level censorship affects access to information and privacy-enhancing technologies for large populations [56, 66, 68]. Second, early-stage classification is operationally important for censors operating at ISP or backbone scale: a censor must classify and act before substantive application data is exchanged, both to enforce blocking and to limit collateral damage [10, 56, 60, 61, 65]. Third, censorship evasion induces a strict targeted objective. Unlike anomaly detection, where evasion often means being classified as benign, or website fingerprinting, where landing in a broad unmonitored set may suffice, censorship

B. Wu et al.

evasion requires blocked traffic to be classified as a specific allowed application [65]. This makes it possible to measure which source–target directions are morphable and why.

We evaluate early-stage morphability in two complementary stages. We first establish how morphable these classifiers can be under the controlled oracle setting IoracleI^{oracle}, and then examine how much of this capability remains under causal online execution IcausalI^{causal}. Under IoracleI^{oracle}, our comprehensive evaluation spans three datasets, four censor architectures, and both targeted and untargeted evasion objectives. This setting provides a controlled upper bound on early-stage morphability rather than an online deployment model. NETGUISE achieves up to 85.7% targeted evasion while satisfying all specified shaping constraints under our two-ended tunnel-shaping threat model. It improves targeted evasion over the strongest baseline by up to 20.3% under the same early-stage constraints. In a four-round adaptive arms-race evaluation, where both the evader and censor retrain after each round, NETGUISE retains 43.5% targeted evasion, compared with 17.8% for the strongest baseline. Under zero-shot cross-environment transfer, where the morpher has no access to traffic from the target environment, NETGUISE maintains 48% targeted evasion and over 63% untargeted evasion. We then move to IcausalI^{causal}, where future packet positions are hidden and each shaping action must be committed before later packets are observed, supporting online packet-by-packet execution. Under this stricter interface, NETGUISE achieves 33.2% mean T-ESR on VANT and 5.6% on UTMobileNet. Despite the substantial reduction from the oracle setting, NETGUISE consistently outperforms the strongest causal baseline, BAP, achieving 33.2% versus 15.48% mean targeted evasion on VANT and 5.6% versus 4.11% on UTMobileNet. On VANT, NETGUISE further reduces bandwidth overhead to 3.02% and generation latency to 1.16 ms/flow while requiring no inference-time classifier queries. Across our validity checks, generated flows preserve packet direction, ordering, and packet count, while respecting MTU, bandwidth, and latency constraints. This paper makes the following contributions:

(1) We formulate early-stage traffic morphability as a robustness-evaluation problem for encrypted early-stage traffic classifiers. To the best of our knowledge, this is the first work to systematically evaluate the robustness of early-stage MTCs under realistic packet-level shaping constraints.

(2) We design NETGUISE, a target-conditioned traffic morphing framework that generates concrete packet-level padding and delay actions. The generated actions preserve packet direction, ordering, and packet count, while satisfying MTU, bandwidth, and latency constraints.

(3) We introduce a morphability-aware target-reference selection and alignment strategy that accounts for source–target structural compatibility under additive-only shaping. The target class is fixed by the evaluation objective. NETGUISE selects a compatible reference only within that specified class.

(4) We evaluate NETGUISE across three datasets and four classifier architectures. Our main controlled characterization uses the full-window oracle interface ( IoracleI^{oracle}), while the history-only causal interface ( IcausalI^{causal}) evaluates online packet-by-packet execution. We further study adaptive and feature-restricted defenders, extended observation windows, and end-to-end validity. The results show that early-stage classifiers can remain highly morphable despite high clean accuracy under the oracle upper bound, while causal morphing is substantially more challenging and environment dependent. They also show that robustness depends jointly on source–target morphability, observation constraints, defender adaptation, and operational conditions. To support reproducibility, we release the source code, training pipeline, testbed, and datasets 1^{1}.

1^{1}https://github.com/iwantto321/NetGuise

Ethics considerations. This work studies dual-use traffic-morphing techniques to expose limitations in passive traffic analysis; all evaluations use public or controlled datasets containing no human-subject data, personally identifiable information, or plaintext payloads, and we focus on structural robustness analysis rather than deployment-ready evasion procedures.