tklab-tud / ID2T

Official ID2T repository. ID2T creates labeled IT network datasets that contain user defined synthetic attacks.
MIT License
58 stars 23 forks source link

Refactoring of init_params() and attack parameters in general #93

Closed pepper-jk closed 5 years ago

pepper-jk commented 5 years ago

The method init_params() is intended to initialize the default values for attack parameters in case the user does not specify them.

However the current implementation executes it before the user specified attack parameters are parsed. This leads to unnecessary overhead including operations like database queries, randomization and calculations. This needs to be avoided.

old solution:

In the current implementation of ID2T init_params() is also implemented in every attack separately. This was done for multiple reasons. Each attack relies on different parameters and depending on the attack a different default values might be useful.

However this introduced redundancy into the project. And attacks like MembersMgmtCommAttack are not using even the most basic attack parameters like ip.src and ip.dst instead they introduce new general attack parameters providing the same function.

Additional todo:

pepper-jk commented 5 years ago

The parameters were also refactored to provide:

The validation of parameters was moved into the specific param type classes, instead of residing in BaseAttack.

More documentation in the Wiki once I'm back.