TRIMODAL FUSION FRAMEWORK FOR LAYER 2 NETWORK FORENSICS: INTEGRATING CNN, TRANSFORMER, AND BERT EMBEDDINGS FOR REAL-TIME MALWARE DETECTION IN RAW ETHERNET TRAFFIC.


Dantene Davis
MSc Student, Halmstad University
Abstract
This paper presents a multimodal deep learning–based malware detection framework for Layer 2 traffic. The approach integrates Convolutional Neural Networks (CNNs) for spatial packet analysis, Transformers for temporal flow modeling, and BERT embeddings for semantic threat intelligence. Unlike traditional rule- or signature-based systems, the model processes raw PCAP data and incorporates contextual knowledge from CVE and MITRE ATT&CK sources. The model was trained and validated using a proprietary dataset comprising both benign and synthetically injected malicious traffic. Standard metrics achieved high values (Accuracy: 97%, Precision: 96.7%, Recall: 97.8%, F1: 0.9536). However, due to class imbalance (benign 126 vs. malicious 5,135 in the test set), additional evaluation was performed using per-class precision, recall, balanced accuracy, Matthews Correlation Coefficient (MCC), and ROC/PR curves. Comparisons against trivial baselines (e.g., “always malware” classifier) and traditional machine learning algorithms (SVM, Random Forest) highlight the strengths and weaknesses of the proposed method. Real-time validation was conducted by comparing model predictions with a Palo Alto firewall under controlled traffic scenarios. The model matched the firewall on known attacks while offering potential adaptability to novel patterns. Overall, this work contributes an integrated multimodal framework, demonstrates feasibility on Layer 2 threats, and outlines limitations, including dataset imbalance, restricted attack diversity, and computational cost.
Keywords: Malware Detection, Deep Learning, CNN, Transformers, BERT, PCAP, Layer 2, Semantic Embeddings, ROC-AUC, MCC.
Journal Name :
EPRA International Journal of Research & Development (IJRD)

VIEW PDF
Published on : 2026-05-28

Vol : 11
Issue : 5
Month : May
Year : 2026
Copyright © 2026 EPRA JOURNALS. All rights reserved
Developed by Peace Soft