Post breach actions are loaded dynamically, by getting all PBA files in the infection_monkey.post_breach.actions folder and extracting relevant classes.
Post breach action loader can be generalized to load exploiters, fingerprint scanners and other modules.
Loader should be merged:
infection_monkey.post_breach.actions.__init__.py and infection_monkey.post_breach.post_breach_handler should be merged into one loader class.
Loader should be generalized:
Core method should take in:
Class instance (only children of this class will be returned)
File directory (where to look for files that needs to be imported)
Config array reference
Core method should return:
Filtered list of classes in a specified directory.
Loader's class needs to contain a default checker method that would compare class's name to the relevant config value to determine if class should be returned or not.
Loader should be applied to:
a. PBA
b. Fingerprint scanners
c. Exploiters
Pyinstaller hook should be updated to include all module directories.
Post breach actions are loaded dynamically, by getting all PBA files in the
infection_monkey.post_breach.actions
folder and extracting relevant classes. Post breach action loader can be generalized to load exploiters, fingerprint scanners and other modules.Loader should be merged:
infection_monkey.post_breach.actions.__init__.py
andinfection_monkey.post_breach.post_breach_handler
should be merged into one loader class.Loader should be generalized:
Core method should take in:
Core method should return:
Loader's class needs to contain a default checker method that would compare class's name to the relevant config value to determine if class should be returned or not.
Loader should be applied to:
a. PBA b. Fingerprint scanners c. Exploiters
Pyinstaller hook should be updated to include all module directories.