๐ CySecBench: Generative AI-based CyberSecurity-focused Prompt Dataset for Benchmarking Large Language Models ๐ก๏ธ
January 7, 2025 ยท View on GitHub
The largest and most comprehensive Generative AI-based CyberSecurity-focused Dataset for Benchmarking Large Language Models
๐ Overview
The CySecBench paper offers:
- ๐ฏ A cutting-edge dataset of 12662 prompts tailored to cybersecurity challenges.
- ๐ง Novel jailbreaking methods leveraging prompt obfuscation and refinement.
- ๐ Comprehensive performance evaluation of LLMs like ChatGPT, Claude, and Gemini.
Why CySecBench?
Existing datasets are too broad and often lack focus on cybersecurity. CySecBench fills this gap by providing domain-specific prompts organized into 10 categories, enabling a precise evaluation of LLM security mechanisms.
๐ Access the Paper
You can download the full research paper here: CySecBench (PDF)
โจ Features
๐๏ธ Dataset
- ๐ 10 Categories of Prompts:
- ๐ฉ๏ธ Cloud Attacks
- โ๏ธ Control System Attacks
- ๐ Cryptographic Attacks
- ๐ต๏ธ Evasion Techniques
- ๐ป Hardware Attacks
- ๐ Intrusion Techniques
- ๐ก IoT Attacks
- ๐ฆ Malware Attacks
- ๐ Network Attacks
- ๐ Web Application Attacks
๐๏ธ Repository Structure
/
โโโ Code/
โ โโโ dataset_generation.py
โ โโโ keywords.txt
โโโ Dataset/
โ โโโ Category sets/
โ โ โโโ cysecbench-cloud-attacks.csv
โ โ โโโ cysecbench-control-system-attacks.csv
โ โ โโโ cysecbench-cryptographic-attacks.csv
โ โ โโโ cysecbench-evasion-techniques.csv
โ โ โโโ cysecbench-hardware-attacks.csv
โ โ โโโ cysecbench-intrusion-techniques.csv
โ โ โโโ cysecbench-iot-attacks.csv
โ โ โโโ cysecbench-malware-attacks.csv
โ โ โโโ cysecbench-network-attacks.csv
โ โ โโโ cysecbench-web-application-attacks.csv
โ โโโ Full dataset/
โ โ โโโ cysecbench.csv
โ โโโ Sample sets/
โ โโโ cysecbench-500.csv
โ โโโ cysecbench-2000.csv
โ โโโ cysecbench-6000.csv
๐ Getting Started
โ๏ธ Prerequisites
- ๐ Python 3.8+
- ๐ฆ Required libraries:
openai(only for dataset generation)
๐ Results using CySecBench
๐ฏ Evaluation Metrics
- โ Success Rate (SR): Percentage of prompts bypassing ethical guidelines.
- ๐ Average Rating (AR): Degree of harmfulness in LLM responses (on a scale of 1-5, where 5 is the most harmful).
โก Jailbreaking Performance
| LLM | Success Rate (SR) | Average Rating (AR) |
|---|---|---|
| ๐ค Claude | 17.4% | 2.00 |
| ๐ค ChatGPT | 65.4% | 4.06 |
| ๐ค Gemini | 88.4% | 4.77 |
๐ Citation
If you use CySecBench, please cite:
@article{CySecBench2024,
title = {{CySecBench: Generative AI-based CyberSecurity-focused Prompt Dataset for Benchmarking Large Language Models}},
author = {Johan Wahrรฉus and Ahmed Mohamed Hussain and Panos Papadimitratos},
year = {2025},
journal = {arXiv preprint arXiv:2501.01335},
url = {https://arxiv.org/abs/2501.01335}
}
โญ Star This Repository!
If you found CySecBench helpful or interesting, please give this repository a star โญ to show your support!
๐ License
This project is licensed under the MIT License. See the LICENSE file for details.