Skip to main content
QUICK REVIEW

[Paper Review] On Designing Machine Learning Models for Malicious Network Traffic Classification

Talha Ongun, Timothy Sakharaov|arXiv (Cornell University)|Jul 10, 2019
Network Security and Intrusion DetectionComputer Science11 references18 citations
TL;DR

This paper provides practical guidelines for designing supervised machine learning models to classify malicious network traffic, focusing on botnet detection from Bro network logs. It demonstrates that ensemble models like gradient boosting outperform linear models on imbalanced data, and fine-grained labeling significantly improves performance, especially when combined with time-windowed feature aggregation for attack-specific representation.

ABSTRACT

Machine learning (ML) started to become widely deployed in cyber security settings for shortening the detection cycle of cyber attacks. To date, most ML-based systems are either proprietary or make specific choices of feature representations and machine learning models. The success of these techniques is difficult to assess as public benchmark datasets are currently unavailable. In this paper, we provide concrete guidelines and recommendations for using supervised ML in cyber security. As a case study, we consider the problem of botnet detection from network traffic data. Among our findings we highlight that: (1) feature representations should take into consideration attack characteristics; (2) ensemble models are well-suited to handle class imbalance; (3) the granularity of ground truth plays an important role in the success of these methods.

Motivation & Objective

  • To address the lack of principled design guidelines for supervised ML in cybersecurity, especially for network traffic classification.
  • To evaluate the impact of feature representation, model choice, and ground truth granularity on malware detection performance.
  • To provide actionable recommendations for deploying ML in real-world cyber defense systems.
  • To demonstrate that ensemble models and fine-grained labeling significantly improve detection of botnet traffic in imbalanced datasets.

Proposed method

  • The study uses the CTU-13 public dataset containing real network traffic and botnet attack logs from a university network.
  • Feature representations include raw connection-level features from Bro logs, aggregated traffic statistics over fixed time windows (e.g., 30 seconds), and temporal features.
  • Classifiers evaluated include logistic regression, random forest, and gradient boosting; performance is measured using precision, recall, and F1-score.
  • Ground truth is compared at two granularities: coarse (entire attack session) and fine (individual connections), to assess labeling impact.
  • Experiments are conducted across multiple botnet types (e.g., Neris, Rbot) under varying class imbalance ratios.
  • Model interpretability is assessed by analyzing feature importance in tree-based models like random forest.

Experimental results

Research questions

  • RQ1How do different feature representations—raw connection logs, aggregated statistics, and temporal features—affect model performance in botnet detection?
  • RQ2Which machine learning models best handle the extreme class imbalance typical in network traffic data?
  • RQ3How does the granularity of ground truth labeling (coarse vs. fine) influence classification metrics?
  • RQ4Can feature engineering tailored to attack characteristics improve detection accuracy?
  • RQ5To what extent do interpretable models support analyst investigation of ML-generated alerts?

Key findings

  • Gradient boosting models achieved 0.97 precision and 0.95 recall on the Neris botnet under a 1:134 class imbalance, outperforming logistic regression.
  • Fine-grained labeling of individual network connections improved classification performance significantly compared to coarse-grained labeling, especially for complex botnets like Rbot.
  • Ensemble models such as random forest and gradient boosting effectively handled class imbalance, while simpler models like logistic regression struggled.
  • Time-windowed aggregation of features (e.g., 30-second windows) improved detection performance, particularly when combined with port-based grouping.
  • Random forest models provided high interpretability by identifying key features, such as high packet counts or unusual port usage, that signaled botnet activity.
  • The choice of feature representation is highly dependent on attack type and available training data, with smaller windows performing better under high imbalance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.