extract gated 0 0

tandevllc/hacking-tricks

published by @tandevllc

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
792
Last 30 days
16
Likes
7
Size
14.3 MB
Created on HF
2025-11-04
Age
11 months ago

Description

HackTricks SlimPajama Corpus (Parquet)

A high‑quality, SlimPajama‑style corpus distilled from the HackTricks knowledge base (core wiki and, optionally, HackTricks Cloud). Each record corresponds to a cleaned Markdown article with headings preserved, code fences kept, and rich provenance metadata for reproducible research and downstream retrieval.

Token count: ~2.75M tokens.

⚠️ Ethical use only. This corpus is intended for lawful research, education, and defensive security. Do… See the full description on the dataset page: https://huggingface.co/datasets/tandevllc/hacking-tricks.

Tags

task_categories:text-retrievaltask_categories:text-generationtask_categories:question-answeringtask_categories:summarizationtask_categories:feature-extractionlanguage:enlicense:othersize_categories:n<1Kformat:parquetmodality:textlibrary:datasetslibrary:pandaslibrary:mlcroissantlibrary:polarsregion:ussecurityred-teamredteampenetration-testingpentestingweb-securitycloud-securityactive-directorykubernetesdfircheatsheetswikimarkdownjsonlcybersecuritycyber-securitydatasetretrieval

README current version from Hugging Face


license: other
task_categories:

  • text-retrieval
  • text-generation
  • question-answering
  • summarization
  • feature-extraction
    language:
  • en
    tags:
  • security
  • red-team
  • redteam
  • penetration-testing
  • pentesting
  • web-security
  • cloud-security
  • active-directory
  • kubernetes
  • dfir
  • cheatsheets
  • wiki
  • markdown
  • jsonl
  • cybersecurity
  • cyber-security
  • dataset
  • retrieval
    pretty_name: HackTricks SlimPajama Corpus
    size_categories:
  • n<1K
    dataset_info:
    config_name: hacking_tricks
    features:
    • name: text
      dtype: string
    • name: meta
      struct:
      • name: source
        dtype: string
      • name: source_repo
        dtype: string
      • name: repo_branch
        dtype: string
      • name: repo_commit
        dtype: string
      • name: source_path
        dtype: string
      • name: source_url_github
        dtype: string
      • name: source_url_site
        dtype: string
      • name: title
        dtype: string
      • name: section_titles
        list: string
      • name: license
        dtype: string
      • name: n_chars
        dtype: int64
      • name: n_words
        dtype: int64
      • name: sha256
        dtype: string
      • name: crawl_ts
        dtype: string
      • name: lang
        dtype: string
        splits:
    • name: train
      num_bytes: 9726009
      num_examples: 888
      download_size: 4839940
      dataset_size: 9726009
      configs:
  • config_name: hacking_tricks
    data_files:
    • split: train
      path: hacking_tricks/train-*

HackTricks SlimPajama Corpus (Parquet)

A high‑quality, SlimPajama‑style corpus distilled from the HackTricks knowledge base (core wiki and, optionally, HackTricks Cloud). Each record corresponds to a cleaned Markdown article with headings preserved, code fences kept, and rich provenance metadata for reproducible research and downstream retrieval.

Token count: ~2.75M tokens.

⚠️ Ethical use only. This corpus is intended for lawful research, education, and defensive security. Do not use it to violate terms of service or applicable laws.


What’s in this release (Parquet)

  • Primary delivery = Parquet shards under data/hacking_tricks/.../train-*.parquet (Hub‑managed) for fast streaming with 🤗 datasets.
  • Raw JSONL retained at raw/hacking-tricks.jsonl[.gz|.zst] for transparency and reproducibility.
  • Named config: hacking_tricks (single config; no all config).

Highlights

  • Clean, article‑level records suitable for pretraining/continued‑pretraining, RAG, and eval.
  • Code blocks preserved (fenced code kept as‑is) while removing front‑matter/boilerplate.
  • Provenance: repo, commit, path, GitHub blob URL, and a best‑effort canonical site URL per article.
  • Lightweight schema: {"text": ..., "meta": {...}} with stable keys for training and retrieval.

Dataset layout

/                           # dataset root (this README)
  raw/
    hacking-tricks.jsonl    # original export (optionally .gz/.zst)
  data/
    hacking_tricks/
      default/1.0.0/train/
        train-00000-of-XXXX.parquet
        train-00001-of-XXXX.parquet
        ...

Depending on future pushes, you may also publish separate configs (hacktricks_core, hacktricks_cloud). This card documents the current single hacking_tricks config.


Schema

Each row is a UTF‑8 JSON object with the following structure (identical for Parquet features):

{
  "text": "<cleaned article markdown with code fences>",
  "meta": {
    "source": "HackTricks (git)",
    "source_repo": "https://github.com/HackTricks-wiki/hacktricks",
    "repo_branch": "master",
    "repo_commit": "<git-sha>",
    "source_path": "path/in/repo/file.md",
    "source_url_github": "https://github.com/.../blob/<sha or branch>/path.md",
    "source_url_site": "https://book.hacktricks.wiki/<page>",
    "title": "<article title>",
    "section_titles": ["H1/H2/H3…"],
    "n_chars": 12345,
    "n_words": 2345,
    "sha256": "<content-hash>",
    "crawl_ts": "2025-11-04T00:00:00+00:00",
    "lang": "en",
    "license": "CC BY-NC-SA 4.0 (per upstream repo)"
  }
}

Field notes

  • text keeps fenced code blocks and normalized headings. Front‑matter is removed.
  • source_url_site is a best‑effort canonical link to the rendered wiki page; source_url_github always points to the exact file/commit.
  • license mirrors the upstream license hint for clarity.

Quickstart (🤗 Datasets)

Load the Parquet config (recommended)

from datasets import load_dataset

REPO = "tandevllc/hacking-tricks"
ds = load_dataset(REPO, name="hacking_tricks", split="train")
print(len(ds), ds[0]["meta"]["title"])  # sample

Direct JSONL loading from raw/ (explicit)

from datasets import load_dataset

ds = load_dataset(
    "json",
    data_files="raw/hacking-tricks.jsonl",
    repo_id="tandevllc/hacking-tricks",
    split="train",
)

Typical filters

# Long English articles only
long_en = ds.filter(lambda r: r["meta"].get("lang") == "en" and r["meta"].get("n_words", 0) > 800)

# Articles with code (simple heuristic)
with_code = ds.filter(lambda r: "```" in (r["text"] or ""))

# Slice by section heading keyword
ad_ops = ds.filter(lambda r: any("Active Directory" in h for h in r["meta"].get("section_titles", [])))

RAG‑ready retrieval columns

  • meta.source_url_github — stable pointer to the exact file.
  • meta.source_url_site — user‑friendly URL for UI previews.
  • meta.sha256 — robust dedup key across updates.

Intended uses

  • Pretraining / Continued pretraining for security‑aware models.
  • RAG / QA over a curated set of red‑team/blue‑team encyclopedic pages.
  • Summarization & explanation of workflows, checklists, and attack surfaces.
  • Evaluation: security knowledge, long‑form reasoning on procedures, and code‑aware contexts.

This corpus is didactic/encyclopedic. It does not replace hands‑on lab data, exploit PoCs, or live telemetry.


Cleaning & quality

  • YAML front‑matter and boilerplate removed; headings normalized; excessive blank lines collapsed.
  • Code fences retained verbatim for downstream code‑aware models.
  • Article‑level minimum length applied (very short files excluded).
  • Stable dedup via meta.sha256 and exact source_path at a specific commit.

Limitations & caveats

  • Upstream drift: HackTricks evolves; future updates may add/rename pages.
  • License constraints: Non‑commercial, ShareAlike terms apply; see License below.
  • Context gaps: Some pages assume prior knowledge or external links.
  • No execution traces: Articles describe tactics; they are not runtime logs or CVE feeds.

License

  • Underlying content: © respective HackTricks authors, typically CC BY‑NC‑SA 4.0 as stated in the upstream repositories/site.
  • License: "TanDev Proprietary License — All Rights Reserved"

When you use this dataset, you must:

  1. Provide attribution to HackTricks and the specific article(s) used.
  2. Use it non‑commercially unless you have additional permission from rights holders.
  3. Distribute derivatives under the same license (ShareAlike).

If you are a rights holder and would like a page revised or removed, please open an issue on the dataset page or email the maintainer.


Citation

If this dataset helps your research, please cite it alongside HackTricks:

@dataset{tandevllc_2025_hacktricks_slimpajama,
  author = {Gupta, Smridh},
  title  = {HackTricks SlimPajama Corpus},
  year   = {2025},
  url    = {https://huggingface.co/datasets/tandevllc/hacking-tricks}
}

You should also attribute individual HackTricks pages used (e.g., in an acknowledgments section) to satisfy CC BY‑NC‑SA 4.0.


Maintainer

Smridh Gupta — [email protected]

README history 9 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2025-11-05Update README.mdf300fb87.7 KB
    Loading...
  2. 2025-11-05Update README.md2d8719e7.8 KB
    Loading...
  3. 2025-11-04Update README.md8ca484d7.8 KB
    Loading...
  4. 2025-11-04Update README.md7acae657.5 KB
    Loading...
  5. 2025-11-04hacking_tricks: register config from raw/hacking-tricks.jsonl (888 rows)d788b3a7.5 KB
    Loading...
  6. 2025-11-04Update README.mdfba02376.6 KB
    Loading...
  7. 2025-11-04Rename hacking-tricks.jsonl to raw/hacking-tricks.jsonlc0f80f336 B
    Loading...
  8. 2025-11-04Upload hacking-tricks.jsonl6cf333d36 B
    Loading...
  9. 2025-11-04initial commitd033fd536 B
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Community discussions 1 thread · 1 open · 1 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2025-11-05[bot] Conversion to Parquetopen1 💬#1
    Loading...

Related datasets same stage · extract

Read further

Metadata

License
other

Repository

Download the dataset

Gated dataset. You need to accept the author's terms on Hugging Face before downloading. Visit the repository, click Agree and access repository, then log in locally with huggingface-cli login and use one of the snippets below.

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("tandevllc/hacking-tricks")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="tandevllc/hacking-tricks", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/tandevllc/hacking-tricks
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration