Download the datasets first:
- E3: https://github.com/darpa-i2o/Transparent-Computing/blob/master/README-E3.md
- Arena / simulated data: https://github.com/PKU-ASAL/Simulated-Data
Expected datasets:
- E3:
cadets,theia,trace - Arena-style:
linux,win10,wins12
Expected layout:
logs/e3/<dataset>/
logs/Nodlink/<dataset>/
Each dataset directory should contain:
- raw log files
<dataset>.txtwith malicious process UUIDs
conda create -n fpreduce python=3.9 -y
conda activate fpreduce
pip install -r requirements.txtrequirements.txt has been updated to match the current code dependencies.
Create the working directories before running:
mkdir -p t resultst/ stores intermediate caches such as:
overfit-<dataset>.pklmagic-overfit-<dataset>.pklidf-overfit-<dataset>.pklsemantic-overfit-<dataset>.pkl
E3:
python e3_overfit_detect.py --dataset cadets
python e3_overfit_detect.py --dataset theia
python e3_overfit_detect.py --dataset traceArena-style:
python nodlink_overfit_detect.py --dataset linux
python nodlink_overfit_detect.py --dataset win10
python nodlink_overfit_detect.py --dataset wins12This step creates t/overfit-<dataset>.pkl.
E3 example:
python e3_parse.py --dataset cadets
python e3_embedding_load.py --dataset cadets --detect_method overfit --embedding_method magic --embedding_dir results/magic_cadets_embedding.npz --only_positive
python e3_embedding_load.py --dataset cadets --detect_method overfit --embedding_method idf --embedding_dir results/magic_cadets_embedding.npz --only_positive
python e3_embedding_load.py --dataset cadets --detect_method overfit --embedding_method semantic --embedding_dir results/magic_cadets_embedding.npz --only_positiveArena-style example:
python nodlink_parse.py --dataset linux
python nodlink_embedding_load.py --dataset linux --detect_method overfit --embedding_method magic --embedding_dir results/magic_linux_embedding.npz --only_positive
python nodlink_embedding_load.py --dataset linux --detect_method overfit --embedding_method idf --embedding_dir results/magic_linux_embedding.npz --only_positive
python nodlink_embedding_load.py --dataset linux --detect_method overfit --embedding_method semantic --embedding_dir results/magic_linux_embedding.npz --only_positivepython fp_detect.py --dataset cadets --detect_method overfit --embedding_method magic
python fp_detect.py --dataset cadets --detect_method overfit --embedding_method idf
python fp_detect.py --dataset cadets --detect_method overfit --embedding_method semantic
python get_result.py --dataset cadets --detect_method overfitApply the same pattern to:
cadetstheiatracelinuxwin10wins12
Cached results for validating the overfit pipeline can be downloaded from:
The archive also includes precomputed embeddings.
The archive includes files such as:
magic_<dataset>_embedding.npzcommunity_result-<embedding>-overfit-<dataset>.pkloverfit_<dataset>_summary.txt
If you reuse cached files, make sure the dataset name matches the file name.