drakvuf-sandbox
drakvuf-sandbox copied to clipboard
injector: Repeat injection in case of failure and add proper exception handling
Is your feature request related to a problem? Please describe.
injector
isn't reliable as it interferes with processes already running in the system. We might be out of luck and get a trap being in the wrong place at the wrong time. These situations are usually one-time, so we should just repeat an injection few times until we get satisfying result.
It's especially important in draksetup postinstall
step that makes dozen of injector -m readfile
and single failure makes profile incomplete. In worst case it may fail at the beginning: https://github.com/CERT-Polska/drakvuf-sandbox/issues/808. In that case, it's difficult to recover for newbie user from that situation as vm-0 is destroyed and we need to manually restore it and make another run.