rypow's picture
v0.2.1 - clean release
d41f3fb verified
|
raw
history blame
13.8 kB
# Datasheet — v0.2 Tetragon-native HIDS corpus
Following the [Datasheets for Datasets](https://arxiv.org/abs/1803.09010)
framework (Gebru et al.). Cross-references the
[`datacard.md`](./datacard.md) for numerical breakdowns; this document
covers process and provenance.
---
## 1. Motivation
### Why was this dataset created?
To support an academic project investigating
distributed Mamba state-space models for host-telemetry LLM-orchestrated attack detection.
### Who created this dataset and on behalf of which entity?
Ryan William Powers, in the context of an academic course project. No
commercial entity is involved; collection happened on the author's own
Linux host.
### Who funded the creation of the dataset?
Self-funded.
### Any other comments?
The release is contingent on the author's anonymization sweep: per-column decisions
documented in the datacard's "Personal and sensitive information" section);
no third-party identifiable data was captured because no third-party
traffic crosses the isolated LXC container.
---
## 2. Composition
### What do the instances represent?
Each instance is a single **OS event** — one row of the parquet —
emitted by Tetragon eBPF probes inside an LXC container during normal
developer activity or during a labeled ATT&CK technique trial. Events
fall into three top-level types: `process_exec`, `process_exit`, and
`process_kprobe` (with the kprobe sub-type captured in
`f_kprobe_function`).
### How many instances are there?
- Train: 16,951,950 events (no attack labels by design)
- Test: 2,349,965 events (705,852 inside labeled-attack windows ≈ 30 %)
- Total: 19,301,915 events
### Does the dataset contain all possible instances?
No. The dataset is a **time-bounded sample** from one host between
2026-04-14T01:41Z and 2026-04-20T02:01Z. Only events the parser admits
(post container filter, post sentinel-window exclusion) reach the
parquet. Procfs-walk synthetic execs are **tagged** (via
`f_is_procfs_walk = 1`) rather than dropped, so they are present in the
release; filter on the flag if needed.
### What does each instance consist of?
A 63-column row mixing:
- 22 integer-coded categoricals (`f_event_type`, `f_action_family`, etc.,
including the four 3a′ promoted categoricals: `f_path_category`,
`f_dst_ip_category`, `f_dst_port_category`, `f_object_category`)
- 4 string-coded categoricals (`path_category`, `object_category`,
`dst_ip_category`, `dst_port_category` — provenance side columns)
- 7 hash columns (256–4096 buckets each)
- 6 boolean flags (`f_in_init_tree` and `f_args_truncated` were dropped
in 3a′ as constant-zero in this corpus)
- 5 numeric columns (timestamps in ns, capability bitmasks, fd integer)
- 3 bucketed log-time columns
- 3 identifier columns (`event_time`, `proc_exec_id`, `proc_pid`)
- 7 release-eligible side strings (basenames, normalized cwd,
`parent_child_pair`, `token`, `process_tree_root_exec_id`)
Full schema and integer-code → label mapping in
`reproduction/feature_definitions.json` (schema version 1.1).
### Is there a label or target associated with each instance?
Not directly. **Time-window labels** in `labels.csv` provide
`(host, technique_id, technique_name, tactic, start_ts, end_ts, trial,
delivery, notes)` per ART trial. To label an instance, join on
`event_time >= start_ts AND event_time < end_ts` (half-open interval —
matches the audit notebook); the event inherits the intersected
interval's technique label. Events outside any interval are benign by
exclusion.
### Is any information missing from individual instances?
Yes, by design:
- Raw paths (`proc_binary`, `proc_cwd`, `parent_*`, `kp_*_path`) are dropped.
- Raw arguments (`proc_arguments`, `parent_arguments`, `kprobe_args_json`)
are dropped.
- Raw IPs (`kp_sock_daddr`, `kp_sock_saddr`) are dropped.
- Raw uids and namespace inums are dropped.
- Hostnames (`node_name`) are dropped.
- `proc_exec_id` and `process_tree_root_exec_id` are pseudonymized to
`exec_<32hex>` via salted HMAC-SHA256; equality joins are preserved
(lineage walks still work) but the original `host:ts:pid` payload
is erased.
- Basenames (`proc_binary_basename`, `parent_binary_basename`,
`root_ancestor_basename`) are aliased: distro / dev-tooling pass
through verbatim, custom binaries become `custom_tool_NNN`, VSCode
commit-hash binaries collapse to `vscode_server_bin`. Full alias map
at `reproduction/alias_map.json`.
These are reachable in the original raw parquet (not released; see §6
distribution) and are reconstructible from the bundled parser + tracing
configs by re-collecting one's own data.
### Are relationships between individual instances made explicit?
Yes — process lineage is preserved through three columns:
- `proc_exec_id` — pseudonymized but stable per-exec identifier.
- `f_lineage_depth` + `f_lineage_bag_hash` — encoder-side ancestry.
- `process_tree_root_exec_id` + `f_root_ancestor_basename_hash` — root
of the process subtree.
### Are there recommended data splits?
Yes. **Use the chronological train/test split as shipped.** All ART
attack intervals fall in test; train is benign-only by construction.
This is the split the v0.2 paper reports on.
### Is the dataset self-contained?
Almost. The parquet shards + `labels.csv` + `feature_definitions.json`
are the canonical artifact. `reproduction/` contains the configs.
### Does the dataset contain confidential / offensive content?
No confidential third-party data — collection happened on an isolated
LXC container with no external user traffic. ATT&CK technique execution
is by construction adversarial-style activity but happened only against
the author's own container. An anonymizer further de-identifies
the released parquet (basename aliasing, path rewriting, exec-id
pseudonymization, defensive global string sweep — see
`datacard.md` "Personal and sensitive information").
---
## 3. Collection process
### How was the data acquired?
- **Sensor:** Tetragon 1.6.1 (Cilium eBPF) running as a host-level daemon.
- **Target:** a single LXC container on the host. The parser pins on the
container's PID-namespace inum at filter time.
- **Tracing policies:** 7 YAML policies covering file (fd_install,
do_unlinkat, chmod_common), network (tcp_connect / close, inet_csk_accept,
udp_sendmsg), memory (security_mmap_file, security_file_mprotect),
privilege (commit_creds), process injection (sys_ptrace,
sys_process_vm_writev), and file-attribute hooks. Bundled in
`reproduction/tetragon-configs/`.
- **Output format:** rotated `events-*.json.gz` files written to
`/var/log/tetragon/` and rsynced to a NAS for archival.
### Is the data sample of a larger set?
Yes — a time-bounded slice of the host's Tetragon stream during the
collection window. Earlier and later data from the same host exists but
is not part of this release.
### Who collected the data, and how were they compensated?
The author. No compensation; this is an academic course project.
### Over what timeframe was the data collected?
2026-04-14T01:41:13Z (first event in train) → 2026-04-20T02:01:27Z (last
event in test). 6-day collection window, with a brief Tetragon outage on
2026-04-18→19 (documented in the project repo's incident log) that
triggered a PID-namespace inum rotation captured in the multi-inum
`target_pid_ns_inum` filter.
### Were any ethical-review processes conducted?
No formal IRB. The dataset captures only the author's own activity on
the author's own hardware.
### Were the individuals notified / did they consent?
The dataset captures the author's own session; the author is the sole
subject and consents to the release
---
## 4. Preprocessing / cleaning / labeling
### Was preprocessing / cleaning done?
Yes. Two stages:
1. **Parser** (`tetragon_native_parser.py`):
- Container filter: drops events outside the target PID-namespace
inum set.
- Sentinel-window filter: drops events inside four ART setup / dry-run
/ smoke-test intervals on 2026-04-19.
- Procfs-walk: synthetic execs from Tetragon's startup /proc/ scan
are **tagged** (`f_is_procfs_walk = 1`), not dropped — they preserve
lineage roots for daemons that pre-existed the agent.
- Field normalization: parses RFC3339-ns timestamps to int64 ns,
hydrates 126 typed columns from the JSONL envelopes.
2. **Behavior builder** (`v0_2_behavior_builder.py`):
- Lineage walk to populate `f_lineage_*` and `process_tree_*` columns.
Train→test seeding closes daemon-rooted parents that lived only in
the train window.
- Action-family / object-category / path-category / dst-ip-category /
dst-port-category derivations.
- Hashing of basenames / lineage bags / parent-child pairs into
fixed-capacity buckets (3a′ caps: 2048 / 1024 / 4096 / 256 / 1024 /
1024 / 4096).
- Categorical encoding of every kept column to `uint8` / `uint16`.
- Per-process `delta_t_prev_ns` keying (eliminates global-stream
ordering artifacts).
3. **Anonymization** (`scripts/anonymize_v0_2_parquet.py`, run after the
builder): basename aliasing, path rewriting, composite re-composition,
exec-id salted-HMAC pseudonymization, defensive global string sweep.
See the datacard "Personal and sensitive information" section.
### Was the "raw" data saved?
Yes, internally. The 126-column raw parquet (`raw_train.parquet`,
`raw_test.parquet`) is not part of the public release because it would
require column-level scrubbing across 9 path-bearing columns spanning
60–95 % of rows. Re-collection from the bundled configs is the supported
path for raw data.
### Is the preprocessing software available?
Yes. Both stages live in the project repository at the parser SHA pinned
in `reproduction/PARSER_VERSION`. The repo (linked from the
[Hugging Face dataset card](./datacard.md)) is permissively licensed (MIT).
- **https://github.com/ryypow/dendroaspis**
---
## 5. Uses
### Has the dataset been used for any tasks?
Yes:
- **Mamba NLL (autoregressive, Run 2)** — next-event surprise scorer with
the front-pad alignment fix; test AUROC = 0.7411.
- **Mamba MEM-FA (field-aware masked-event modeling, Run 2)**
per-field categorical CE heads on top of the encoded representation;
test AUROC = 0.7513 (best Mamba result on this corpus).
- **Classical-baseline bake-off** — n-gram (token-level), IsolationForest,
XGBoost, all trained on the same encoded feature columns. Best
classical: IsolationForest (AUROC 0.6658). Mamba's stack adds ≈0.085
AUROC over the strongest classical. Raw eval JSONs at
`mamba-edge/artifacts/v0.2/baseline_*/` in the project repo.
### Is there a repository linking to use cases?
- **https://github.com/ryypow/dendroaspis**
### What other tasks could this dataset be used for?
- ATT&CK-technique-specific detector evaluation
- Self-supervised pretraining for host-telemetry transformers
- Lineage / process-tree representation learning
- Temporal-anomaly-scoring baselines
- Sequence-tokenization research (the `token` column is a structured
composite identifier; alternative tokenizations can be derived)
### Is there anything about the dataset's composition that could result in unfair treatment?
Single-host, single-developer baseline. Models trained on this corpus
**will not generalize** to multi-host or multi-tenant environments
without recalibration. The datacard's "Sources of bias" enumerates the
specific limitations.
### Are there tasks for which the dataset should NOT be used?
- **Production deployment.** Recalibration is mandatory; the
hash-bucket sizes are right-sized for plausible multi-host saturation
but observed utilization here is very low — see datacard's
hash-bucket utilization table.
- **Generalization claims about HIDS.** A 21-technique single-host
evaluation is necessary but not sufficient evidence; use it as one
bench among many, not the bench.
- **Attack template / red-team training data.** The corpus is event-side
telemetry, not payloads.
---
## 6. Distribution
### How will the dataset be distributed?
Hugging Face Hub — `<user>/dendroaspis-tetragon-hids` (URL filled in at
publish time). The release bundle is a directory; the parquet shards are
under `data/`, datacard / datasheet / license / citation at the root,
and reproduction artifacts under `reproduction/`. SHA256 manifest
included (`SHA256SUMS`) plus a JSON release manifest (`RELEASE.json`)
recording the build timestamp + revision SHA + per-file sha256.
### Is there a fee?
No. Public, free.
### When will the dataset be distributed?
April 2026
### Will the dataset be distributed under a copyright / IP license?
CC BY 4.0 (data) + MIT (bundled scripts).
### Have any third parties imposed IP-based or other restrictions?
No.
### Do any export controls / regulatory restrictions apply?
No. Behavioral telemetry from a homelab; no controlled technologies are
captured.
---
## 7. Maintenance
### Who is supporting / hosting / maintaining the dataset?
Ryan William Powers via the Hugging Face Hub repo. Bug reports, errata,
and corrections via GitHub issues on the project repository (linked from
the datacard).
### How can the manager be contacted?
GitHub: [@ryypow](https://github.com/ryypow).
### Will the dataset be updated?
No. Future work includes similar experiments using telemetry derivede from other platforms.
This will remain a stable citation target.
### If others want to contribute extensions / build on the dataset?
Forking the dataset repo, applying changes, and citing the original is
fine under CC BY 4.0. For substantive extensions (e.g. a multi-host
re-collection), open a GitHub issue first to coordinate naming and
avoid label-schema drift.