pidsmaker 4.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pidsmaker might be problematic. Click here for more details.
- pidsmaker/__init__.py +22 -0
- pidsmaker/cli.py +32 -0
- pidsmaker/config/__init__.py +2 -0
- pidsmaker/config/config.py +2100 -0
- pidsmaker/config/pipeline.py +1768 -0
- pidsmaker/config/schemas.py +1032 -0
- pidsmaker/datasets.py +222 -0
- pidsmaker/debug_tests.py +30 -0
- pidsmaker/decoders/__init__.py +5 -0
- pidsmaker/decoders/custom_edge_mlp_decoder.py +17 -0
- pidsmaker/decoders/custom_mlp_decoder.py +10 -0
- pidsmaker/decoders/edge_linear_decoder.py +16 -0
- pidsmaker/decoders/inner_product_decoder.py +18 -0
- pidsmaker/decoders/nodlink_decoder.py +56 -0
- pidsmaker/detection/__init__.py +0 -0
- pidsmaker/detection/evaluation_methods/__init__.py +9 -0
- pidsmaker/detection/evaluation_methods/edge_evaluation.py +259 -0
- pidsmaker/detection/evaluation_methods/evaluation_utils.py +1730 -0
- pidsmaker/detection/evaluation_methods/host_two_stage_evaluation.py +115 -0
- pidsmaker/detection/evaluation_methods/node_evaluation.py +463 -0
- pidsmaker/detection/evaluation_methods/node_tw_evaluation.py +196 -0
- pidsmaker/detection/evaluation_methods/plot.py +192 -0
- pidsmaker/detection/evaluation_methods/queue_evaluation.py +451 -0
- pidsmaker/detection/evaluation_methods/tw_evaluation.py +95 -0
- pidsmaker/detection/flash_detection.py +162 -0
- pidsmaker/detection/magic_knn.py +190 -0
- pidsmaker/detection/node_scoring.py +52 -0
- pidsmaker/detection/threatrace_detection.py +65 -0
- pidsmaker/detection/training_methods/__init__.py +1 -0
- pidsmaker/detection/training_methods/inference_loop.py +293 -0
- pidsmaker/detection/training_methods/ocrapt_early_stop.py +165 -0
- pidsmaker/detection/training_methods/threatrace_training.py +169 -0
- pidsmaker/detection/training_methods/training_loop.py +377 -0
- pidsmaker/encoders/__init__.py +22 -0
- pidsmaker/encoders/argus_encoder.py +69 -0
- pidsmaker/encoders/custom_mlp.py +75 -0
- pidsmaker/encoders/custom_mlp_encoder.py +10 -0
- pidsmaker/encoders/egraphsage_encoder.py +56 -0
- pidsmaker/encoders/gat.py +67 -0
- pidsmaker/encoders/gcn.py +27 -0
- pidsmaker/encoders/gin.py +48 -0
- pidsmaker/encoders/glstm.py +298 -0
- pidsmaker/encoders/graph_attention.py +63 -0
- pidsmaker/encoders/gru.py +29 -0
- pidsmaker/encoders/hetero/__init__.py +4 -0
- pidsmaker/encoders/hetero/ancestor_encoder.py +98 -0
- pidsmaker/encoders/hetero/entity_encoder.py +33 -0
- pidsmaker/encoders/hetero/event_encoder.py +81 -0
- pidsmaker/encoders/hetero/hetero_graph_transformer.py +40 -0
- pidsmaker/encoders/lares_encoder.py +68 -0
- pidsmaker/encoders/linear_encoder.py +16 -0
- pidsmaker/encoders/magic_encoder.py +161 -0
- pidsmaker/encoders/rcaid_encoder.py +81 -0
- pidsmaker/encoders/rgcn.py +75 -0
- pidsmaker/encoders/sage.py +51 -0
- pidsmaker/encoders/shadewatcher_encoder.py +149 -0
- pidsmaker/encoders/sum_aggregation.py +20 -0
- pidsmaker/encoders/temporal_wrappers.py +80 -0
- pidsmaker/encoders/textrcnn.py +82 -0
- pidsmaker/encoders/tgn_encoder.py +193 -0
- pidsmaker/experiments/tuning.py +102 -0
- pidsmaker/experiments/uncertainty.py +261 -0
- pidsmaker/factory.py +1456 -0
- pidsmaker/featurization/__init__.py +0 -0
- pidsmaker/featurization/feat_inference_methods/__init__.py +7 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_HFH.py +31 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_TRW.py +67 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_alacarte.py +16 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_doc2vec.py +54 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_fasttext.py +38 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_flash.py +70 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_graph2vec.py +85 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_ocrapt_features.py +95 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_pretrained.py +1729 -0
- pidsmaker/featurization/feat_inference_methods/feat_inference_word2vec.py +56 -0
- pidsmaker/featurization/featurization_methods/__init__.py +0 -0
- pidsmaker/featurization/featurization_methods/build_trw.py +67 -0
- pidsmaker/featurization/featurization_methods/featurization_alacarte.py +748 -0
- pidsmaker/featurization/featurization_methods/featurization_doc2vec.py +99 -0
- pidsmaker/featurization/featurization_methods/featurization_fasttext.py +75 -0
- pidsmaker/featurization/featurization_methods/featurization_flash.py +203 -0
- pidsmaker/featurization/featurization_methods/featurization_graph2vec.py +243 -0
- pidsmaker/featurization/featurization_methods/featurization_trw.py +115 -0
- pidsmaker/featurization/featurization_methods/featurization_word2vec.py +87 -0
- pidsmaker/featurization/featurization_utils.py +275 -0
- pidsmaker/featurization/utils/build_random_walks.py +68 -0
- pidsmaker/featurization/utils/trw.py +203 -0
- pidsmaker/hetero.py +81 -0
- pidsmaker/losses.py +170 -0
- pidsmaker/main.py +377 -0
- pidsmaker/mimicry.py +284 -0
- pidsmaker/model.py +382 -0
- pidsmaker/objectives/__init__.py +16 -0
- pidsmaker/objectives/autoencode_edge_emb.py +43 -0
- pidsmaker/objectives/deep_graph_infomax.py +94 -0
- pidsmaker/objectives/detect_few_shot.py +21 -0
- pidsmaker/objectives/one_class.py +75 -0
- pidsmaker/objectives/predict_edge_contrastive.py +165 -0
- pidsmaker/objectives/predict_edge_supervised.py +77 -0
- pidsmaker/objectives/predict_edge_type.py +28 -0
- pidsmaker/objectives/predict_masked_struct.py +49 -0
- pidsmaker/objectives/predict_node_type.py +36 -0
- pidsmaker/objectives/predict_process_tag.py +169 -0
- pidsmaker/objectives/predict_snapshot_embedding.py +97 -0
- pidsmaker/objectives/reconstruct_edge_emb.py +16 -0
- pidsmaker/objectives/reconstruct_masked_feat.py +51 -0
- pidsmaker/objectives/reconstruct_node_emb.py +13 -0
- pidsmaker/objectives/reconstruct_node_feat.py +13 -0
- pidsmaker/objectives/validation_wrapper.py +55 -0
- pidsmaker/preprocessing/__init__.py +0 -0
- pidsmaker/preprocessing/build_graph_methods/__init__.py +1 -0
- pidsmaker/preprocessing/build_graph_methods/build_default_graphs.py +830 -0
- pidsmaker/preprocessing/build_graph_methods/build_magic_graphs.py +220 -0
- pidsmaker/preprocessing/cleaning.py +258 -0
- pidsmaker/preprocessing/transformation_methods/__init__.py +2 -0
- pidsmaker/preprocessing/transformation_methods/attack_generation/synthetic_attack_naive.py +194 -0
- pidsmaker/preprocessing/transformation_methods/transformation_dag.py +28 -0
- pidsmaker/preprocessing/transformation_methods/transformation_merge_edges.py +136 -0
- pidsmaker/preprocessing/transformation_methods/transformation_rcaid_pseudo_graph.py +510 -0
- pidsmaker/preprocessing/transformation_methods/transformation_undirected.py +24 -0
- pidsmaker/preprocessing/transformation_methods/transformation_utils.py +36 -0
- pidsmaker/pretrained/__init__.py +5 -0
- pidsmaker/pretrained/data/__init__.py +4 -0
- pidsmaker/pretrained/data/behavior_signatures.py +548 -0
- pidsmaker/pretrained/data/canonical_tokens.py +1035 -0
- pidsmaker/pretrained/data/edge_filter.py +381 -0
- pidsmaker/pretrained/data/entity_classes.py +476 -0
- pidsmaker/pretrained/data/sampler.py +926 -0
- pidsmaker/pretrained/data/tokenizer_bpe.py +1659 -0
- pidsmaker/pretrained/detect.py +1432 -0
- pidsmaker/pretrained/embedding_generator.py +252 -0
- pidsmaker/pretrained/finetune.py +1437 -0
- pidsmaker/pretrained/models/__init__.py +20 -0
- pidsmaker/pretrained/models/behavior.py +348 -0
- pidsmaker/pretrained/models/bert.py +286 -0
- pidsmaker/pretrained/models/deepwalk.py +128 -0
- pidsmaker/pretrained/models/dgi.py +120 -0
- pidsmaker/pretrained/models/gae.py +114 -0
- pidsmaker/pretrained/models/gnn_distill.py +475 -0
- pidsmaker/pretrained/models/graphmae.py +373 -0
- pidsmaker/pretrained/models/hf_pretrained.py +213 -0
- pidsmaker/pretrained/models/llama.py +110 -0
- pidsmaker/pretrained/models/modernbert.py +567 -0
- pidsmaker/pretrained/models/roberta.py +147 -0
- pidsmaker/pretrained/models/rope_utils.py +99 -0
- pidsmaker/pretrained/models/ropebert.py +322 -0
- pidsmaker/pretrained/models/spider.py +204 -0
- pidsmaker/pretrained/models/tgn.py +770 -0
- pidsmaker/pretrained/pretrain/__init__.py +3 -0
- pidsmaker/pretrained/pretrain/pretrain_behavior_cluster.py +513 -0
- pidsmaker/pretrained/pretrain/pretrain_common.py +585 -0
- pidsmaker/pretrained/pretrain/pretrain_deepwalk.py +31 -0
- pidsmaker/pretrained/pretrain/pretrain_dgi.py +143 -0
- pidsmaker/pretrained/pretrain/pretrain_gae.py +143 -0
- pidsmaker/pretrained/pretrain/pretrain_gnn_distill.py +438 -0
- pidsmaker/pretrained/pretrain/pretrain_graphmae.py +151 -0
- pidsmaker/pretrained/pretrain/pretrain_hf.py +169 -0
- pidsmaker/pretrained/pretrain/pretrain_main.py +276 -0
- pidsmaker/pretrained/pretrain/pretrain_mlm.py +491 -0
- pidsmaker/pretrained/pretrain/pretrain_spider.py +502 -0
- pidsmaker/pretrained/training_utils.py +157 -0
- pidsmaker/process_reapr_gt.py +101 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-CADETS/node_Nginx_Backdoor_06.csv +8 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-CADETS/node_Nginx_Backdoor_11.csv +4 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-CADETS/node_Nginx_Backdoor_12.csv +43 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-CADETS/node_Nginx_Backdoor_13.csv +24 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-CLEARSCOPE/node_clearscope_e3_firefox_0411.csv +41 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-CLEARSCOPE/node_clearscope_e3_firefox_0412.csv +0 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-FIVEDIRECTIONS/node_fivedirections_e3_browser_0412.csv +1 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-FIVEDIRECTIONS/node_fivedirections_e3_excel_0409.csv +63 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-FIVEDIRECTIONS/node_fivedirections_e3_firefox_0411.csv +56 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-THEIA/node_Browser_Extension_Drakon_Dropper.csv +61 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-THEIA/node_Firefox_Backdoor_Drakon_In_Memory.csv +58 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-TRACE/node_trace_e3_firefox_0410.csv +11 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-TRACE/node_trace_e3_phishing_executable_0413.csv +11 -0
- pidsmaker/resources/Ground_Truth/orthrus/E3-TRACE/node_trace_e3_pine_0413.csv +14 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-CADETS/node_Nginx_Drakon_APT.csv +19 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-CADETS/node_Nginx_Drakon_APT_17.csv +107 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-CLEARSCOPE/node_clearscope_e5_appstarter_0515.csv +26 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-CLEARSCOPE/node_clearscope_e5_firefox_0517.csv +1 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-CLEARSCOPE/node_clearscope_e5_lockwatch_0517.csv +17 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-CLEARSCOPE/node_clearscope_e5_tester_0517.csv +8 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-FIVEDIRECTIONS/node_fivedirections_e5_bits_0515.csv +54 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-FIVEDIRECTIONS/node_fivedirections_e5_copykatz_0509.csv +87 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-FIVEDIRECTIONS/node_fivedirections_e5_dns_0517.csv +11 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-FIVEDIRECTIONS/node_fivedirections_e5_drakon_0517.csv +6 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-THEIA/node_THEIA_1_Firefox_Drakon_APT_BinFmt_Elevate_Inject.csv +70 -0
- pidsmaker/resources/Ground_Truth/orthrus/E5-TRACE/node_Trace_Firefox_Drakon.csv +71 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_m1.csv +1 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_m2.csv +1 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_m3.csv +1 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_m4.csv +5 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_m5.csv +23 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_m6.csv +18 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_s1.csv +1 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_s2.csv +1 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_s3.csv +16 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_edr/atlasv2_edr_s4.csv +22 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_m1.csv +126 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_m2.csv +105 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_m3.csv +94 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_m4.csv +139 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_m5.csv +228 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_m6.csv +131 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_s1.csv +118 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_s2.csv +89 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_s3.csv +133 -0
- pidsmaker/resources/Ground_Truth/orthrus/atlasv2_h1/node_h1_s4.csv +135 -0
- pidsmaker/resources/Ground_Truth/orthrus/carbanakv2_edr/carbanakv2_edr.csv +2453 -0
- pidsmaker/resources/Ground_Truth/orthrus/h051/node_h051_0925.csv +114 -0
- pidsmaker/resources/Ground_Truth/orthrus/h201/node_h201_0923.csv +2905 -0
- pidsmaker/resources/Ground_Truth/orthrus/h501/node_h501_0924.csv +749 -0
- pidsmaker/resources/Ground_Truth/orthrus/readme.md +98 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-CADETS/node_Nginx_Backdoor_06.csv +3 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-CADETS/node_Nginx_Backdoor_12.csv +655 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-CADETS/node_Nginx_Backdoor_13.csv +770 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-FIVEDIRECTIONS/node_fivedirections_e3_excel_0409.csv +0 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-FIVEDIRECTIONS/node_fivedirections_e3_firefox_0411.csv +18 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-THEIA/node_Browser_Extension_Drakon_Dropper.csv +42 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-THEIA/node_Firefox_Backdoor_Drakon_In_Memory.csv +81 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-TRACE/node_trace_e3_firefox_0410.csv +37 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-TRACE/node_trace_e3_phishing_executable_0413.csv +9 -0
- pidsmaker/resources/Ground_Truth/reapr/E3-TRACE/node_trace_e3_pine_0413.csv +40 -0
- pidsmaker/resources/Ground_Truth/threatrace/E3-CADETS/ground_truth.txt +12858 -0
- pidsmaker/resources/Ground_Truth/threatrace/E3-FIVEDIRECTIONS/ground_truth.txt +18420 -0
- pidsmaker/resources/Ground_Truth/threatrace/E3-THEIA/ground_truth.txt +25363 -0
- pidsmaker/resources/Ground_Truth/threatrace/E3-TRACE/ground_truth.txt +68265 -0
- pidsmaker/resources/Ground_Truth/threatrace/README.md +123 -0
- pidsmaker/resources/config/anomal_e.yml +25 -0
- pidsmaker/resources/config/argus.yml +56 -0
- pidsmaker/resources/config/attack_edges/cadets_e3.yml +435 -0
- pidsmaker/resources/config/attack_edges/cadets_e5.yml +407 -0
- pidsmaker/resources/config/attack_edges/theia_e3.yml +382 -0
- pidsmaker/resources/config/attack_edges/theia_e5.yml +387 -0
- pidsmaker/resources/config/attack_edges/trace_e3.yml +415 -0
- pidsmaker/resources/config/attack_edges/trace_e5.yml +417 -0
- pidsmaker/resources/config/default.yml +315 -0
- pidsmaker/resources/config/egraphsage.yml +95 -0
- pidsmaker/resources/config/euler.yml +104 -0
- pidsmaker/resources/config/eval/eval_set_clustering.json +3170 -0
- pidsmaker/resources/config/experiments/tuning/components/tuning_featurization_methods.yml +29 -0
- pidsmaker/resources/config/experiments/tuning/systems/clearscope_e5/tuning_orthrus.yml +14 -0
- pidsmaker/resources/config/experiments/tuning/systems/default/tuning_default_baselines.yml +13 -0
- pidsmaker/resources/config/experiments/tuning/systems/default/tuning_orthrus_fixed.yml +16 -0
- pidsmaker/resources/config/experiments/uncertainty/none.yml +5 -0
- pidsmaker/resources/config/experiments/uncertainty/run_n_times.yml +12 -0
- pidsmaker/resources/config/experiments/uncertainty/run_n_times_hyperparameters.yml +12 -0
- pidsmaker/resources/config/experiments/uncertainty/uncertainty.yml +22 -0
- pidsmaker/resources/config/flash.yml +79 -0
- pidsmaker/resources/config/jbeil.yml +65 -0
- pidsmaker/resources/config/kairos.yml +121 -0
- pidsmaker/resources/config/lares.yml +115 -0
- pidsmaker/resources/config/magic.yml +86 -0
- pidsmaker/resources/config/nodlink.yml +79 -0
- pidsmaker/resources/config/ocrapt.yml +91 -0
- pidsmaker/resources/config/orthrus.yml +120 -0
- pidsmaker/resources/config/orthrus_fixed.yml +17 -0
- pidsmaker/resources/config/orthrus_non_snooped.yml +17 -0
- pidsmaker/resources/config/pretrained/README.md +101 -0
- pidsmaker/resources/config/pretrained/cybergfm/cybergfm.yml +49 -0
- pidsmaker/resources/config/pretrained/pretrained.yml +190 -0
- pidsmaker/resources/config/pretrained/pretrained_flash.yml +9 -0
- pidsmaker/resources/config/pretrained/pretrained_kairos.yml +12 -0
- pidsmaker/resources/config/pretrained/pretrained_magic.yml +1 -0
- pidsmaker/resources/config/pretrained/pretrained_nodlink.yml +1 -0
- pidsmaker/resources/config/pretrained/pretrained_orthrus.yml +1 -0
- pidsmaker/resources/config/pretrained/pretrained_supervised.yml +13 -0
- pidsmaker/resources/config/pretrained/pretrained_threatrace.yml +8 -0
- pidsmaker/resources/config/pretrained/pretrained_velox.yml +14 -0
- pidsmaker/resources/config/prographer.yml +136 -0
- pidsmaker/resources/config/rcaid.yml +88 -0
- pidsmaker/resources/config/shadewatcher.yml +146 -0
- pidsmaker/resources/config/tests.yml +10 -0
- pidsmaker/resources/config/threatrace.yml +73 -0
- pidsmaker/resources/config/tuned_baselines/optc_net/tuned_argus.yml +4 -0
- pidsmaker/resources/config/tuned_baselines/optc_net/tuned_lares.yml +13 -0
- pidsmaker/resources/config/velox.yml +10 -0
- pidsmaker/resources/config/viz_config.yml +10 -0
- pidsmaker/tasks/__init__.py +10 -0
- pidsmaker/tasks/batching.py +49 -0
- pidsmaker/tasks/construction.py +31 -0
- pidsmaker/tasks/evaluation.py +232 -0
- pidsmaker/tasks/feat_inference.py +413 -0
- pidsmaker/tasks/featurization.py +43 -0
- pidsmaker/tasks/training.py +19 -0
- pidsmaker/tasks/transformation.py +308 -0
- pidsmaker/tasks/triage.py +143 -0
- pidsmaker/tgn.py +635 -0
- pidsmaker/tokenization/__init__.py +112 -0
- pidsmaker/tokenization/base.py +58 -0
- pidsmaker/tokenization/bpe_tokenizer.py +83 -0
- pidsmaker/tokenization/hf_tokenizer.py +61 -0
- pidsmaker/tokenization/hierarchical_tokenizer.py +44 -0
- pidsmaker/tokenization/label_tokenizer.py +24 -0
- pidsmaker/tokenization/nltk_tokenizer.py +84 -0
- pidsmaker/tokenization/substitution.py +295 -0
- pidsmaker/triage/__init__.py +0 -0
- pidsmaker/triage/tracing_methods/__init__.py +1 -0
- pidsmaker/triage/tracing_methods/depimpact.py +213 -0
- pidsmaker/triage/tracing_methods/depimpact_utils.py +537 -0
- pidsmaker/triage/tracing_methods/ocrapt_subgraph.py +267 -0
- pidsmaker/utils/__init__.py +0 -0
- pidsmaker/utils/cache_utils.py +256 -0
- pidsmaker/utils/data_utils.py +1742 -0
- pidsmaker/utils/database.py +204 -0
- pidsmaker/utils/dataset_utils.py +413 -0
- pidsmaker/utils/dataset_writer.py +1057 -0
- pidsmaker/utils/graph_store.py +634 -0
- pidsmaker/utils/labelling.py +447 -0
- pidsmaker/utils/loss_files.py +193 -0
- pidsmaker/utils/process_tags.py +44 -0
- pidsmaker/utils/utils.py +730 -0
- pidsmaker/vizgen/__init__.py +1 -0
- pidsmaker/vizgen/dimensionality_reduction.py +249 -0
- pidsmaker/vizgen/embed_exporter.py +467 -0
- pidsmaker/vizgen/exporter.py +493 -0
- pidsmaker/vizgen/html_builder.py +936 -0
- pidsmaker/vizgen/web/__init__.py +1 -0
- pidsmaker/vizgen/web/export.py +62 -0
- pidsmaker/vizgen/web/static/css/app.css +250 -0
- pidsmaker/vizgen/web/static/index.html +182 -0
- pidsmaker/vizgen/web/static/js/app.js +627 -0
- pidsmaker/vizgen/web/static/js/campaign.js +123 -0
- pidsmaker/vizgen/web/static/js/data.js +119 -0
- pidsmaker/vizgen/web/static/js/dialogs.js +240 -0
- pidsmaker/vizgen/web/static/js/jobs.js +75 -0
- pidsmaker/vizgen/web/static/js/scene.js +651 -0
- pidsmaker/vizgen/web/static/js/ui.js +370 -0
- pidsmaker/vizgen/web/static/vendor/OrbitControls.js +1045 -0
- pidsmaker/vizgen/web/static/vendor/d3.v4.min.js +2 -0
- pidsmaker/vizgen/web/static/vendor/three.min.js +6 -0
- pidsmaker/vizgen/web/viz_server.py +2176 -0
- pidsmaker-4.0.0.dist-info/METADATA +596 -0
- pidsmaker-4.0.0.dist-info/RECORD +338 -0
- pidsmaker-4.0.0.dist-info/WHEEL +5 -0
- pidsmaker-4.0.0.dist-info/entry_points.txt +2 -0
- pidsmaker-4.0.0.dist-info/licenses/LICENSE +201 -0
- pidsmaker-4.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,596 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pidsmaker
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: Intrusion detection framework based on deep learning
|
|
5
|
+
Author: mlx-graphs contributors
|
|
6
|
+
License: Apache License
|
|
7
|
+
Version 2.0, January 2004
|
|
8
|
+
http://www.apache.org/licenses/
|
|
9
|
+
|
|
10
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
11
|
+
|
|
12
|
+
1. Definitions.
|
|
13
|
+
|
|
14
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
15
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
16
|
+
|
|
17
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
18
|
+
the copyright owner that is granting the License.
|
|
19
|
+
|
|
20
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
21
|
+
other entities that control, are controlled by, or are under common
|
|
22
|
+
control with that entity. For the purposes of this definition,
|
|
23
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
24
|
+
direction or management of such entity, whether by contract or
|
|
25
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
26
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
27
|
+
|
|
28
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
29
|
+
exercising permissions granted by this License.
|
|
30
|
+
|
|
31
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
32
|
+
including but not limited to software source code, documentation
|
|
33
|
+
source, and configuration files.
|
|
34
|
+
|
|
35
|
+
"Object" form shall mean any form resulting from mechanical
|
|
36
|
+
transformation or translation of a Source form, including but
|
|
37
|
+
not limited to compiled object code, generated documentation,
|
|
38
|
+
and conversions to other media types.
|
|
39
|
+
|
|
40
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
41
|
+
Object form, made available under the License, as indicated by a
|
|
42
|
+
copyright notice that is included in or attached to the work
|
|
43
|
+
(an example is provided in the Appendix below).
|
|
44
|
+
|
|
45
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
46
|
+
form, that is based on (or derived from) the Work and for which the
|
|
47
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
48
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
49
|
+
of this License, Derivative Works shall not include works that remain
|
|
50
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
51
|
+
the Work and Derivative Works thereof.
|
|
52
|
+
|
|
53
|
+
"Contribution" shall mean any work of authorship, including
|
|
54
|
+
the original version of the Work and any modifications or additions
|
|
55
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
56
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
57
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
58
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
59
|
+
means any form of electronic, verbal, or written communication sent
|
|
60
|
+
to the Licensor or its representatives, including but not limited to
|
|
61
|
+
communication on electronic mailing lists, source code control systems,
|
|
62
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
63
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
64
|
+
excluding communication that is conspicuously marked or otherwise
|
|
65
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
66
|
+
|
|
67
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
68
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
69
|
+
subsequently incorporated within the Work.
|
|
70
|
+
|
|
71
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
72
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
73
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
74
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
75
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
76
|
+
Work and such Derivative Works in Source or Object form.
|
|
77
|
+
|
|
78
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
79
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
80
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
81
|
+
(except as stated in this section) patent license to make, have made,
|
|
82
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
83
|
+
where such license applies only to those patent claims licensable
|
|
84
|
+
by such Contributor that are necessarily infringed by their
|
|
85
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
86
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
87
|
+
institute patent litigation against any entity (including a
|
|
88
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
89
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
90
|
+
or contributory patent infringement, then any patent licenses
|
|
91
|
+
granted to You under this License for that Work shall terminate
|
|
92
|
+
as of the date such litigation is filed.
|
|
93
|
+
|
|
94
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
95
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
96
|
+
modifications, and in Source or Object form, provided that You
|
|
97
|
+
meet the following conditions:
|
|
98
|
+
|
|
99
|
+
(a) You must give any other recipients of the Work or
|
|
100
|
+
Derivative Works a copy of this License; and
|
|
101
|
+
|
|
102
|
+
(b) You must cause any modified files to carry prominent notices
|
|
103
|
+
stating that You changed the files; and
|
|
104
|
+
|
|
105
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
106
|
+
that You distribute, all copyright, patent, trademark, and
|
|
107
|
+
attribution notices from the Source form of the Work,
|
|
108
|
+
excluding those notices that do not pertain to any part of
|
|
109
|
+
the Derivative Works; and
|
|
110
|
+
|
|
111
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
112
|
+
distribution, then any Derivative Works that You distribute must
|
|
113
|
+
include a readable copy of the attribution notices contained
|
|
114
|
+
within such NOTICE file, excluding those notices that do not
|
|
115
|
+
pertain to any part of the Derivative Works, in at least one
|
|
116
|
+
of the following places: within a NOTICE text file distributed
|
|
117
|
+
as part of the Derivative Works; within the Source form or
|
|
118
|
+
documentation, if provided along with the Derivative Works; or,
|
|
119
|
+
within a display generated by the Derivative Works, if and
|
|
120
|
+
wherever such third-party notices normally appear. The contents
|
|
121
|
+
of the NOTICE file are for informational purposes only and
|
|
122
|
+
do not modify the License. You may add Your own attribution
|
|
123
|
+
notices within Derivative Works that You distribute, alongside
|
|
124
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
125
|
+
that such additional attribution notices cannot be construed
|
|
126
|
+
as modifying the License.
|
|
127
|
+
|
|
128
|
+
You may add Your own copyright statement to Your modifications and
|
|
129
|
+
may provide additional or different license terms and conditions
|
|
130
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
131
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
132
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
133
|
+
the conditions stated in this License.
|
|
134
|
+
|
|
135
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
136
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
137
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
138
|
+
this License, without any additional terms or conditions.
|
|
139
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
140
|
+
the terms of any separate license agreement you may have executed
|
|
141
|
+
with Licensor regarding such Contributions.
|
|
142
|
+
|
|
143
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
144
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
145
|
+
except as required for reasonable and customary use in describing the
|
|
146
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
147
|
+
|
|
148
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
149
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
150
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
151
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
152
|
+
implied, including, without limitation, any warranties or conditions
|
|
153
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
154
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
155
|
+
appropriateness of using or redistributing the Work and assume any
|
|
156
|
+
risks associated with Your exercise of permissions under this License.
|
|
157
|
+
|
|
158
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
159
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
160
|
+
unless required by applicable law (such as deliberate and grossly
|
|
161
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
162
|
+
liable to You for damages, including any direct, indirect, special,
|
|
163
|
+
incidental, or consequential damages of any character arising as a
|
|
164
|
+
result of this License or out of the use or inability to use the
|
|
165
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
166
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
167
|
+
other commercial damages or losses), even if such Contributor
|
|
168
|
+
has been advised of the possibility of such damages.
|
|
169
|
+
|
|
170
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
171
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
172
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
173
|
+
or other liability obligations and/or rights consistent with this
|
|
174
|
+
License. However, in accepting such obligations, You may act only
|
|
175
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
176
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
177
|
+
defend, and hold each Contributor harmless for any liability
|
|
178
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
179
|
+
of your accepting any such warranty or additional liability.
|
|
180
|
+
|
|
181
|
+
END OF TERMS AND CONDITIONS
|
|
182
|
+
|
|
183
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
184
|
+
|
|
185
|
+
To apply the Apache License to your work, attach the following
|
|
186
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
187
|
+
replaced with your own identifying information. (Don't include
|
|
188
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
189
|
+
comment syntax for the file format. We also recommend that a
|
|
190
|
+
file or class name and description of purpose be included on the
|
|
191
|
+
same "printed page" as the copyright notice for easier
|
|
192
|
+
identification within third-party archives.
|
|
193
|
+
|
|
194
|
+
Copyright [yyyy] [name of copyright owner]
|
|
195
|
+
|
|
196
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
197
|
+
you may not use this file except in compliance with the License.
|
|
198
|
+
You may obtain a copy of the License at
|
|
199
|
+
|
|
200
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
201
|
+
|
|
202
|
+
Unless required by applicable law or agreed to in writing, software
|
|
203
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
204
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
205
|
+
See the License for the specific language governing permissions and
|
|
206
|
+
limitations under the License.
|
|
207
|
+
|
|
208
|
+
Project-URL: Homepage, https://github.com/ubc-provenance/PIDSMaker
|
|
209
|
+
Project-URL: Documentation, https://ubc-provenance.github.io/PIDSMaker/
|
|
210
|
+
Requires-Python: <3.12,>=3.9
|
|
211
|
+
Description-Content-Type: text/markdown
|
|
212
|
+
License-File: LICENSE
|
|
213
|
+
Requires-Dist: torch==2.1.2
|
|
214
|
+
Requires-Dist: torch_geometric==2.6.1
|
|
215
|
+
Requires-Dist: numpy==1.26.4
|
|
216
|
+
Requires-Dist: scipy==1.13.1
|
|
217
|
+
Requires-Dist: scikit-learn==1.6.1
|
|
218
|
+
Requires-Dist: pandas==2.3.3
|
|
219
|
+
Requires-Dist: networkx==3.2.1
|
|
220
|
+
Requires-Dist: igraph==0.11.5
|
|
221
|
+
Requires-Dist: gensim==4.4.0
|
|
222
|
+
Requires-Dist: nltk==3.8.1
|
|
223
|
+
Requires-Dist: transformers==4.39.3
|
|
224
|
+
Requires-Dist: duckdb<2,>=1.1
|
|
225
|
+
Requires-Dist: pyarrow==21.0.0
|
|
226
|
+
Requires-Dist: huggingface_hub<1.0,>=0.23
|
|
227
|
+
Requires-Dist: matplotlib>=3.7
|
|
228
|
+
Requires-Dist: wandb>=0.16
|
|
229
|
+
Requires-Dist: yacs==0.1.8
|
|
230
|
+
Requires-Dist: pyyaml
|
|
231
|
+
Requires-Dist: pytz
|
|
232
|
+
Requires-Dist: psutil
|
|
233
|
+
Requires-Dist: tqdm
|
|
234
|
+
Requires-Dist: wget==3.2
|
|
235
|
+
Requires-Dist: flask>=2.2
|
|
236
|
+
Provides-Extra: postgres
|
|
237
|
+
Requires-Dist: psycopg2-binary>=2.9; extra == "postgres"
|
|
238
|
+
Provides-Extra: viz
|
|
239
|
+
Requires-Dist: umap-learn==0.5.6; extra == "viz"
|
|
240
|
+
Provides-Extra: test
|
|
241
|
+
Requires-Dist: pytest==8.3.5; extra == "test"
|
|
242
|
+
Requires-Dist: pytest-cov==6.1.1; extra == "test"
|
|
243
|
+
Requires-Dist: pytest-xdist==3.6.1; extra == "test"
|
|
244
|
+
Dynamic: license-file
|
|
245
|
+
|
|
246
|
+
<p align="center">
|
|
247
|
+
<img width="80%" src="./.github/img/pidsmaker_title.png" alt="PIDSMAKER logo"/>
|
|
248
|
+
</p>
|
|
249
|
+
|
|
250
|
+
<div align="center">
|
|
251
|
+
|
|
252
|
+
[](https://ubc-provenance.github.io/PIDSMaker/)
|
|
253
|
+
[](https://doi.org/10.5281/zenodo.19813646)
|
|
254
|
+
[](LICENSE)
|
|
255
|
+
[](https://github.com/ubc-provenance/PIDSMaker/releases)
|
|
256
|
+
[](https://discord.gg/jecmkTABUg)
|
|
257
|
+
[](https://github.com/ubc-provenance/PIDSMaker/stargazers)
|
|
258
|
+
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
<p align="center">
|
|
262
|
+
<strong>
|
|
263
|
+
<a href="https://www.usenix.org/conference/usenixsecurity25/presentation/bilot">📄 Experiments Paper</a>
|
|
264
|
+
|
|
|
265
|
+
<a href="https://dl.acm.org/doi/10.1145/3770855.3817514">📄 Framework Paper</a>
|
|
266
|
+
|
|
|
267
|
+
<a href="https://tristanbilot.github.io/public_content/slides_pidsmaker.pdf">🎙️ NDSS PRISM'26 Tutorial</a>
|
|
268
|
+
|
|
|
269
|
+
<a href="https://ubc-provenance.github.io/PIDSMaker/">📘 Documentation</a>
|
|
270
|
+
|
|
|
271
|
+
<a href="https://ubc-provenance.github.io/PIDSMaker/getting-started/installation/">⚙️ Installation</a>
|
|
272
|
+
</strong>
|
|
273
|
+
</p>
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
The first framework designed to build and experiment with graph-based intrusion detection systems using deep learning architectures, on two kinds of data: **host provenance** (processes, files and netflows of each host), for provenance-based intrusion detection systems (PIDSs), and **network events** (authentications and flows between hosts), for network intrusion detection systems (NIDSs).
|
|
278
|
+
It provides a single codebase and a single pipeline to run most recent state-of-the-art systems of both families, on the datasets of both, and easily customize them to develop new variants.
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
## Release notes
|
|
282
|
+
|
|
283
|
+
| Version | Date | Highlights |
|
|
284
|
+
|---------|------|------------|
|
|
285
|
+
| Unreleased (`main`) | | [`pip install pidsmaker`](https://ubc-provenance.github.io/PIDSMaker/getting-started/installation/) and the `pidsmaker` command. Datasets as Parquet files downloaded from Hugging Face (`pidsmaker download`) and read with DuckDB, with identical results: no Postgres or Docker needed. [ShadeWatcher and ProGrapher](https://ubc-provenance.github.io/PIDSMaker/guide/systems/) provenance systems. [Network intrusion detection](https://ubc-provenance.github.io/PIDSMaker/guide/systems/): Euler, Argus, Jbeil, LARES, E-GraphSAGE and Anomal-E, LANL and OpTC network flow datasets, systems of both families on network or provenance datasets. [Faster, leaner pipeline](https://ubc-provenance.github.io/PIDSMaker/guide/pipeline/#performance) with identical results (Orthrus on THEIA_E5: ~3.4 h → ~61 min, 370 → 16.6 GB peak RAM; graphs ~5x smaller on disk). Tests in CI on a sample of CLEARSCOPE_E3. [Runs on macOS](https://ubc-provenance.github.io/PIDSMaker/getting-started/installation/#macos) (Apple Silicon, Docker Desktop on CPU) for most datasets, ideally with 32 GB of RAM |
|
|
286
|
+
| [4.0.0](https://github.com/ubc-provenance/PIDSMaker/releases/tag/4.0.0) | Nov 2026 | Unified tokenization (`featurization.tokenization`, renamed tokenizer arguments), configurable graph cleaning (`construction.cleaning`), fixed queue, time-window and node-time-window evaluations, MAGIC kNN fix |
|
|
287
|
+
| [3.0.0](https://github.com/ubc-provenance/PIDSMaker/releases/tag/3.0.0) | Oct 2026 | Pretrained encoders (SPIDER, CyberGFM, language models, self-supervised GNNs) as node featurization for any PIDS, `stable_optim` to reduce instability, upgrade many packages including torch 1.13.1 (CUDA 11.7) => 2.1.2 (CUDA 12.1) |
|
|
288
|
+
| [2.2.0](https://github.com/ubc-provenance/PIDSMaker/releases/tag/2.2.0) | Jul 2026 | Interactive 3D embedding viewer, ThreaTrace ground truth |
|
|
289
|
+
| [2.1.1](https://github.com/ubc-provenance/PIDSMaker/releases/tag/2.1.1) | May 2026 | State of the repo for the KDD'26 paper, improved Velox |
|
|
290
|
+
| [2.1.0](https://github.com/ubc-provenance/PIDSMaker/releases/tag/2.1.0) | Apr 2026 | Carbanak v2 and Atlas v2 datasets, dataset download script, Docker and W&B fixes |
|
|
291
|
+
| [2.0.0](https://github.com/ubc-provenance/PIDSMaker/releases/tag/2.0.0) | Jan 2026 | FIVEDIRECTIONS and TRACE datasets, tuned hyperparameters, simplified pipeline stages (renamed arguments) |
|
|
292
|
+
| [1.0.1](https://github.com/ubc-provenance/PIDSMaker/releases/tag/1.0.1) | Oct 2025 | Deterministic graph construction and word2vec, REAPr labels, Apptainer installation, dataset preprocessing scripts |
|
|
293
|
+
| [1.0.0](https://github.com/ubc-provenance/PIDSMaker/releases/tag/1.0.0) | Jun 2025 | Initial release, with 8 PIDSs and the DARPA TC and OpTC datasets |
|
|
294
|
+
|
|
295
|
+
See the [releases](https://github.com/ubc-provenance/PIDSMaker/releases) for the full notes.
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
## Supported Systems
|
|
299
|
+
|
|
300
|
+
The framework currently integrates the following provenance-based (PIDS) and network (NIDS) intrusion detection systems. They are described with the same components, and most of them [run on both kinds of datasets](https://ubc-provenance.github.io/PIDSMaker/guide/systems/#running-across-families).
|
|
301
|
+
|
|
302
|
+
| System | Family | Venue | Paper |
|
|
303
|
+
|-------------|------------|------------------------------|-------|
|
|
304
|
+
| Velox | Provenance | USENIX Security 2025 | [Link](https://tfjmp.org/publications/2025-usenixsec-2.pdf) |
|
|
305
|
+
| Orthrus | Provenance | USENIX Security 2025 | [Link](https://www.usenix.org/system/files/conference/usenixsecurity25/sec25cycle1-prepub-103-jiang-baoxiang.pdf) |
|
|
306
|
+
| OCR-APT | Provenance | ACM CCS 2025 | [Link](https://arxiv.org/pdf/2510.15188) |
|
|
307
|
+
| R-Caid | Provenance | IEEE S&P 2024 | [Link](https://gangw.web.illinois.edu/rcaid-sp24.pdf) |
|
|
308
|
+
| Flash | Provenance | IEEE S&P 2024 | [Link](https://dartlab.org/assets/pdf/flash.pdf) |
|
|
309
|
+
| Kairos | Provenance | IEEE S&P 2024 | [Link](https://arxiv.org/pdf/2308.05034) |
|
|
310
|
+
| Magic | Provenance | USENIX Security 2024 | [Link](https://www.usenix.org/system/files/usenixsecurity24-jia-zian.pdf) |
|
|
311
|
+
| NodLink | Provenance | NDSS 2024 | [Link](https://arxiv.org/pdf/2311.02331) |
|
|
312
|
+
| ProGrapher | Provenance | USENIX Security 2023 | [Link](https://www.usenix.org/system/files/usenixsecurity23-yang-fan.pdf) |
|
|
313
|
+
| ThreaTrace | Provenance | IEEE TIFS 2022 | [Link](https://arxiv.org/pdf/2111.04333) |
|
|
314
|
+
| ShadeWatcher | Provenance | IEEE S&P 2022 | [Link](https://jun-zeng.github.io/file/shadewatcher_paper.pdf) |
|
|
315
|
+
| LARES | Network | ACSAC 2026 | [Link](https://ora.ox.ac.uk/objects/uuid:07b7d2a5-91f8-4c37-a90c-4ca615b428a7/files/ss7526g13z) |
|
|
316
|
+
| Argus | Network | IEEE S&P 2024 | [Link](https://doi.org/10.1109/SP54263.2024.00012) |
|
|
317
|
+
| Jbeil | Network | IEEE S&P 2024 | [Link](https://doi.org/10.1109/SP54263.2024.00009) |
|
|
318
|
+
| Euler | Network | NDSS 2022 | [Link](https://doi.org/10.14722/ndss.2022.24107) |
|
|
319
|
+
| E-GraphSAGE | Network | IEEE/IFIP NOMS 2022 | [Link](https://arxiv.org/abs/2103.16329) |
|
|
320
|
+
| Anomal-E | Network | Knowledge-Based Systems 2022 | [Link](https://arxiv.org/abs/2207.06819) |
|
|
321
|
+
|
|
322
|
+
## Supported Datasets
|
|
323
|
+
|
|
324
|
+
### Provenance datasets
|
|
325
|
+
|
|
326
|
+
System events of hosts, with the attack nodes as ground truth, available as preprocessed datasets downloaded with `pidsmaker download` (size of their Parquet files below).
|
|
327
|
+
|
|
328
|
+
| Dataset | OS | Attacks | Nodes | Events | Size (GB) |
|
|
329
|
+
|---------|------|--------:|------:|-------:|----------:|
|
|
330
|
+
| CADETS_E3 | FreeBSD | 3 | 2.68M | 36.5M | 1.3 |
|
|
331
|
+
| THEIA_E3 | Linux | 2 | 1.26M | 44.4M | 0.71 |
|
|
332
|
+
| CLEARSCOPE_E3 | Android | 1 | 369K | 18.3M | 0.51 |
|
|
333
|
+
| FIVEDIRECTIONS_E3 | Windows | 2 | 1.38M | 78.9M | 2.3 |
|
|
334
|
+
| TRACE_E3 | Linux | 3 | 44.5M | 284M | 9.4 |
|
|
335
|
+
| CADETS_E5 | FreeBSD | 2 | 15.2M | 1.08B | 32.9 |
|
|
336
|
+
| THEIA_E5 | Linux | 1 | 2.29M | 141M | 3.9 |
|
|
337
|
+
| CLEARSCOPE_E5 | Android | 2 | 501K | 199M | 5.0 |
|
|
338
|
+
| FIVEDIRECTIONS_E5 | Windows | 4 | 18.8M | 1.09B | 30.3 |
|
|
339
|
+
| TRACE_E5 | Linux | 1 | 72.3M | 2.64B | 74.3 |
|
|
340
|
+
| optc_h201 | Windows | 1 | 5.27M | 38.2M | 1.6 |
|
|
341
|
+
| optc_h501 | Windows | 1 | 3.96M | 28.0M | 1.2 |
|
|
342
|
+
| optc_h051 | Windows | 1 | 4.62M | 31.6M | 1.3 |
|
|
343
|
+
| ATLASV2_EDR | Windows | 10 | 664K | 2.70M | 0.16 |
|
|
344
|
+
| CARBANAKV2_EDR | Windows + Linux | 1 | 4.15M | 17.1M | 1.1 |
|
|
345
|
+
|
|
346
|
+
### Network datasets
|
|
347
|
+
|
|
348
|
+
Authentications or flows between hosts, with labelled malicious events, built from the preprocessed files of [LARES](https://github.com/TristanBilot/lares) ([details](https://ubc-provenance.github.io/PIDSMaker/guide/datasets/#network-datasets)), and downloaded the same way.
|
|
349
|
+
|
|
350
|
+
| Dataset | Events | Hosts | Malicious events | Size (GB) |
|
|
351
|
+
|---------|--------|------:|-----------------:|----------:|
|
|
352
|
+
| LANL | 49.3M NTLM authentications | 15,610 | 705 | 0.40 |
|
|
353
|
+
| OPTC_NET | 1.86B network flows | 625 | 5,165 | 11.8 |
|
|
354
|
+
|
|
355
|
+
## Pretrained Encoders
|
|
356
|
+
|
|
357
|
+
Any provenance-based system can replace its node featurization (e.g. `word2vec`) by an encoder pretrained on provenance data.
|
|
358
|
+
|
|
359
|
+
| Encoder | Description |
|
|
360
|
+
|---------|-------------|
|
|
361
|
+
| [SPIDER](https://tfjmp.org/publications/2026-neurips.pdf) (NeurIPS 2026) | transformer entity encoder distilled from a GNN teacher, with [pretrained weights](https://ubc-provenance.github.io/PIDSMaker/features/pretrained_encoders/#pretrained-weights) |
|
|
362
|
+
| [CyberGFM](https://arxiv.org/abs/2601.05988) | BERT pretrained on random walks, then fine-tuned as a detector |
|
|
363
|
+
| [GPT-2](https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf), [Llama 3.2](https://huggingface.co/meta-llama/Llama-3.2-1B), [OPT](https://arxiv.org/abs/2205.01068) | General-purpose language models fine-tuned on entity labels |
|
|
364
|
+
| [BERT](https://arxiv.org/abs/1810.04805), [RoBERTa](https://arxiv.org/abs/1907.11692), [ModernBERT](https://arxiv.org/abs/2412.13663), [LogBERT](https://arxiv.org/abs/2103.04475), [Llama](https://arxiv.org/abs/2302.13971) | Language models trained from scratch on random walks |
|
|
365
|
+
| [GraphMAE](https://arxiv.org/abs/2205.10803), [GAE](https://arxiv.org/abs/1611.07308), [DGI](https://arxiv.org/abs/1809.10341), [DeepWalk](https://arxiv.org/abs/1403.6652), [node2vec](https://arxiv.org/abs/1607.00653) | Self-supervised GNNs and walk embeddings |
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
See the [documentation](https://ubc-provenance.github.io/PIDSMaker/features/pretrained_encoders/) to download the weights, pretrain an encoder and fine-tune it as a detector.
|
|
369
|
+
|
|
370
|
+
## 📄 Documentation
|
|
371
|
+
|
|
372
|
+
A [comprehensive documentation](https://ubc-provenance.github.io/PIDSMaker/) is available, explaining all possible arguments and providing examples on how integrating new systems.
|
|
373
|
+
|
|
374
|
+
### Pipeline
|
|
375
|
+
|
|
376
|
+
The framework integrates a [pipeline](https://ubc-provenance.github.io/PIDSMaker/guide/pipeline/) composed of seven stages, shared by provenance and network systems, each parameterizable via configurable arguments, enabling flexible customization of new systems.
|
|
377
|
+
|
|
378
|
+
```mermaid
|
|
379
|
+
flowchart TB
|
|
380
|
+
db[("Database<br/>provenance or network events")] --> prep
|
|
381
|
+
subgraph prep ["Graph preparation"]
|
|
382
|
+
direction LR
|
|
383
|
+
C["<b>1#160;·#160;Construction</b><br/>time-window graphs"] --> T["<b>2#160;·#160;Transformation</b><br/>optional"] --> F["<b>3#160;·#160;Featurization</b><br/>node & edge features"] --> B["<b>4#160;·#160;Batching</b><br/>features & batches"]
|
|
384
|
+
end
|
|
385
|
+
prep --> det
|
|
386
|
+
subgraph det ["Detection"]
|
|
387
|
+
direction LR
|
|
388
|
+
TR["<b>5#160;·#160;Training</b><br/>self-supervised model"] --> E["<b>6#160;·#160;Evaluation</b><br/>threshold & metrics"] --> TG["<b>7#160;·#160;Triage</b><br/>optional"]
|
|
389
|
+
end
|
|
390
|
+
det --> out(["Alerts, metrics & figures"])
|
|
391
|
+
|
|
392
|
+
classDef stage fill:#e5602a1f,stroke:#e5602a,stroke-width:1.5px;
|
|
393
|
+
classDef optional fill:#e5602a0d,stroke:#e5602a,stroke-width:1.5px,stroke-dasharray:5 4;
|
|
394
|
+
classDef io fill:#5f708022,stroke:#5f7080,stroke-width:1.5px;
|
|
395
|
+
class C,F,B,TR,E stage;
|
|
396
|
+
class T,TG optional;
|
|
397
|
+
class db,out io;
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
## Setup
|
|
402
|
+
|
|
403
|
+
### 💻 Installation
|
|
404
|
+
|
|
405
|
+
PIDSMaker is a Python package, for Python 3.9 to 3.11. Its datasets are Parquet files, downloaded from [Hugging Face](https://huggingface.co/datasets/pidsmaker/datasets) and read in place with DuckDB: no database server or Docker needed.
|
|
406
|
+
|
|
407
|
+
```shell
|
|
408
|
+
conda create -n pids python=3.11 && conda activate pids
|
|
409
|
+
pip install pidsmaker
|
|
410
|
+
pidsmaker download CADETS_E3 # 1.3 GB; `pidsmaker download --list` lists all datasets
|
|
411
|
+
pidsmaker velox CADETS_E3
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
To change the code, install it from source instead:
|
|
415
|
+
|
|
416
|
+
```shell
|
|
417
|
+
git clone https://github.com/ubc-provenance/PIDSMaker.git && cd PIDSMaker
|
|
418
|
+
pip install -e .
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
The [installation guide](https://ubc-provenance.github.io/PIDSMaker/getting-started/installation/) covers the GPU and CPU builds of PyTorch, where datasets and artifacts are stored, [Docker](https://ubc-provenance.github.io/PIDSMaker/getting-started/docker/), HPC clusters and the legacy Postgres backend.
|
|
422
|
+
|
|
423
|
+
PIDSMaker runs on Linux with or without an NVIDIA GPU, and on [macOS](https://ubc-provenance.github.io/PIDSMaker/getting-started/installation/#macos) (Apple Silicon) on CPU, for most datasets: a laptop with 32 GB of RAM is ideal. The largest datasets (`TRACE_E3` and the E5 datasets) need a server.
|
|
424
|
+
|
|
425
|
+
## 🧪 Basic usage of the framework
|
|
426
|
+
|
|
427
|
+
Once you have followed the installation guidelines, you can experiment in multiple ways.
|
|
428
|
+
Replace `SYSTEM` by a provenance system (`velox`, `orthrus`, `nodlink`, `threatrace`, `kairos`, `rcaid`, `flash`, `magic`, `ocrapt`) or a network system (`euler`, `argus`, `jbeil`, `lares`, `egraphsage`, `anomal_e`), and `DATASET` by a provenance (e.g. `CADETS_E3`) or network (`LANL`, `OPTC_NET`) dataset.
|
|
429
|
+
|
|
430
|
+
1. Run in the shell:
|
|
431
|
+
```shell
|
|
432
|
+
pidsmaker SYSTEM DATASET
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
2. Run in the shell, monitored to weights & biases (W&B):
|
|
436
|
+
```shell
|
|
437
|
+
pidsmaker SYSTEM DATASET --wandb
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
3. Run in background, monitored to W&B (recommended for multiple parallel runs and for research), from the `scripts/` folder of the repository:
|
|
441
|
+
```shell
|
|
442
|
+
./run.sh SYSTEM DATASET
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
You can still watch the logs in your shell using `tail -f nohup.out`.
|
|
446
|
+
|
|
447
|
+
To run in the foreground without W&B, with the same settings as `./run.sh`, use `./run_local.sh SYSTEM DATASET`.
|
|
448
|
+
|
|
449
|
+
We generally using using W&B for experiment monitoring and historization (see installation guidelines).
|
|
450
|
+
|
|
451
|
+
**Warning:** Before performing evaluations, you should tune all systems (see docs [here](https://ubc-provenance.github.io/PIDSMaker/features/tuning/)).
|
|
452
|
+
|
|
453
|
+
## Reproducing results
|
|
454
|
+
|
|
455
|
+
PIDSs and NIDSs exhibit significant instability—that is, high sensitivity to training perturbations—due to their self-supervised training nature.
|
|
456
|
+
Running the same configuration with different random seeds or minor hyperparameter changes often yields substantially different results.
|
|
457
|
+
Consequently, reproducing results as the framework evolves presents a real challenge.
|
|
458
|
+
|
|
459
|
+
We recommend [running each system multiple times](https://ubc-provenance.github.io/PIDSMaker/features/instability/) to increase the likelihood of obtaining a run with good metrics. Alternatively, you can perform [hyperparameter tuning](https://ubc-provenance.github.io/PIDSMaker/features/tuning/) for each system.
|
|
460
|
+
|
|
461
|
+
`--training.stable_optim=True` (AdamW, warmup and cosine learning rate schedule, gradient clipping) is designed to [reduce this instability](https://ubc-provenance.github.io/PIDSMaker/features/instability/#reducing-instability).
|
|
462
|
+
|
|
463
|
+
## Customize existing systems
|
|
464
|
+
|
|
465
|
+
The default configuration files in `config/*.yml` represent the architecture of existing PIDSs and NIDSs in YAML format. They contain the original hyperparameters used by each system.
|
|
466
|
+
|
|
467
|
+
The main strength of PIDSMaker is the customization of existing systems for easy experimentation.
|
|
468
|
+
A few examples below.
|
|
469
|
+
|
|
470
|
+
### From CLI
|
|
471
|
+
|
|
472
|
+
<i>Running Kairos with embedding size of 128 instead of 100, and last neighbor sampling set to last 10 neighbors instead of 20.</i>
|
|
473
|
+
|
|
474
|
+
```shell
|
|
475
|
+
pidsmaker kairos CADETS_E3 \
|
|
476
|
+
--training.node_hid_dim=128 \
|
|
477
|
+
--batching.intra_graph_batching.tgn_last_neighbor.tgn_neighbor_size=10
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
<i>Running Orthrus with Doc2vec instead of word2vec, and 3 GraphSAGE layers instead of 2 attention layers.</i>
|
|
481
|
+
|
|
482
|
+
```shell
|
|
483
|
+
pidsmaker orthrus CADETS_E3 \
|
|
484
|
+
--featurization.used_method=doc2vec \
|
|
485
|
+
--featurization.emb_dim=128 \
|
|
486
|
+
--training.encoder.used_methods=tgn,sage \
|
|
487
|
+
--training.encoder.sage.num_layers=3
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
### From a new YAML config file
|
|
491
|
+
|
|
492
|
+
Want to create a new system? Create a new config under `config/your_system.yml`, inherit from existing systems and tune it as you want.
|
|
493
|
+
|
|
494
|
+
<i>Magic with node type prediction instead of its hybrid masked feature reconstruction and structure prediction objective function, and use a 2-layer MLP with ReLU as decoder, and use NodLink's thresholding method.</i>
|
|
495
|
+
|
|
496
|
+
``` yaml
|
|
497
|
+
_include_yml: magic
|
|
498
|
+
|
|
499
|
+
training:
|
|
500
|
+
decoder:
|
|
501
|
+
used_methods: predict_node_type
|
|
502
|
+
predict_node_type:
|
|
503
|
+
node_mlp:
|
|
504
|
+
architecture_str: linear(0.5) | relu
|
|
505
|
+
|
|
506
|
+
evaluation:
|
|
507
|
+
node_evaluation:
|
|
508
|
+
threshold_method: nodlink
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
### Interactive embedding viewer
|
|
512
|
+
|
|
513
|
+
PIDSMaker also ships an interactive 3D web viewer for exploring a run's node
|
|
514
|
+
embeddings — temporal playback, per-node inspection, attack-graph overlays, and
|
|
515
|
+
switching between the featurization and GNN-encoder spaces. Train a run with
|
|
516
|
+
`--save_for_viz` to persist the artifacts it needs, then launch it (see the
|
|
517
|
+
[web viewer README](pidsmaker/vizgen/web/README.md)):
|
|
518
|
+
|
|
519
|
+
```bash
|
|
520
|
+
python -m pidsmaker.vizgen.web.viz_server
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+

|
|
524
|
+
|
|
525
|
+
## Hyperparameter tuning
|
|
526
|
+
|
|
527
|
+
PIDSMaker supports easy hyperparameter tuning for existing or new models.
|
|
528
|
+
Follow the [instructions](https://ubc-provenance.github.io/PIDSMaker/features/tuning/) available in our documentation.
|
|
529
|
+
|
|
530
|
+
You can specify the range of hyperparameters to search in a yaml config.
|
|
531
|
+
|
|
532
|
+
```yaml
|
|
533
|
+
method: grid
|
|
534
|
+
|
|
535
|
+
parameters:
|
|
536
|
+
training.lr:
|
|
537
|
+
values: [0.001, 0.0001]
|
|
538
|
+
training.node_hid_dim:
|
|
539
|
+
values: [32, 64, 128, 256]
|
|
540
|
+
featurization.used_method:
|
|
541
|
+
values: [fasttext, word2vec]
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
Then run the framework in tuning mode.
|
|
545
|
+
|
|
546
|
+
```sh
|
|
547
|
+
./run.sh my_system CADETS_E3 --tuning_mode=hyperparameters
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
Once you find the best hyperparameters, store them in a yaml file and run your tuned model.
|
|
551
|
+
|
|
552
|
+
```sh
|
|
553
|
+
./run.sh my_system CADETS_E3 --tuned
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
## Citation
|
|
557
|
+
|
|
558
|
+
If you use this work, please cite the two following papers:
|
|
559
|
+
```
|
|
560
|
+
@inproceedings{bilot2026pidsmaker,
|
|
561
|
+
title={PIDSMaker: Building and Evaluating Provenance-based Intrusion Detection Systems},
|
|
562
|
+
author={Bilot, Tristan and Jiang, Baoxiang and Pasquier, Thomas},
|
|
563
|
+
booktitle={Proceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD '26)},
|
|
564
|
+
year={2026}
|
|
565
|
+
}
|
|
566
|
+
@inproceedings{bilot2025simpler,
|
|
567
|
+
title={{Sometimes Simpler is Better: A Comprehensive Analysis of State-of-the-Art Provenance-Based Intrusion Detection Systems}},
|
|
568
|
+
author={Bilot, Tristan and Jiang, Baoxiang and Li, Zefeng and El Madhoun, Nour and Al Agha, Khaldoun and Zouaoui, Anis and Pasquier, Thomas},
|
|
569
|
+
booktitle={Security Symposium (USENIX Sec'25)},
|
|
570
|
+
year={2025},
|
|
571
|
+
organization={USENIX}
|
|
572
|
+
}
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
## Contributing
|
|
576
|
+
|
|
577
|
+
Pull requests are welcome! Please follow the [contribution guidelines](https://ubc-provenance.github.io/PIDSMaker/community/contributing/).
|
|
578
|
+
|
|
579
|
+
Questions, ideas or feature requests? Join our [Discord](https://discord.gg/jecmkTABUg).
|
|
580
|
+
|
|
581
|
+
## Support and Funding
|
|
582
|
+
|
|
583
|
+
<p align="center">
|
|
584
|
+
<a href="https://www.amazon.science/research-awards/recipients/thomas-pasquier" target="_blank"><img
|
|
585
|
+
src="https://upload.wikimedia.org/wikipedia/commons/9/93/Amazon_Web_Services_Logo.svg"
|
|
586
|
+
alt="Thomas Pasquier's Amazon Research Award"
|
|
587
|
+
width="20%" align="middle"></a>
|
|
588
|
+
<a href="https://www.cs.ubc.ca/news/2026/01/thomas-amazon-cyberthreats" target="_blank"><img
|
|
589
|
+
src="https://upload.wikimedia.org/wikipedia/en/3/3c/Natural_Sciences_and_Engineering_Research_Council_Logo.svg"
|
|
590
|
+
alt="UBC article on the NSERC Alliance grant with Amazon"
|
|
591
|
+
width="20%" align="middle"></a>
|
|
592
|
+
</p>
|
|
593
|
+
|
|
594
|
+
## License
|
|
595
|
+
|
|
596
|
+
See [licence](LICENSE).
|