JefJacobs00 / IoT_Framework_Demo

1 stars 1 forks source link

Prevent same scan execution #14

Closed JefJacobs00 closed 1 year ago

JefJacobs00 commented 1 year ago

Prevent same scan execution

During a run or pentesting session an exact same command should not be executed two times. Right now the way it works is it looks at a profile and checks if it has already been executed. This can limit the flexibility of the framework. When a profile can be executed multiple times in a useful way on a target. When multiple targets are being tested the same profile can be executed multiple times but on a different target.

Possible solution

When a profile with the same parameters has already been executed in the session it should be ignored. The executed/1 predicate could be updated to executed/2 where the profile and parameters are checked instead of just the profile. Prolog could set the executed predicate when it returns a tool to the user.

A small time based filter could work to prevent that a session has to restart scans that would give the same result anyway. Only time based could result into issues in a long session.

What if during a session information changes??

JefJacobs00 commented 1 year ago

executed now contains a command. Prolog checks if the command has executed in the current session if this is the case prolog does not execute the command.