StratosphereLinuxIPS icon indicating copy to clipboard operation
StratosphereLinuxIPS copied to clipboard

File modules/flowmldetection/scaler.bin and file modules/flowmldetection/model.bin change even in test mode

Open eldraco opened this issue 2 years ago • 3 comments

Describe the bug The files modules/flowmldetection/scaler.bin and file modules/flowmldetection/model.bin change after each use of Slips even in test mode (and not training)

To Reproduce Steps to reproduce the behavior:

  1. Go to branch develop

python3 ./slips.py -f dataset/test13-malicious.pcap

Expected behavior The files should not change in test mode

Branch Slips version: 1.0.1 File: dataset/test3-mixed.binetflow Branch: develop Commit: 7571f6801b323cc96cb3ebda06e6653adb49401a Slips start date: 2023/02/21 09:51:14.129269

Environment (please complete the following information):

  • OS: Linux
  • Version 5.18.0-2-amd64
  • Python version Python 3.10.5
  • Are you running slips in docker or locally? locally

eldraco avatar Feb 21 '23 09:02 eldraco

@eldraco Hy, i am running this in docker. i need to run this locally for checking the behaviour. i think this is not a problem of BIN file can you please explain this in little brief

Aman123lug avatar Mar 11 '23 10:03 Aman123lug

hello @eldraco , How did you know the .bin files are changing? when I run slips in test mode the files are being read and written back the same data, ie they are being modified but the data is the same. and there is no file named test13-malicious.pcap , I think it has been removed in current version.

haleelsada avatar Apr 16 '23 07:04 haleelsada

Exactly the files are re-written in test mode, and their hash changes and git detects that. To fix this we need to avoid writing back when Slips runs in test mode. Slips should only write those files on training mode

eldraco avatar Apr 17 '23 15:04 eldraco