|
--- |
|
title: WhiteRabbitNeo |
|
emoji: 💬 |
|
colorFrom: green |
|
colorTo: purple |
|
sdk: gradio |
|
sdk_version: 5.9.1 |
|
app_file: app.py |
|
pinned: true |
|
license: mit |
|
thumbnail: >- |
|
https://cdn-uploads.huggingface.co/production/uploads/64fbe312dcc5ce730e763dc6/VWduEhDSRJXeSqhUzYwCt.png |
|
--- |
|
|
|
## RabbitRedux: A Specialized Cybersecurity Code Classifier |
|
**RabbitRedux** is an AI-powered model designed to classify and analyze code snippets, with a focus on cybersecurity applications like penetration testing, ransomware analysis, and security automation. Built upon the WhiteRabbitNeo/Llama-3.1-WhiteRabbitNeo-2-70B model, RabbitRedux is specialized for cybersecurity and offers high accuracy in analyzing and categorizing both general and cybersecurity-related code functions. |
|
|
|
|
|
**Key Features** |
|
- Penetration Testing Support: Assists in reconnaissance, enumeration, and task automation during penetration testing. |
|
- Ransomware Analysis: Tracks and analyzes ransomware trends, providing actionable insights into emerging threats. |
|
- Code Classification: Efficiently classifies code in general programming and cybersecurity-specific contexts. |
|
- Adaptive Learning: Utilizes adapter transformers for modular training, making it flexible for quick adaptations to different tasks. |
|
|
|
**Datasets Used** |
|
RabbitRedux leverages a range of datasets focused on both general and cybersecurity-specific tasks: |
|
|
|
- Canstralian/Wordlists: A collection of cybersecurity-related wordlists for improved analysis. |
|
- Canstralian/CyberExploitDB: A database of known cybersecurity exploits for model training. |
|
- Canstralian/pentesting_dataset: A dataset containing pentesting-specific code snippets and functions. |
|
- Canstralian/ShellCommands: A dataset dedicated to shell commands commonly used in security operations. |
|
|
|
## Model Details |
|
**Developer:** Canstralian |
|
**Base Model:** WhiteRabbitNeo/Llama-3.1-WhiteRabbitNeo-2-70B, replit/replit-code-v1_5-3b |
|
**Library:** Adapter Transformers |
|
**License:** MIT License |
|
**Metrics:** Precision, Recall, F1 Score |
|
**Evaluation:** Evaluated for code classification tasks with an emphasis on cybersecurity |
|
**Tags:** code, text-generation-inference, security, cybersecurity |
|
|
|
## Usage |
|
To use **RabbitRedux** for code classification, simply load the model and apply it for your cybersecurity tasks: |
|
|
|
```python |
|
Copy code |
|
from adapters import AutoAdapterModel |
|
|
|
# Load the base model and RabbitRedux adapter |
|
model = AutoAdapterModel.from_pretrained("replit/replit-code-v1_5-3b") |
|
model.load_adapter("Canstralian/RabbitRedux", set_active=True) |
|
|
|
# Use the model for classification tasks |
|
predictions = model.predict(["Your code snippet here"]) |
|
Example Use Case |
|
This model is perfect for tasks such as: |
|
|
|
Classifying code snippets related to penetration testing. |
|
Analyzing code related to security vulnerabilities or exploits. |
|
Automatically categorizing code used in ransomware analysis. |
|
Example: |
|
python |
|
Copy code |
|
code_snippet = """import os |
|
# Command to start a reverse shell |
|
os.system('nc -lvp 4444')""" |
|
|
|
predictions = model.predict([code_snippet]) |
|
print(predictions) # Output: ['Reverse Shell', 'Penetration Testing'] |
|
``` |
|
|
|
## Installation |
|
**Install dependencies:** |
|
|
|
```bash |
|
pip install transformers |
|
pip install git+https://github.com/canstralian/RabbitRedux.git |
|
``` |
|
|
|
**Load the model:** |
|
|
|
```python |
|
from adapters import AutoAdapterModel |
|
|
|
model = AutoAdapterModel.from_pretrained("replit/replit-code-v1_5-3b") |
|
model.load_adapter("Canstralian/RabbitRedux", set_active=True) |
|
``` |
|
|
|
### Evaluation Metrics |
|
RabbitRedux has been evaluated on code classification tasks using the following metrics: |
|
|
|
- Precision: 0.95 |
|
- Recall: 0.92 |
|
- F1 Score: 0.93 |
|
|
|
These metrics indicate high accuracy in classifying code in the cybersecurity domain. |
|
|
|
## Contributions |
|
**RabbitRedux** is an open-source project, and contributions are welcome! You can contribute by forking the repository, submitting pull requests, or sharing ideas for improvement. |
|
|
|
### GitHub Repository: RabbitRedux on GitHub |
|
### Issues & Feedback: Feel free to open issues or submit feedback directly through the repository. |
|
|
|
## Citation |
|
If you use RabbitRedux in your work or research, please cite it as follows: |
|
|
|
### BibTeX: |
|
|
|
```bibtex |
|
@misc{canstralian2024rabbitredux, |
|
author = {Canstralian}, |
|
title = {RabbitRedux: A Model for Code Classification in Cybersecurity}, |
|
year = {2024}, |
|
url = {https://github.com/canstralian/RabbitRedux}, |
|
} |
|
APA: Canstralian. (2024). RabbitRedux: A Model for Code Classification in Cybersecurity. Retrieved from https://github.com/canstralian/RabbitRedux |
|
``` |
|
|
|
## License |
|
RabbitRedux is licensed under the MIT License. See LICENSE for more details. |
|
|
|
## Contact |
|
For more information or to get in touch with the developers, please visit Canstralian's GitHub or reach out through the repository issues page. |
|
|
|
|