I wanted to point out that what you described so far sounds like an implementation design issue and that as far as I can see the TUF security model does
not break if target files or metadata files get compromised on the "server". However, this only applies from
the moment metadata gets signed and requires your repository code to actually check the signatures on metadata. From
your description ("[attacker] replaces the hash of the
orbit binary in the
targets.json file") it sounds like you have unsigned metadata stored on disk or you are resigning without checking the existing signature. Creating unsigned metadata
in one process and only signing it in a separate, later process obviously creates a window of opportunity that signatures cannot protect from.
In my opinion one of the insightful things about the TUF design is the separation of targets keys and the "online" keys: this gives an implementer the possibility to solve two issues that would otherwise conflict:
- targets metadata can be signed with targets keys as soon as new target files come out of the build pipeline. Targets keys are in control of the target builders
- the repository / distribution machinery can do their own decision on whether to include the new targets metadata in a snapshot and when to do it. The "online" snapshot/timestamp keys are available to a snapshot process (separate from the target build process)
and are controlled by repository maintainers
So from a clients perspective the results of a server side compromise should be roughly:
- target files compromised on server: denial of service at worst
- metadata compromised on server: denial
of service at worst
- online
keys compromised: denial of service, freeze attacks
- targets
keys compromised: arbitrary files served (assuming snapshot process does not prevent it)
I'm not saying implementing a server in a way that is resilient against compromised local metadata is trivial: there's absolutely a lot of details to handle that the spec does not
spell out (and can't spell out because many details will be implementation specific) but as far as I can tell this is completely possible.
Hope that helps,
Jussi