If a third party can break into the satellite and communications firmware of two different spacefaring nations (you have to hijack an orbiter too) then there are bigger problems to worry about. The number of countries (counting the ESA as one big country) with objects in orbit around Mars can be counted on one hand.
Well, I asked people who are world class competitive security competitors and had succes in HACK A SAT how's the satelites and stuff security and they said that it aint good
On the other hand, I’m not sure satellites launched years ago have auto-upgrades enabled and up-to-date security policies (and certificates!), especially upgrade policies for the embedded chipsets. That must be an interesting problem to solve.