Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,195 +1,18 @@
|
|
| 1 |
---
|
| 2 |
title: Uncensored HackerCoding GPT
|
| 3 |
emoji: 📉
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: streamlit
|
| 7 |
sdk_version: 1.57.0
|
| 8 |
app_file: app.py
|
| 9 |
-
pinned:
|
| 10 |
license: apache-2.0
|
| 11 |
-
short_description:
|
| 12 |
models:
|
| 13 |
- HauhauCS/Gemma-4-E4B-Uncensored-HauhauCS-Aggressive
|
| 14 |
- DeepHat/DeepHat-V1-7B
|
| 15 |
-
- llama3-8b-
|
| 16 |
-
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
> A Streamlit code-generation surface for security research and purple team workflows. Built for operators who need a model that engages with offensive and defensive code without refusing the task.
|
| 21 |
-
|
| 22 |
-
**Live Space:** https://s-dreamer-uncensored-hackercoding.hf.space
|
| 23 |
-
|
| 24 |
-
-----
|
| 25 |
-
|
| 26 |
-
## Status
|
| 27 |
-
|
| 28 |
-
UI scaffold. `generate_code()` and `refine_code()` return placeholder strings — no model is wired in yet. The interface, sidebar, refine loop, session state, and download path are functional. See [Wire in a model](#wire-in-a-model).
|
| 29 |
-
|
| 30 |
-
-----
|
| 31 |
-
|
| 32 |
-
## Why this exists
|
| 33 |
-
|
| 34 |
-
General-purpose code assistants refuse a large class of legitimate security tasks:
|
| 35 |
-
|
| 36 |
-
- Writing a Suricata or YARA rule that requires understanding a malware sample
|
| 37 |
-
- Drafting a PoC for an authorized engagement
|
| 38 |
-
- Explaining an exploit chain end-to-end so you can write the detection for it
|
| 39 |
-
- Generating a fuzzer harness for a known-vulnerable function
|
| 40 |
-
- Producing payloads inside a CTF or lab boundary
|
| 41 |
-
|
| 42 |
-
This Space pairs a low-friction prompt UI with a model that doesn’t reflexively refuse those workflows. The tradeoff: every output is your responsibility. There is no model-side guardrail catching mistakes, scope violations, or bad ideas. Read what you ship.
|
| 43 |
-
|
| 44 |
-
-----
|
| 45 |
-
|
| 46 |
-
## In scope
|
| 47 |
-
|
| 48 |
-
- Detection engineering: YARA, Sigma, Suricata, Snort, Splunk SPL, KQL, osquery
|
| 49 |
-
- Offensive PoCs against systems you own or are explicitly authorized to test
|
| 50 |
-
- CVE analysis and reproduction in a lab
|
| 51 |
-
- Fuzzer harnesses (libFuzzer, AFL++, Honggfuzz, boofuzz)
|
| 52 |
-
- Hardening patches, sandbox escapes-then-fixes, secure coding refactors
|
| 53 |
-
- IR and forensics tooling: log parsers, timeline builders, memory triage scripts
|
| 54 |
-
- CTF challenge work
|
| 55 |
-
- Red team tooling for authorized engagements
|
| 56 |
-
- Adversarial ML probes against your own models
|
| 57 |
-
|
| 58 |
-
## Out of scope
|
| 59 |
-
|
| 60 |
-
- Targeting systems you do not own and are not authorized to test
|
| 61 |
-
- Generating malware for deployment against third parties
|
| 62 |
-
- Bypassing controls in production systems you don’t operate
|
| 63 |
-
- Anything that would put a real user, customer, or bystander at risk
|
| 64 |
-
|
| 65 |
-
These are not features the tool blocks. They are commitments the operator makes.
|
| 66 |
-
|
| 67 |
-
-----
|
| 68 |
-
|
| 69 |
-
## Run locally
|
| 70 |
-
|
| 71 |
-
```bash
|
| 72 |
-
git clone https://huggingface.co/spaces/S-Dreamer/Uncensored-HackerCoding
|
| 73 |
-
cd Uncensored-HackerCoding
|
| 74 |
-
pip install streamlit==1.57.0
|
| 75 |
-
streamlit run app.py
|
| 76 |
-
```
|
| 77 |
-
|
| 78 |
-
Opens at `http://localhost:8501`.
|
| 79 |
-
|
| 80 |
-
-----
|
| 81 |
-
|
| 82 |
-
## UI reference
|
| 83 |
-
|
| 84 |
-
### Sidebar settings
|
| 85 |
-
|
| 86 |
-
|Control |Values |Default |
|
| 87 |
-
|-------------|--------------------------------------------------------------------------------|------------------|
|
| 88 |
-
|Language |`Python`, `JavaScript`, `TypeScript`, `SQL`, `Bash`, `HTML/CSS` |`Python` |
|
| 89 |
-
|Output style |`Clean and simple`, `Beginner-friendly`, `Production-ready`, `Heavily commented`|`Clean and simple`|
|
| 90 |
-
|Include tests|bool |`false` |
|
| 91 |
-
|
| 92 |
-
### Output tabs
|
| 93 |
-
|
| 94 |
-
|Tab |Purpose |
|
| 95 |
-
|-------|---------------------------------------------------------------------------------|
|
| 96 |
-
|Code |Renders output via `st.code()`, syntax-highlighted by selected language |
|
| 97 |
-
|Refine |Submits a refinement prompt; result replaces the previous output in session state|
|
| 98 |
-
|Actions|Download as `generated_code.txt` or clear the output |
|
| 99 |
-
|
| 100 |
-
### Recommended additions for security workflows
|
| 101 |
-
|
| 102 |
-
Replace the `language` and `examples` lists in `app.py` with sec-research-relevant options:
|
| 103 |
-
|
| 104 |
-
```python
|
| 105 |
-
language = st.selectbox(
|
| 106 |
-
"Language",
|
| 107 |
-
["Python", "C", "C++", "Go", "Rust", "Bash", "PowerShell",
|
| 108 |
-
"Assembly (x86_64)", "YARA", "Sigma", "Suricata", "KQL", "Splunk SPL"]
|
| 109 |
-
)
|
| 110 |
-
|
| 111 |
-
examples = [
|
| 112 |
-
"Write a YARA rule that detects PE files with a high-entropy .text section and an imported VirtualAllocEx.",
|
| 113 |
-
"Generate a libFuzzer harness for a function with signature `int parse_packet(const uint8_t *buf, size_t len)`.",
|
| 114 |
-
"Write a Sigma rule for suspicious child processes spawned by Outlook on Windows.",
|
| 115 |
-
"Draft a Python script that parses Sysmon EVTX logs and flags Event ID 1 with unusual parent-child pairs.",
|
| 116 |
-
]
|
| 117 |
-
```
|
| 118 |
-
|
| 119 |
-
-----
|
| 120 |
-
|
| 121 |
-
## Wire in a model
|
| 122 |
-
|
| 123 |
-
Both functions take strings and return a string. Replace their bodies with a model call.
|
| 124 |
-
|
| 125 |
-
`generate_code(prompt, language, style, include_tests)` — `app.py:3`
|
| 126 |
-
`refine_code(existing_code, refinement_prompt, language)` — `app.py:12`
|
| 127 |
-
|
| 128 |
-
Recommended backends (security-research-tuned or instruct-grade with low refusal rate on sec topics):
|
| 129 |
-
|
| 130 |
-
|Model |Notes |
|
| 131 |
-
|-------------------------------------------------|---------------------------------------------------------|
|
| 132 |
-
|`WhiteRabbitNeo/WhiteRabbitNeo-13B-v1` |Sec-focused fine-tune, strong on offensive/defensive code|
|
| 133 |
-
|`cognitivecomputations/dolphin-2.9.4-llama3.1-8b`|General uncensored instruct, decent code performance |
|
| 134 |
-
|`bigcode/starcoder2-15b-instruct-v0.1` |Stronger raw code, less topical refusal than chat models |
|
| 135 |
-
|
| 136 |
-
Example with the HF Inference API:
|
| 137 |
-
|
| 138 |
-
```python
|
| 139 |
-
import os
|
| 140 |
-
from huggingface_hub import InferenceClient
|
| 141 |
-
|
| 142 |
-
client = InferenceClient(
|
| 143 |
-
model="WhiteRabbitNeo/WhiteRabbitNeo-13B-v1",
|
| 144 |
-
token=os.environ["HF_TOKEN"],
|
| 145 |
-
)
|
| 146 |
-
|
| 147 |
-
def generate_code(prompt: str, language: str, style: str, include_tests: bool) -> str:
|
| 148 |
-
system = (
|
| 149 |
-
f"You are a security research code generator. "
|
| 150 |
-
f"Target language: {language}. Style: {style}. "
|
| 151 |
-
f"{'Include tests.' if include_tests else 'Tests not required.'} "
|
| 152 |
-
f"Return code only, no commentary."
|
| 153 |
-
)
|
| 154 |
-
response = client.chat_completion(
|
| 155 |
-
messages=[
|
| 156 |
-
{"role": "system", "content": system},
|
| 157 |
-
{"role": "user", "content": prompt},
|
| 158 |
-
],
|
| 159 |
-
max_tokens=2048,
|
| 160 |
-
temperature=0.2,
|
| 161 |
-
)
|
| 162 |
-
return response.choices[0].message.content
|
| 163 |
-
```
|
| 164 |
-
|
| 165 |
-
Add to `requirements.txt`:
|
| 166 |
-
|
| 167 |
-
```
|
| 168 |
-
streamlit==1.57.0
|
| 169 |
-
huggingface_hub>=0.24.0
|
| 170 |
-
```
|
| 171 |
-
|
| 172 |
-
Set `HF_TOKEN` as a Space secret under **Settings → Variables and secrets**.
|
| 173 |
-
|
| 174 |
-
-----
|
| 175 |
-
|
| 176 |
-
## Operating model
|
| 177 |
-
|
| 178 |
-
Treat every generated artifact as untrusted input until reviewed:
|
| 179 |
-
|
| 180 |
-
1. Read it before you run it. The model will produce confident-looking code that does the wrong thing.
|
| 181 |
-
1. Run it in an isolated environment first — VM, container, lab network. Never paste output directly into production.
|
| 182 |
-
1. Keep an authorization paper trail for anything you generate that touches a real target. Engagement letter, scope document, screenshot of the bug bounty program scope at the time of testing.
|
| 183 |
-
1. Static-analyze before committing. `bandit` for Python, `semgrep` for cross-language, `ruff` for hygiene.
|
| 184 |
-
|
| 185 |
-
-----
|
| 186 |
-
|
| 187 |
-
## License
|
| 188 |
-
|
| 189 |
-
Apache-2.0 — see <LICENSE>.
|
| 190 |
-
|
| 191 |
-
-----
|
| 192 |
-
|
| 193 |
-
## Disclaimer
|
| 194 |
-
|
| 195 |
-
Provided as-is, without warranty. The author is not liable for misuse, damages, or losses arising from use of this Space or any code it produces. The operator is solely responsible for ensuring all use is legal, authorized, and within scope of a documented engagement, lab boundary, or system they own.
|
|
|
|
| 1 |
---
|
| 2 |
title: Uncensored HackerCoding GPT
|
| 3 |
emoji: 📉
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: streamlit
|
| 7 |
sdk_version: 1.57.0
|
| 8 |
app_file: app.py
|
| 9 |
+
pinned: true
|
| 10 |
license: apache-2.0
|
| 11 |
+
short_description: Streamlit code-generation surface for purple-team workflows.
|
| 12 |
models:
|
| 13 |
- HauhauCS/Gemma-4-E4B-Uncensored-HauhauCS-Aggressive
|
| 14 |
- DeepHat/DeepHat-V1-7B
|
| 15 |
+
- llama3-8b-8192
|
| 16 |
+
thumbnail: >-
|
| 17 |
+
https://cdn-uploads.huggingface.co/production/uploads/67c714e90b99a2332e310979/L02-prFfHa7eBZGVf4uvR.jpeg
|
| 18 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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