1
$\begingroup$

I suppose an executable could contain a key which signs its output, but that key could be extracted and used to sign other data. Is it possible to verify that the output of an executable is the direct result of its own unaltered (assembly) control flow?

$\endgroup$
1
  • 1
    $\begingroup$ I think that in generality, this would be equivalent to solving the Halting problem (which is not possible on a Turing machine equivalent). $\endgroup$
    – Daniel S
    Jan 6 at 15:12
1
$\begingroup$

that key could be extracted and used to sign other data

Correct. An attacker can extract the key and sign anything.

Is it possible to verify that the output of an executable is the direct result of its own unaltered (assembly) control flow?

Generally speaking, no.

It can be verified only in some specific cases. One approach can be to use signed executable (signed by its provider) which is running in a controlled environment. By verifying the signature you will be sure the code is not modified. By using controlled environment you will be sure that neither input nor output was modified, nor the code was modified when executable was loaded by operating system, nor the memory used by executable was modified by other process.

$\endgroup$
0
$\begingroup$

Generally speaking, in an uncontrolled environment (e.g. the OS can be modified), this is not possible. Whatever you come up with (verifying the machine code, checking for digital signatures, etc.) could just NOT be done by a copy of your software, and signing the output would still be possible.

Verifying that the actual code that is loaded and running is from a specific author can only be done by the OS (or system in general) without the possibility that it is forged by a third party.

And trusting this verification would only that the system itself can not be tampered with.

So no, i don't think that there is a practical way of doing this. The closest you come to such a closed system is maybe iOS/iPad OS. And at least I am not aware that there is such a system function available there. I even have searched for it before, because I would have found it pretty handy if, for example, iOS could sign a web request and include the app's manufacturer in the signature. To my knowledge, this is not possible, though. (Especially because even iPhones can be jailbreaked)

In an embedded (closed) system, on the other hand, where you can control every interface that can be used to load code, you could implement this yourself. This is as secure add the anti-tampering is, though. And add we know, this is never perfect.

On your average laptop or PC, however, I don't think it's possible.

New contributor
Daniel Albuschat is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.