CoolFace
Modelpublic

rezaduty/gemma4-e2b-privesc-linux

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes
Model Card

Gemma 4 E2B — Linux Privilege Escalation Expert

A QLoRA fine-tuned version of Gemma 4 E2B Instruct specialized in linux privilege escalation. Specialized in Linux privilege escalation: SUID/SGID abuse, sudo misconfigurations, cron exploitation, capabilities abuse, NFS norootsquash, kernel exploits (DirtyPipe, PwnKit), and container escapes.

Part of the rezaduty cybersecurity model family.


Expertise

  • Methodology: LinPEAS, linenum, pspy enumeration
  • SUID/SGID binary exploitation and GTFOBins techniques
  • Sudo misconfigurations: NOPASSWD, LD_PRELOAD, sudoedit abuse
  • Cron job exploitation: writable scripts, path injection
  • Linux capabilities abuse: capsetuid, capnetadmin, capdac_override
  • NFS norootsquash exploitation and Docker socket escape
  • Kernel exploits: DirtyPipe (CVE-2022-0847), PwnKit (CVE-2021-4034)

Model Details

PropertyValue
Base modelgoogle/gemma-4-e2b-it (2B parameters)
Fine-tuning methodQLoRA (rank 16, α 16)
DomainLinux Privilege Escalation
Datasetrezaduty/cybersecurity-qa-v2
LicenseApache 2.0

Usage

python
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch

base_model = "google/gemma-4-e2b-it"
adapter    = "rezaduty/gemma4-e2b-privesc-linux"

tokenizer = AutoTokenizer.from_pretrained(adapter)
model = AutoModelForCausalLM.from_pretrained(
    base_model, torch_dtype=torch.bfloat16, device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter)

messages = [
    {"role": "system", "content": [{"type": "text", "text": "You are an expert in Linux privilege escalation techniques. Provide deep technical answers on Linux privesc methods, enumeration strategies, detection, and hardening with specific commands, tool names, and kernel CVE references."}]},
    {"role": "user",   "content": [{"type": "text", "text": "Your question here"}]},
]
inputs = tokenizer.apply_chat_template(
    messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
).to(model.device)
output = model.generate(inputs, max_new_tokens=512, temperature=0.7, top_p=0.9)
print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))

System Prompt

You are an expert in Linux privilege escalation techniques. Provide deep technical answers on Linux privesc methods, enumeration strategies, detection, and hardening with specific commands, tool names, and kernel CVE references.

See Also