Re: False flag operations
i agree with the principle/outline that you describe here, but implementing the attack in software is too vulnerable to detection.
The issue lies in the non-volatile nature of the storage... That must be readable... and even though modern routers all include the ability to update their firmware, the image that runs is stored in a form that has to be *read* in to be able to execute. If you can *read* it while the router is running, then you can dismantle the router, pull the non-volatile storage, and it's pretty simply to wire it up to a PC and simply dump the code.
We have to make a distinction here between a vendor-supplied exploit and a hacker-installed one. Phineas Phisher - the anonymous hacker that broke in to the "Hacking Team" - the Italian security company - achieved his attack by compromising and rewriting the firmware in an IoT device they had connected to their "office" network, which allowed him to detect and penetrate their "secure" network.
But anyone examining that IoT device would immediately detect the changes in the device firmware introduced by Phisher and realise the device was compromised.
By contrast, if you're a device manufacturer and you want to compromise some hardware you're making... what you do is include a chip in your device that looks like a well-known integrated circuit - and which provides all the functionality of that commercial IC... but, when given a specific set of inputs ... unlocks additional, un-documented capabilities.
For example, you could have a network adapter IC that is responsible for collecting the received electrical signals from the pins of an Ethernet cable and converting them and assembling them in to a data packet. A bunch of companies have chips that do that. But you could develop a chip that did *more* than that by giving it the ability to recognise a very specific bit-pattern in a received network data packet, you could unlock additional functionality.
Very high speed network peripherals employ "DMA" - Direct Memory Access - so if you wanted to, you could have a network interface card that is designed to push malicious code directly in to memory when remotely instructed to do so... Much harder to detect than software as it would require you to dismantle or reverse-engineer the hardware.