Datasets:
|
Download README.md from THULab/cyb001_sample: direct link, hf CLI and curl.
- Browser
- Download file 7.07 kB
-
https://huggingface.co/datasets/THULab/cyb001_sample/resolve/main/README.md
- Command line
-
hf download hf://datasets/THULab/cyb001_sample/README.md
-
curl -L -o README.md https://huggingface.co/datasets/THULab/cyb001_sample/resolve/main/README.md
7.07 kB
| license: cc-by-nc-4.0 | |
| task_categories: | |
| - tabular-classification | |
| - time-series-forecasting | |
| tags: | |
| - tsfile | |
| - timeseries | |
| - cybersecurity | |
| - network-traffic | |
| - intrusion-detection | |
| - synthetic-data | |
| - anomaly-detection | |
| - apt | |
| - c2-beacon | |
| - time-series | |
| - format:tsfile | |
| pretty_name: CYB001 — Synthetic Network Traffic (Sample) (TsFile) | |
| size_categories: | |
| - 1K<n<10K | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: flow_events | |
| path: flow_events.tsfile | |
| - split: network_flows | |
| path: network_flows.tsfile | |
| - split: network_topology | |
| path: network_topology.tsfile | |
| - split: session_summary | |
| path: session_summary.tsfile | |
| # CYB001 — Synthetic Network Traffic (Sample) (TsFile) | |
| Apache TsFile version of [`xpertsystems/cyb001-sample`](https://huggingface.co/datasets/xpertsystems/cyb001-sample). | |
| ## Overview | |
| **CYB001 — Synthetic Network Traffic Dataset (Sample)** — This is a **free preview** of the full **CYB001 — Synthetic Network Traffic Dataset** product. It contains roughly **1 / 60th of the full dataset** at identical schema, label distribution, and statistical fingerprint, so you can evaluate fit before licensing the full product. | |
| - **Tables:** `flow_events`, `network_flows`, `network_topology`, `session_summary` | |
| - **Rows:** 16,401 across 4 TsFile table(s). | |
| - `flow_events`: 5,431 rows — Time is the source `timestamp_offset_ms` offset in milliseconds. | |
| - `network_flows`: 9,770 rows, 2024-01-01 01:12:21.832000 → 2024-01-30 23:52:14.441000 (UTC) | |
| - `network_topology`: 200 rows — Time is synthetic row index over the stable source order (0 … N-1); the source table has no per-row clock. | |
| - `session_summary`: 1,000 rows, 2024-01-01 01:10:27 → 2024-01-30 23:47:40 (UTC) | |
| ## Schema (TsFile structure) | |
| ### `flow_events.tsfile` | |
| - **Time** (INT64, milliseconds) — the source `timestamp_offset_ms` offset in milliseconds. | |
| - **TAG**: `segment_id` — device dimension(s); query one device with `WHERE segment_id=...`. | |
| - **FIELD** (9): `flow_id` (string), `session_id` (string), `event_type` (string), `source_port` (int64), `dest_port` (int64), `protocol` (string), `packet_size_bytes` (int64), `payload_entropy` (double), `event_severity` (string) | |
| ### `network_flows.tsfile` | |
| - **Time** (INT64, milliseconds) — the source `flow_start_timestamp` timestamp as INT64 milliseconds. | |
| - **TAG**: `segment_id` — device dimension(s); query one device with `WHERE segment_id=...`. | |
| - **FIELD** (36): `flow_id` (string), `session_id` (string), `source_ip_hash` (string), `destination_ip_hash` (string), `source_port` (int64), `dest_port` (int64), `protocol` (string), `flow_duration_ms` (int64), `total_fwd_packets` (int64), `total_bwd_packets` (int64), `total_bytes_fwd` (int64), `total_bytes_bwd` (int64), `fwd_packet_len_mean` (int64), `fwd_packet_len_std` (int64), `bwd_packet_len_mean` (int64), `bwd_packet_len_std` (int64), `flow_bytes_per_sec` (double), `flow_packets_per_sec` (double), `inter_arrival_time_mean` (double), `inter_arrival_time_std` (double), `tcp_flag_syn_count` (int64), `tcp_flag_ack_count` (int64), `tcp_flag_fin_count` (int64), `tcp_flag_rst_count` (int64), `tcp_flag_psh_count` (int64), `tcp_flag_urg_count` (int64), `flow_lifecycle_phase` (string), `traffic_category` (string), `attack_subcategory` (string), `label` (string), `source_device_type` (string), `dest_device_type` (string), `attacker_capability_tier` (string), `retransmission_flag` (int64), `fragmentation_flag` (int64), `protocol_violation_flag` (int64) | |
| ### `network_topology.tsfile` | |
| - **Time** (INT64, milliseconds) — synthetic row index over the stable source order (0 … N-1); the source table has no per-row clock. | |
| - **TAG**: `segment_id` — device dimension(s); query one device with `WHERE segment_id=...`. | |
| - **FIELD** (17): `detector_id` (string), `segment_type` (string), `trust_level` (double), `firewall_policy` (string), `allowed_protocols` (string), `avg_concurrent_flows` (int64), `bandwidth_mbps` (double), `nat_enabled` (int64), `ids_coverage` (double), `qos_policy` (string), `diurnal_peak_factor` (double), `feature_space_dim` (int64), `alert_threshold` (double), `retraining_cadence_days` (int64), `ensemble_size` (int64), `defender_architecture` (string), `device_count` (int64) | |
| ### `session_summary.tsfile` | |
| - **Time** (INT64, milliseconds) — the source `session_start_timestamp` timestamp as INT64 milliseconds. | |
| - **TAG**: `segment_id` — device dimension(s); query one device with `WHERE segment_id=...`. | |
| - **FIELD** (22): `session_id` (string), `source_ip_hash` (string), `destination_ip_hash` (string), `session_duration_sec` (double), `total_flows` (int64), `total_bytes_transferred` (int64), `total_packets` (int64), `dominant_protocol` (string), `primary_traffic_category` (string), `label` (string), `attack_subcategory` (string), `attacker_capability_tier` (string), `source_device_type` (string), `dest_device_type` (string), `payload_entropy_mean` (double), `retransmission_rate` (double), `protocol_violation_count` (int64), `c2_beacon_flag` (int64), `exfil_volume_bytes` (double), `scan_probe_count` (int64), `lateral_move_flag` (int64), `session_risk_score` (double) | |
| ## Conversion notes | |
| - Each CSV of the sample is converted into its own TsFile table (4 tables), so no table is merged with another and no column is dropped. | |
| - Event/telemetry tables use the source simulation clock as Time (INT64 milliseconds): `timestep` step counters and millisecond offsets are stored as-is, minute-based columns are multiplied by 60,000, and ISO/UTC strings are parsed to epoch milliseconds. | |
| - Static inventory/topology/summary tables have no per-row clock; their Time is a synthetic row index (0..N-1) over the stable source order. | |
| - Low-cardinality dimensions of each table (campaign/incident/asset/session ids, phases, labels) are declared as TAG columns; query one simulation with e.g. `WHERE campaign_id='...'`. | |
| ## Usage | |
| Install the Apache TsFile Python SDK (`pip install tsfile`) and read a converted file: | |
| ```python | |
| from pathlib import Path | |
| from tsfile import TsFileReader | |
| path = Path("flow_events.tsfile") | |
| with TsFileReader(str(path)) as reader: | |
| schemas = reader.get_all_table_schemas() | |
| print("tables:", list(schemas)) | |
| table_name = next(iter(schemas)) | |
| table = schemas[table_name] | |
| columns = [column.get_column_name() for column in table.get_columns()] | |
| print("columns:", columns) | |
| field_names = [ | |
| column.get_column_name() | |
| for column in table.get_columns() | |
| if column.get_column_name() not in {"Time", "time"} | |
| ] | |
| if field_names: | |
| with reader.query_table(table_name, field_names[:3], batch_size=1024) as result: | |
| batch = result.read_arrow_batch() | |
| if batch is not None: | |
| print(batch.to_pandas().head()) | |
| ``` | |
| ## Source & license | |
| - Original dataset: [`xpertsystems/cyb001-sample`](https://huggingface.co/datasets/xpertsystems/cyb001-sample) | |
| - Source card title / publisher: CYB001 — Synthetic Network Traffic (Sample) | |
| - License: cc-by-nc-4.0 (as declared by the original dataset). | |