step 1) be a technomancer with reasonable response and high charisma.
step 2) machine sprites. lots and lots of machine sprites.
If, however, you mean something that non-technomancers can do, well... in no particular order:
- stealth programs. have these running on your drones. If they can't find your drone's node, they can't hack it.
- encrypt. it won't hold long, but it's something at least.
- data bombs/IC.
- high firewall and analyse
- have your drones connected by wires instead of wireless (obviously not always an option, but i think you get the idea... for example, having a van with a bunch of smart firing platforms built into it, you could most certainly hardwire the platforms to the van, and be inside the van controlling it via wired control.
- requiring biometric scans, passkey, etc before they allow control. (not really clear on how this would work, to be honest)
other than that, you're into house rule territory. just as some thoughts:
- you could create your own computer language, network protocol, etc from scratch. reallistically, this would make your drones a lot harder to steal. also reallistically, this would take a really, really, really, really long time.
- if your drones relied on laser for communication, you could presumably make it a lot harder to hack your drones. i, for one, am not going to try to figure out how this would work though lol.
- you could just give your drones orders, remove wireless access from them, and turn them loose. naturally, this means you won't know what happens with them until they rendezvous. hopefully, they won't bring half a dozen citymasters behind them