Signature for Identity Verificaton on "offline" P2P network
If an attacker has full access to the peer then you cannot expect security to be kept. However, you assume that if an attacker has access to a device that it is full under his control.

This assumption is not true in practice if you embed a secure element. A secure element is a device such as a smart card chip that can keep one of more secret values and perform actions on it, for instance signing so it can authenticate itself to the network.

So a secure element can be used to keep your problem from occurring. It is however impossible for a secure element to make a system moderately secure on its own. However, describing such a system is beyond what you can expect from a Q/A site.