rezaduty commited on
Commit
c2b67ed
·
verified ·
1 Parent(s): fb6c624

Add specialized README for Linux Privilege Escalation

Browse files
Files changed (1) hide show
  1. README.md +85 -9
README.md CHANGED
@@ -1,22 +1,98 @@
1
  ---
2
- base_model: unsloth/gemma-4-e2b-it-unsloth-bnb-4bit
3
  tags:
4
  - text-generation-inference
5
  - transformers
6
- - unsloth
7
  - gemma4
8
- - trl
 
 
 
 
 
 
 
9
  license: apache-2.0
10
  language:
11
  - en
12
  ---
13
 
14
- # Uploaded model
15
 
16
- - **Developed by:** rezaduty
17
- - **License:** apache-2.0
18
- - **Finetuned from model :** unsloth/gemma-4-e2b-it-unsloth-bnb-4bit
19
 
20
- This gemma4 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth)
21
 
22
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: google/gemma-4-e2b-it
3
  tags:
4
  - text-generation-inference
5
  - transformers
 
6
  - gemma4
7
+ - peft
8
+ - lora
9
+ - cybersecurity
10
+ - linux
11
+ - privilege-escalation
12
+ - pentesting
13
+ - red-team
14
+ - linpeas
15
  license: apache-2.0
16
  language:
17
  - en
18
  ---
19
 
20
+ # Gemma 4 E2B — Linux Privilege Escalation Expert
21
 
22
+ A QLoRA fine-tuned version of [Gemma 4 E2B Instruct](https://huggingface.co/google/gemma-4-e2b-it) specialized in **linux privilege escalation**.
23
+ Specialized in **Linux privilege escalation**: SUID/SGID abuse, sudo misconfigurations, cron exploitation, capabilities abuse, NFS no_root_squash, kernel exploits (DirtyPipe, PwnKit), and container escapes.
 
24
 
25
+ Part of the [rezaduty cybersecurity model family](https://huggingface.co/rezaduty).
26
 
27
+ ---
28
+
29
+ ## Expertise
30
+
31
+ - Methodology: LinPEAS, linenum, pspy enumeration
32
+ - SUID/SGID binary exploitation and GTFOBins techniques
33
+ - Sudo misconfigurations: NOPASSWD, LD_PRELOAD, sudoedit abuse
34
+ - Cron job exploitation: writable scripts, path injection
35
+ - Linux capabilities abuse: cap_setuid, cap_net_admin, cap_dac_override
36
+ - NFS no_root_squash exploitation and Docker socket escape
37
+ - Kernel exploits: DirtyPipe (CVE-2022-0847), PwnKit (CVE-2021-4034)
38
+
39
+ ---
40
+
41
+ ## Model Details
42
+
43
+ | Property | Value |
44
+ |---|---|
45
+ | **Base model** | google/gemma-4-e2b-it (2B parameters) |
46
+ | **Fine-tuning method** | QLoRA (rank 16, α 16) |
47
+ | **Domain** | Linux Privilege Escalation |
48
+ | **Dataset** | [rezaduty/cybersecurity-qa-v2](https://huggingface.co/datasets/rezaduty/cybersecurity-qa-v2) |
49
+ | **License** | Apache 2.0 |
50
+
51
+ ---
52
+
53
+ ## Usage
54
+
55
+ ```python
56
+ from transformers import AutoTokenizer, AutoModelForCausalLM
57
+ from peft import PeftModel
58
+ import torch
59
+
60
+ base_model = "google/gemma-4-e2b-it"
61
+ adapter = "rezaduty/gemma4-e2b-privesc-linux"
62
+
63
+ tokenizer = AutoTokenizer.from_pretrained(adapter)
64
+ model = AutoModelForCausalLM.from_pretrained(
65
+ base_model, torch_dtype=torch.bfloat16, device_map="auto"
66
+ )
67
+ model = PeftModel.from_pretrained(model, adapter)
68
+
69
+ messages = [
70
+ {"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."}]},
71
+ {"role": "user", "content": [{"type": "text", "text": "Your question here"}]},
72
+ ]
73
+ inputs = tokenizer.apply_chat_template(
74
+ messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
75
+ ).to(model.device)
76
+ output = model.generate(inputs, max_new_tokens=512, temperature=0.7, top_p=0.9)
77
+ print(tokenizer.decode(output[0][inputs.shape[-1]:], skip_special_tokens=True))
78
+ ```
79
+
80
+ ---
81
+
82
+ ## System Prompt
83
+
84
+ ```
85
+ 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.
86
+ ```
87
+
88
+ ---
89
+
90
+ ## See Also
91
+
92
+ - [General cybersecurity model](https://huggingface.co/rezaduty/gemma4-e2b-cybersecurity-interview)
93
+ - [Docker & Container Security](https://huggingface.co/rezaduty/gemma4-e2b-docker-container-security)
94
+ - [Kubernetes Security](https://huggingface.co/rezaduty/gemma4-e2b-kubernetes-security)
95
+ - [AI & LLM Security](https://huggingface.co/rezaduty/gemma4-e2b-ai-llm-security)
96
+ - [Cloud IAM & Terraform](https://huggingface.co/rezaduty/gemma4-e2b-cloud-iam-terraform)
97
+ - [Active Directory & Red Team](https://huggingface.co/rezaduty/gemma4-e2b-redteam-activedirectory)
98
+ - [All rezaduty models](https://huggingface.co/rezaduty)