Downloads · 30 days
5
26% of all-time downloads
regaan/pocsmith
pocsmith is a machine learning model from regaan. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as mit.
Fine-tuned CodeLlama-7B model for generating security exploits and shellcode for defensive security research.
Downloads · 30 days
5
26% of all-time downloads
All-time downloads
19
Public
Repo size
306 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 47%
From the Hugging Face model README
Fine-tuned CodeLlama-7B model for generating security exploits and shellcode for defensive security research.
PoCSmith is a LoRA-adapted CodeLlama-7B model trained on 1,472 CVE-exploit pairs and shellcode examples. It generates proof-of-concept exploits and multi-platform shellcode for authorized security testing.
Author: Regaan
GitHub: noobforanonymous/PoCSmith
- LoRA Rank: 64
- LoRA Alpha: 16
- Learning Rate: 2e-4
- Epochs: 3
- Quantization: 4-bit (nf4)
- Batch Size: 1 (gradient accumulation x4)
pip install torch transformers peft bitsandbytes accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
# Load base model with 4-bit quantization
base_model = AutoModelForCausalLM.from_pretrained(
"codellama/CodeLlama-7b-hf",
load_in_4bit=True,
device_map="auto"
)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("codellama/CodeLlama-7b-hf")
# Load LoRA adapters
model = PeftModel.from_pretrained(base_model, "regaan/pocsmith")
# Generate
prompt = "Generate a reverse shell for Linux x64"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0]))
For a complete CLI tool with CVE parsing and shellcode generation:
git clone https://github.com/noobforanonymous/PoCSmith.git
cd PoCSmith
pip install -e .
# Generate exploit from CVE
python src/cli/main.py cve CVE-2024-1234
# Generate shellcode
python src/cli/main.py shellcode --platform linux_x64 --type reverse_shell
This model is designed exclusively for:
NOT for:
By using this model, you agree to:
@software{pocsmith2024,
author = {Regaan},
title = {PoCSmith: AI-Powered Proof-of-Concept Generator},
year = {2025},
url = {https://github.com/noobforanonymous/PoCSmith}
}
MIT License - See LICENSE file
Version: 1.0
Model Size: 343MB (LoRA adapters)
Base Model Size: 13GB (CodeLlama-7B)