I've implemented a client-server-model that runs locally on a linux machine. I've used the (old) ONC RPC / Oracle RPC based on an UNIX domain socket.

There are some ways to authenticate the client, such as UNIX authentication.

But now I also want to authenticate the server towards the client. I want to make sure that each client actually talks to my server and that nobody can exchange the server code to return compromised values.

What do you recommend to achieve this?

Thanks in advance.

  • It looks like you are not looking for authentication but for attestation that the server software is exactly the one you've expected: the original software with no modifications, with the original libraries, with no hooks added by others (for example by an antivirus or by malware or with eBPF), on the original OS ... - this is really really hard. It would probably be a better idea to not envision everybody as a potential attacker but to have a more clear concept of the attackers capabilities (like: physical access or not, root or not, local user account or not ...). – Steffen Ullrich Oct 17 at 16:24
  • One possibility would be for an attacker to gain physical access to the disk and manipulate the software, for example the executable file of the RPC server. – Iniesta8 Oct 17 at 17:47
  • This kind of attack scenario would imply that you are willing to run you software locally (since UNIX domain socket) on a system which might be fully in control of the attacker. You could not be able to trust your own software running there in this case, i.e. it would not much matter that you could not trust the server too. – Steffen Ullrich Oct 17 at 17:54
  • Yes, that is right. But...for example, suppose the server accesses a hardware module with stored values, and the client side can retrieve these values ​​by using the RPC service. If certain values ​​are included, the application receives additional functions. I want to make sure that nobody can activate functions by bypassing my RPC mechanism. – Iniesta8 Oct 23 at 13:05
  • There is still no clear concept of what an attacker can do and what not. Based on this one cannot propose something useful. If the attacker is almighty then you cannot trust the machine in any way so you need to have a more useful idea of the attackers capabilities. – Steffen Ullrich Oct 23 at 14:58

Your Answer

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

Browse other questions tagged or ask your own question.