Abstract
Zero-day attack detection defies signature-focused monitoring because the attack fails to produce an existing indicator. This paper develops and then tests a behaviour-based machine-learning model via a completely synthetic, reproducible experiment that forces the model to discover new attacks in a setting where all zero-day attack families are held out for evaluation. Twelve host and network features capture various forms of connection activity, destination address diversity, failed login activity, asymmetric data transfer, domain name server (DNS) entropy, process creation, file creation and modification, superuser activity, periodic communication, burstiness, egress address diversity, and total session duration. Five classifiers compare in a zero-day experiment with 4,000 benign samples and 5,400 withheld attack samples: Isolation Forest, one-class support vector machine (OCSVM), reconstruction-based multilayer perceptron, supervised random forest, and a simple rank-based ensemble of all four. At a controlled five percent benign false-positive rate, OC SVM outperforms others with ROC-AUC 0.791, PR-AUC 0.866, recall 0.507, precision 0.932, and F1 0.657. The supervised classifier captures 5.46% of withheld attacks, an effect that highlights the danger in assessing zero-day claims using random train-test splits containing related attack types. A bootstrap 95% confidence interval for the ensemble ROC-AUC is 0.751-0.769. Seven original figures explain separability, score overlap, operating thresholds, family-level recall, confusion, and learned feature emphasis.
INDEX TERMS: zero-day threat, anomaly detection, behavioural analytics, intrusion detection, machine learning, Isolation Forest, one-class SVM, auto-encoder, cybersecurity simulation.

Vol.1, Issue. 3, PP. 37-47

1. Introduction

For a long time, security monitoring has been based on signatures, rules, hashes, domains, byte patterns, and signals based on a set of known past incidents, and they serve some purpose because they can be accurate and operationally useful. The core problem is time: an unidentified exploit or a freshly assembled attack chain isn't necessarily known to the rule at the moment it shows up, so a zero-day attack can slip past a detector that merely queries: Is it similar to some artifact I've already seen? A behaviour based detector asks a broader question: is the sequence of actions materially deviant from the learned operating profile of the protected environment?

Behaviour-based detection does not rely upon knowing the exploited vulnerability, but instead upon consequence and precursor event signatures like high connection rates, new destinations, shifts in transfer ratios, repeated authentication failures, unexpected process creation, spikes in file alterations, privilege escalations, or beacon-like network communications. None of these in itself are definitive evidence of compromise, as backup tools, administrators, mass software install systems, and shifts in traffic will create them. The fundamental technical challenge is then statistical discrimination with overlap, class imbalance, drift, and asymmetric costs.

Machine learning is interesting because multivariate models can encode relationships that are more complex than independent thresholds. It may be less of a threat when destination is known and the process is authorized, but more significant when combined with a novel destination and an identity check failure. Unsupervised and one-class classifiers are particularly pertinent to zero day detection because they can be trained on mostly benign data. The supervised classifier offers an interesting baseline: it may work well against attack types it has seen in training but it can fall flat when the evaluation contains behavior families it has not seen during training.

Published reviews describe ML as promising for capturing statistical characteristics of attacks, while also identifying unresolved problems in accuracy, recall, consistency across attack types, data quality, concept drift, and realistic evaluation [1]. Therefore, zero-day detection cannot rely solely on a random split of a labeled intrusion data set. Examples from the same attack family can be found on both sides of the split, and the model would learn to recognize the family structure rather than a truly novel behavior. In this study we use family holdout: the three test threat families are not present in any training.

It's a simulation! No live malware, no exploit code, no packet capture, and no vulnerable enterprise telemetry. With synthetic feature distributions, we can precisely control what the models have access to, reproduce every result from a fixed seed, and prevent accidental release of real adversary behavior. The drawback is external validity: the outputs demonstrate what the approach does given revealed assumptions, not what it would do within a commercial security product in a production network.

There are six main points: First, the explicit twelve-feature behavior model is transparent. Second, three anomaly learners, one supervised baseline and one rank ensemble, are compared at the same false-positive rate. Third, unseen families suggest exfiltration like behavior, living off the land, and low-amplitude beaconing. Fourth, ROC and precision-recall metrics are both provided, and per-family recall and counts of confusion are included. Fifth, a bootstrap interval measures sampling uncertainty. Sixth, multiple explanatory figures connect geometric separability, score distributions, thresholds, family difficulty, and feature emphasis.

The key takeaway is less impressive than dramatic. No model comes close to hitting near 100% recall. At our 5% false-positive threshold, the best model finds about 50% of the synthetic zero-day cases. While precision remains very high because the prevalence of the test data is so high, real-world precision would decline in a lower-prevalence setting. This outcome confirms that behavior ML is a triage and prioritization layer that needs calibration, contextualization, analyst input, and multiple measures of control.

Zero-day attacks exploit vulnerabilities not known by any defenders or attack behaviors not covered by any detection content. NIST-hosted review material states that traditional signatures are ineffective when attack signatures are unavailable and describes ML approaches as promising for capturing statistical characteristics [1]. In the same review, it commented on the shortcomings of accuracy, recall, and uniform performance across attack categories.

Anomaly intrusion detection is often performed using one-class boundaries, tree-based isolation, density estimation, clustering, reconstruction error, and ensembles. Isolation Forest partitions observations randomly and assigns larger anomaly values to points isolated with short paths. OCSVM estimates a boundary around the normal region in a kernel space. Reconstruction models learn to reproduce normal vectors; observations with large reconstruction error are considered anomalies. Supervised classifiers learn class boundaries from labeled benign and attack examples.

Evaluation transparency is the research gap tackled in this work. It is possible to generate scores that seem promising by leaking data, overcounting duplicate flows, having overlaps in attack families, not reporting thresholds, and unrealistic attack to benign event ratios.


II. SYSTEM AND THREAT MODEL

An observation is an entity-time window aggregate (e.g., a host over a fixed monitoring window). The feature vector xR¹² is a vector of normalized behavioral measurements. The benign generator is a correlated multivariate Gaussian, which is used for capturing the correlation between connection rate and destination diversity. Known training attacks' populations shift scan-like and credential-abuse variables. Disjoint or partially disjoint variables are shifted for test-only families to simulate semantic novelty.

Exfiltration-like behavior: boosts outbound-to-inbound byte ratio, DNS entropy, egress novelty, session duration Living-off-the-land: boosts process spawning, file modifications, privilege activity, and moderate beaconing Stealth beacon: introduces smaller DNS, beaconing, and egress shifts, and decreases overall amplitude These are just names that describe synthetic behavioral patterns, not attack recipes that can be run.

x*=(x−μ_B)/σ_B.     (1)

Equation (1) standardizes every feature with benign-training statistics. Withheld threats are prevented from affecting preprocessing using benign statistics. There are 4,000 samples of benign and 1,800 samples from each of the unseen threat families in the test set.


III. MACHINE-LEARNING FORMULATION
A. Isolation Forest

Isolation Forest recursively selects a feature and split value. Rare observations generally require fewer partitions. For path length h(x), sample size ψ, and normalization c(ψ), the anomaly score is

s_IF(x)=2^{−E[h(x)]/c(ψ)}.     (2)

The simulation uses 180 trees and contamination 0.04. Scores are oriented so larger values indicate stronger anomaly evidence.

B. One-Class Support Vector Machine

OCSVM estimates a maximum-margin boundary around benign training observations. With radial-basis kernel K and parameter ν, its decision function is

f(x)=Σ_i α_i K(x_i,x)−ρ.     (3)

s_OC(x)=−f(x).     (4)

The model uses ν=0.04 and automatic kernel scale. To maintain manageable quadratic complexity, it is fitted to 7,000 benign training observations.

C. Reconstruction-Based Neural Model

A multilayer perceptron with dimensions 12-16-6-16-12 is trained to reconstruct benign vectors. The anomaly score is mean feature reconstruction error:

s_AE(x)=(1/d)Σ_j[x_j−g_θ(x)_j]².     (5)

The bottleneck encourages a compact normal representation. Early stopping is enabled. This is an autoencoder-style reconstruction model implemented with an MLP regressor.

D. Supervised and Ensemble Models

The supervised random forest is trained with benign observations plus two known attack families, scan-like and credential-abuse. No exfiltration, living-off-the-land, or stealth-beacon samples are used. Its low withheld-family recall tests the risk of label-space dependence.

s_ENS(x)=(rank(s_IF)+rank(s_OC)+rank(s_AE))/3.     (6)

Rank fusion avoids forcing incompatible raw-score scales into one average. The ensemble is diversity oriented, although weak reconstruction scores can dilute the strongest OCSVM output.

 E. Threshold and Metrics

For each model, the threshold τ is the 95th percentile of scores on held-out benign calibration observations. This fixes the empirical benign false-positive rate at 5%.

ŷ=1[s(x)≥τ].     (7)

Recall=TP/(TP+FN),  Precision=TP/(TP+FP).     (8)

F1=2·Precision·Recall/(Precision+Recall).     (9)

ROC-AUC measures ranking across all thresholds. PR-AUC emphasizes precision-recall behavior and is more informative when attacks are uncommon. Reported precision depends on simulated prevalence and must not be transferred directly to production.

III. EXPERIMENTAL PROTOCOL AND VALIDATION
Benign training has 14,000 observations, the supervised baseline has a further 3500 scan-like and 3500 credential-abuse observations, and the final test set has 9400 observations. Each generator and model that uses random state 42 will be initiated with deterministic seeds. The zero-day families are generated only once the sets of train samples are fixed, and never contribute to fitting or standardization.

Fig. 1. 2D projection of a random subset of standard-test behavior, after PCA. Exfiltration and living-off-the-land observations are depicted in partly shifted clouds; stealth-beacon observations are heavily overlapping with benign activity. PCA is used for visualization only; we do not train our model on this projection. The overlap accounts for why realistic recall is low at a strict false positive operating point.

Validation checks confirm feature dimension, finite standardized values, disjoint array construction, exact family counts, thresholds calculated from benign test scores only, false-positive rate equal to 0.05, and consistent metrics from the confusion matrix. 1000 stratification-agnostic bootstrap resamples used for the ensemble ROC-AUC interval. Figures and tables are obtained directly from the stored score vectors.

Figure 1 is far from a full detector - the 12 dimensions have been condensed to two, so some degree of separability is sacrificed. Its purpose is one of explanation: the test topology presents both clear and obscured novelty. The exfiltration cloud diffuses as multiple network variables change in unison. Living-off-the-land behavior iterates over the host variables. And the stealth beacon diffuses slightly toward normal, creating the hardest family.

Fig. 2. Density of rank-ensemble anomaly scores by family. The dashed line represents the 95th-percentile benign threshold; scores to the right will trigger an alert. Threat mass to the left of the threshold indicates false negatives; benign mass to the right of the threshold indicates false positives.

Figure 2 links model outputs to operational significance. Exfiltration exhibits the largest rightward shift. Living-off-the-land is distinguishable but overlaps with the benign tail. Stealth beaconing features extensive overlap, indicating that low-amplitude activity cannot be clearly distinguished without more information. Moving the threshold left increases recall and analyst workload; moving it right reduces false positives while missing more threats.

IV. RESULTS

TABLE I. Withheld-Family Zero-Day Test Results

The OCSVM is our strongest overall model with ROC-AUC of 0.791, PR-AUC of 0.866, recall 0.507, precision 0.932, and F1 of 0.657. The next best performing model is the isolation forest with ROC-AUC of 0.773 and recall of 0.443. Weaker reconstruction model, as its compact benign reconstruction does not always distinguish the low amplitude threat family. The supervised random forest suffers from poor recall of 0.055, despite observing two attack classes.

The supervised result is significant. It does not imply that random forests are inappropriate for security. This indicates that a classifier that aims at separating benign observations from known specific families may rely on the features that characterize these families. The probability scores might stay quite low when testing attack changes other variables.The ensemble gets ROC-AUC 0.760, PR-AUC 0.840, recall 0.430, precision 0.921 and F1 0.586.

The ensemble's bootstrap ROC-AUC 95% interval is 0.751-0.769. Fusion does even out score scale, and single model idiosyncrasies but is not guaranteed to do better than simple averaging. In this, weaker reconstruction member lowers ensemble under OCSVM. In this case, the weaker reconstruction member pulls the ensemble's score down.

Fig. 3. ROC curves for all detectors. The top performing detector (OCSVM) has the most area under its ROC curve, followed by the next best (Isolation Forest). ROC Curves represent threshold-independent discrimination, but can yield over-optimistic results when negative observations outweigh positive ones.

Figure 3 shows the entire sensitivity-specificity trade-off: the nearer to the top-left the curve, the higher the detection at a given false-positive rate. None of these curves enters the top-left-most boundary, a situation that reflects the overlap inherently introduced in the experiment. The operating point given in Table I is the one corresponding to the threshold that introduces 5% benign false positives, not the one that maximizes F1.



Fig. 4. Precision-recall curves. The legend shows average precision. Precision-recall (PR) curves illustrate the way precision decreases as recall is increased by reducing the detection threshold. The baseline PR level depends on the prevalence of threat in this test, 57.4%, and would be much lower in production, sparser alert streams.

Figure 4 avoids this mistake. High ROC-AUC alone does not ensure manageable alert quality. Precision quantifies what percentage of alerts are truly attacks under the simulated prevalence; if real attack prevalence is significantly lower, then even a (low) false-positive rate may overwhelm the queue. Production calibration should take this into account by including a realistic base rate and/or alert-volume limit.


Fig. 5. Recall by withheld behavior family. Exfiltration is the easiest, as it has the most extensive set of strongly shifted network features. Living-off-the-land (LOL) is, well, intermediate. Stealth beaconing is the hardest, as its relatively faint feature set overlaps with benign variation. The supervised RF is particularly fragile against families unseen in training.

Figure 5 shows the details obscured by aggregate recall. A detector can be fine for everyone but fail a particular family. Family-level performance evaluation is thus an absolute requirement for zero-day validation. This figure also hints at possible operational improvements: host telemetry could improve living-off-the-land detection, sequence of time features could improve beacon detection, and destination reputation or data-sensitivity context could improve exfiltration triage.



Fig. 6. Confusion matrix of the fixed-threshold rank ensemble. There are 3,800 correct benign decisions, 200 false alerts, 2,320 detected threats and 3,080 missed threats. These numbers are given by the 5% FPR and 42.96% recall.

The chart of where rates lead you to workload and risk is below: The second chart below shows what two hundred false positives in a test with 4,000 benign windows would be, along with the number of lost threats. It demonstrates the reason why the model should not be used as an independent blocking mechanism. Its place is that of risk scoring, prioritization, correlation, and analyst assistance, nested within layered defences.


Fig. 7. Supervised random-forest feature importance following training on benign, scan-like, and credential-abuse observations. Connection rate, destination diversity, failed authentication, and privilege-related features are important because they differentiate the known training attacks. Core features of withheld exfiltration and Stealth behaviors are not heavily influencing, explaining low recall of zero-days.

Figure 7 This is a model-specific diagnostic. It is not a causal explanation. For impurity-based importance, variables can gain favor due to several potential split opportunities, and it can be shifted among correlated variables. Still, the noted emphasis aligns with the supervised training mix. This echoes the paper’s primary methodological takeaway: that strong performance on known labels does not imply that a model will generalize to unseen families.


V. OPERATIONAL ARCHITECTURE

One feasible pipeline aggregates endpoint and network telemetry to entity-time windows, performs schema validation, normalizes with versioned benign baselines, executes model scoring, calibrates scores to an alert budget, and enriches alerts with asset criticality, identity context, vulnerability exposure and temporal history. The models should output risk scores, not attribution. Behavioral anomalies can be correlated with other indicators and policy violations in a separate correlation layer.

Thresholds must be linked to costs, low threshold to high-criticality assets, high volume commodity endpoints, could have more rigid alert budgets, per entity baselines could address role variations that give rise to false-positives. Analysts need an indication of which features, recent changes pushed the alert, but makes the point that explanation values are model behaviors, not proof.

Model governance is an element of detection quality. The model training dataset should be audited for provenance, the time bounds, duplicate detection, family-aware splits, label leakage detection. The tracking should record score distribution, false-positive impact, family coverage, feature drift, missing telemetry, analyst feedback. Retraining should have rollback, champion challenger comparison, and historical tests preservation so that it will not regress.

VI. SECURITY AND ROBUSTNESS CONSIDERATIONS

Behavioral models are vulnerable to adversarial mimicry, poisoning, evasion, and telemetry manipulation. Low-and-slow activity can stay within the "normal" envelope. Attackers may implement behavioral changes on separate hosts or leverage legitimate tools. Training contamination can diffuse the notion of "normal" learned. Defenses include robust statistics, segmented baseline data, protected telemetry, delayed-label review, ensemble diversity, temporal graph features, and independent rules for high-consequence actions.

False positives are not just a nuisance. Too many false positives consume analyst attention and could hide real incidents. False negatives introduce unclassified exposure. Asymmetric costs will drive the optimal operating point:

C(τ)=c_FP·FP(τ)+c_FN·FN(τ)+c_A·Alerts(τ).     (10)

The 5% threshold in this paper is a reproducible reference, not a universal recommendation. Operational calibration should use a realistic benign volume and capacity for investigation.


VII. LIMITATIONS AND THREATS TO VALIDITY

The data are artificial Gaussian-style features with manually chosen shifts. Actual telemetry is blended, seasonal, censored, categorical, heavy-tailed, graph-structured, and time-dependent. There is incomplete feature extraction, as well as lag in and uncertainty around labels. Numerical values must not be taken as average production performance.

The reconstruction MLP did not converge fully within 160 iterations, but its early-stopping and simulation consistency are maintained (comparison reproducibility). Hyper parameters were not exhaustively tuned, avoiding test-set optimization but leaving room for improvement. Threshold use is held-out benign test scores, this constitutes a calibration set in the simulation; in a real evaluation this should be a calibration period and a test period.

Attack prevalence is purposefully set high to stabilize family measures. The precision will generally change according to varying prevalence. Family labels are behavioural archetypes not ground truth for specific exploits. PCA will inevitably collapse dimensions. Feature importance is not causality. Lastly, a true zero day cannot be exhaustively represented ahead of time, which means family holdout acts as a proxy for semantic novelty as opposed to a proof of universal detection.

Conclusion

This paper showed a simulation only, formula evaluation of behavior ML for withheld-family zero-day threat detection. OCSVM achieved the best score, while the supervised classifier didn't generalize to attackers outside known families. The test demonstrates why zero-day experiments demand family holdout, explicit thresholds, PR in addition to ROC, family-by-family recall, confusion counts, and open-ended limits. Behavior ML also gives more emphasis to unknown activity; but it does not remove the gray area between advanced threats and normal behavior. The best practice deployment remains layered, calibrated, interpretable, and in ongoing observation.

References

[1] Y. Guo, “A review of machine learning-based zero-day attack detection: Challenges and future directions,” Computer Communications, vol. 198, pp. 175–185, 2023.

[2] F. T. Liu, K. M. Ting, and Z.-H. Zhou, “Isolation Forest,” in Proc. IEEE ICDM, 2008.

[3] B. Schölkopf et al., “Estimating the support of a high-dimensional distribution,” Neural Computation, vol. 13, no. 7, pp. 1443–1471, 2001.

[4] G. E. Hinton and R. R. Salakhutdinov, “Reducing the dimensionality of data with neural networks,” Science, vol. 313, pp. 504–507, 2006.

[5] L. Breiman, “Random forests,” Machine Learning, vol. 45, pp. 5–32, 2001.

[6] T. Fawcett, “An introduction to ROC analysis,” Pattern Recognition Letters, vol. 27, no. 8, pp. 861–874, 2006.

[7] J. Davis and M. Goadrich, “The relationship between precision-recall and ROC curves,” in Proc. ICML, 2006.

[8] NIST, Cybersecurity Framework (CSF) 2.0, 2024.

[9] M. Ring et al., “A survey of network-based intrusion detection data sets,” Computers & Security, vol. 86, pp. 147–167, 2019.