Search code examples
javawindowssecuritymalwareintegrity

ensure I'm working with my software and not an imposter. Windows, Java, Hardware


Can you think of a mechanism to guarantee my software (GUI application) is the software that I'm currently running and not an imposter (as a black box).

It sounds as a crazy requirement, but this software determines life (it is a medical device) and if someone insists on doing bad, he can just create a similar software and make sure somehow to replace the genuine one with his version.

Any hardware / software option is valid for me. I'm targeting Windows and the Java language. If needs to complement with another piece of software/hardware to make it work together, this is of course doable.

BR, Oren


Solution

  • Your best bet is to follow a standard procedure for this. In a nutshell, here's what you can do.

    On your machine:

    • Place your code into a jar file
    • Digitally sign jar file with a private key
    • Distribute your public key to the code runner machine

    On code runner machine

    • Set up a security policy to run your application with a valid digital signature only
    • Import public key

    For detail, please follow this tutorial.