Predicting Cyber Attack Types Using XGBoost: A Data Mining Approach to Enhance Legal Frameworks for Cybersecurity

Authors

  • I Gede Agus Krisna Warmayana
  • Yuichiro Yamashita National Institute of Advanced Industrial Science and Technology, Ibaraki, Japan
  • Nobuto Oka Faculty of Humanity-Oriented Science and Engineering, Kindai University, Fukuoka, Japan

DOI:

https://doi.org/10.63913/jcl.v1i2.8

Keywords:

Cybersecurity, Machine Learning, XGBoost, Cyber Attack Classification, Cyber Law

Abstract

Cybersecurity threats continue to evolve rapidly, posing significant risks to organizations and challenging existing legal frameworks. This study explores the application of machine learning, specifically the XGBoost algorithm, to predict types of cyber attacks using a comprehensive dataset of cybersecurity incidents. The dataset includes organizational attributes, attack characteristics, and mitigation responses, which are preprocessed through feature scaling and encoding to support model training. Initial exploratory data analysis revealed class imbalances and variability in feature distributions, highlighting the complexity of the prediction task. The XGBoost model was trained and evaluated on an 80:20 train-test split, achieving an overall accuracy of 22.5% in multi-class classification of five common cyber attack types: Phishing, SQL Injection, DDoS, Ransomware, and Zero-Day Exploit. While the model’s predictive performance was modest, feature importance analysis identified critical predictors such as geographical location, mitigation steps, and compliance standards, providing valuable interpretability. These findings underscore the potential for machine learning to support cybersecurity law enforcement by offering data-driven insights into attack patterns and organizational vulnerabilities. The ability to classify attack types can assist legal authorities and policymakers in developing targeted regulatory measures and prioritizing enforcement actions. Furthermore, the transparent nature of XGBoost’s feature contributions facilitates accountability in legal contexts where automated decision-making tools are increasingly employed. However, limitations such as data imbalance and missing values affected model accuracy, suggesting the need for enhanced data collection and advanced modeling techniques in future research. Expanding datasets, incorporating real-time threat intelligence, and leveraging ensemble or hybrid algorithms may improve prediction capabilities. This study contributes to the growing intersection of data mining and cyber law by demonstrating how machine learning models can enhance legal frameworks and cybersecurity strategies. The integration of predictive analytics into cyber law enforcement holds promise for strengthening defenses against increasingly sophisticated cyber threats.

Downloads

Published

2025-06-03

How to Cite

Warmayana, I. G. A. K., Yamashita, Y., & Oka, N. (2025). Predicting Cyber Attack Types Using XGBoost: A Data Mining Approach to Enhance Legal Frameworks for Cybersecurity. Journal of Cyber Law, 1(2), 147–160. https://doi.org/10.63913/jcl.v1i2.8