Can starships be hacked like phones? [ . . . ]
Nobody would run consumer applications software directly on the avionics systems. In order to get flight certification they would have to use specific builds that were tested and certified - even the O/S and development toolchain normally have to be certified.
1 Users installing their own software on the avionics systems would be in breach of regulations, manufacturer support T&C's and anything that might remotely be considered prudent best practice.
Not that this would necessarily prevent folks from doing it. However, the vectors for doing this would typically be subject to physical security (i.e. you typically have to open the lid and plug something in to download the software) - so it's not going to be terribly amenable to remote exploits.
Having said that, in many applications, the systems are networked to a greater or lesser extent. If the flight systems were accessible from a shared network - which would be necessary for (for example) any sort of networked battlefield system - then they could present an exploitable attack surface.
Exploiting this could be done by skilled parties with access to the right kit but most J. Random hackers wouldn't be able to afford a Model/7 computer to try fuzzing on. In practice, this means that this capability would be limited to state or quasi-state actors with the resources to procure physical examples of the hardware or software.
An example of this type of hack by a state actor was a zero-day exploit on the Russian S-300 missile systems that the Israelis used to disable Syrian SAM batteries for an air raid they did on an (IIRC) Al-Qaeda training camp. This allowed a denial-of-service attack on the radar systems, disabling the batteries and allowing Israeli strike aircraft to attack targets covered by Syrian air defences. A somewhat tinfoil-hattish writeup can be seen at
http://www.1913intel.com/2013/05/21/neutralizing-the-russian-s-300-air-defense-system/.[/QUOTE]
1Often to the horror of the developers who have to actually use the tooling. I have an acquaintance who had the pleasure of being given a job to modify radar systems software written in CORAL-66, a dialect of JOVIAL - not all that long ago. JOVIAL is a dialect of ALGOL that dates back to somewhere about 1960, and its influence in avionics circles can be felt to this day - Ada is a direct descendant of JOVIAL and there is still plenty of kit flying today that runs software written in JOVIAL.