Bear Head by Adrian Tchaikovsky

In a near-future of bioengineered soldiers and neural implants, a struggling construction worker on Mars acquires an illegal brain upgrade that contains a cunning, nonhuman mind, dragging him into a conspiracy that spans two worlds. As a ruthless Earth politician exploits mind-hacking tech to build an authoritarian empire, corporate power, colonial unrest, and questions of personhood collide. The fight to stop a planetary takeover becomes a tense exploration of autonomy, identity, and the rights of artificial and uplifted beings.