Skip to main content
QUICK REVIEW

[Paper Review] Detecting Compressed Cleartext Traffic from Consumer Internet of Things Devices

Daniel Hahn, Noah Apthorpe|arXiv (Cornell University)|May 7, 2018
Internet Traffic Analysis and Secure E-votingComputer Science6 references20 citations
TL;DR

This paper proposes a machine learning approach to automatically distinguish compressed unencrypted traffic from encrypted traffic in consumer IoT devices on a per-packet basis, using raw packet data. A 1D convolutional neural network achieved 66.9% accuracy, establishing a baseline for detecting privacy-risky unencrypted data transmissions that evade traditional cleartext detection methods.

ABSTRACT

Data encryption is the primary method of protecting the privacy of consumer device Internet communications from network observers. The ability to automatically detect unencrypted data in network traffic is therefore an essential tool for auditing Internet-connected devices. Existing methods identify network packets containing cleartext but cannot differentiate packets containing encrypted data from packets containing compressed unencrypted data, which can be easily recovered by reversing the compression algorithm. This makes it difficult for consumer protection advocates to identify devices that risk user privacy by sending sensitive data in a compressed unencrypted format. Here, we present the first technique to automatically distinguish encrypted from compressed unencrypted network transmissions on a per-packet basis. We apply three machine learning models and achieve a maximum 66.9% accuracy with a convolutional neural network trained on raw packet data. This result is a baseline for this previously unstudied machine learning problem, which we hope will motivate further attention and accuracy improvements. To facilitate continuing research on this topic, we have made our training and test datasets available to the public.

Motivation & Objective

  • To address the gap in existing tools that cannot differentiate between encrypted and compressed unencrypted network traffic in IoT devices.
  • To develop an automated, per-packet classification method that identifies unencrypted data regardless of encoding, particularly focusing on compressed data that mimics encrypted traffic.
  • To provide a machine learning baseline for detecting privacy-violating data transmissions in consumer IoT devices where encryption is absent or improperly implemented.
  • To support consumer protection advocates and researchers with a tool to audit devices for unencrypted data exposure, especially in environments with limited packet capture completeness.
  • To facilitate further research by releasing a publicly available, labeled dataset of compressed and encrypted packet traffic.

Proposed method

  • Collected 200 diverse files, compressed some using common algorithms (e.g., gzip, bzip2), and encrypted others using standard encryption (e.g., AES, Blowfish).
  • Transferred all files via loopback TCP to generate real packet captures, preserving only raw packet data without TCP header information.
  • Trained three machine learning models: k-Nearest Neighbors (k-NN), feedforward neural network, and 1D convolutional neural network (CNN) on raw byte-level packet content.
  • Used 10-fold cross-validation to evaluate model performance, focusing on binary classification of packets as either compressed unencrypted or encrypted.
  • Optimized hyperparameters including learning rate, batch size, and network depth, with early stopping to mitigate overfitting.
  • Employed standard deep learning frameworks (Keras, TensorFlow) and data processing tools (dpkt, numpy) to extract and preprocess packet data.

Experimental results

Research questions

  • RQ1Can machine learning models reliably distinguish between compressed unencrypted and encrypted network packets based solely on raw packet content?
  • RQ2How do different machine learning architectures—k-NN, feedforward networks, and CNNs—perform in classifying packet traffic as compressed or encrypted?
  • RQ3To what extent do entropy-based assumptions fail to differentiate compressed and encrypted data, and can machine learning overcome this limitation?
  • RQ4What is the baseline classification accuracy achievable for this novel machine learning task, and what factors limit model performance?
  • RQ5Can the proposed method be scaled to real-world network environments with variable packet sizes and incomplete captures?

Key findings

  • The 1D convolutional neural network achieved the highest classification accuracy of 66.9% on the test set, significantly outperforming the k-NN model (60%) and feedforward network (53.5%).
  • Despite high similarity in byte distribution and entropy between compressed and encrypted data, the CNN detected subtle statistical differences enabling partial discrimination.
  • Overfitting occurred rapidly in both the feedforward and CNN models, with accuracy dropping after 85–100 training epochs, indicating data scarcity and model complexity issues.
  • Adding more layers or filters to the CNN decreased performance, suggesting that current data volume is insufficient to support deeper architectures.
  • The k-NN model achieved 60% accuracy, demonstrating that differences in packet variability between compressed and encrypted data are detectable, even if not sufficient for production use.
  • The study establishes a foundational baseline for a previously unstudied machine learning problem, with the potential for significant improvement through larger datasets and advanced architectures.

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.