As systems become more complex, gathering cyber threat intelligence from open sources is crucial for maintaining security. However, the vast amount of information can lead to overload, making it difficult to process emerging cybersecurity events like new malware or attack contexts using existing classifiers. To address this, the authors propose a system that trains a new classifier for each incident, using a combination of three low-data regime techniques: transfer learning, data augmentation, and few-shot learning.
This repository contains the code and the dataset (reference) of this framework.
Further explanations contains the paper Multi-Level Fine-Tuning, Data Augmentation, and Few-Shot Learning for Specialized Cyber Threat Intelligence [1].
[1]: Bayer, Frey and Reuter (2022) Multi-Level Fine-Tuning, Data Augmentation, and Few-Shot Learning for Specialized Cyber Threat Intelligence,
If you have any questions, need access to datasets or the complete research data, or if you encounter any bugs, please feel free to contact me!
If you chose to use any of the techniques or the code itself, please cite the following paper.
@misc{https://doi.org/10.48550/arxiv.2207.11076,
doi = {10.48550/ARXIV.2207.11076},
url = {https://arxiv.org/abs/2207.11076},
author = {Bayer, Markus and Frey, Tobias and Reuter, Christian},
keywords = {Cryptography and Security (cs.CR), Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Multi-Level Fine-Tuning, Data Augmentation, and Few-Shot Learning for Specialized Cyber Threat Intelligence},
publisher = {arXiv},
year = {2022},
copyright = {arXiv.org perpetual, non-exclusive license}
}
This repository was coded in python version 3.7.11.
Before using the code make sure to install packages in the right order:
- cuda/11.1
- cuDNN/8.3.1
- requirements.txt
git submodule update --init --recursiveto load the dataset- In the file src/data/read_dataset.py add your twitter api informations
The versions of the packages are the ones we used during our evaluations. The cybersecurity domain-trained CySecBERT model used is published in CySecBERT: A Domain-Adapted Language Model for the Cybersecurity Domain Bayer et al. (2022) [2].
[2]: Bayer, M., Kuehn, P.D., Shanehsaz, R., & Reuter, C.A. (2022). CySecBERT: A Domain-Adapted Language Model for the Cybersecurity Domain. ArXiv, abs/2212.02974.
Part of the repository and the techniques is ADAPET explained in the paper Improving and Simplifying Pattern Exploiting Training from Tam et al. (2021)[3].
[3]: Tam, D., Menon, R. R., Bansal, M., Srivastava, S., & Raffel, C. (2021). Improving and simplifying pattern exploiting training. arXiv preprint arXiv:2103.11955
Markus Bayer
Tobias Frey
Christian Reuter
BSD 2-Clause License
Copyright (c) 2022 Markus Bayer, Science and Technology for Peace and Security All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.