So I sat on the porch, sipping out of my large glass of cherry Kool-Aid, making a list on my pad of paper. Here's what I came up with for a first pass.
The program's main job is to look at all packets for a 'delay' packet header. If one is found, the header information needs to be copied and sent to one of my anonymous mail accounts. The program should be able to survive a restart of the system, so it should be able to reinfect the router as needed.
The program also needs to keep a small local table of viral sources and targets and use those as the primary targets for trying to infect those systems. Rather than a random target list, the target list needs to be more tightly focused on where the delay packets are coming from, and where they are going.
The program also needed to be a bit stealthy, trying to avoid detection during the infection phase, and during operation. And it needed to limit the number of copies or infections that it tries to make, since I didn't want it to flood the Net like the "Code Red" worms that had infected the Net in the past.
Based upon these requirements, I needed to come up with a subtle but effective infection routine. So I came up with this starting sequence of events:
add to the router core code a jump table so that a power reset or reboot of the router will keep the program alive.
Check to see if the router is already infected; if so, skip the infection routine.
Install the packet inspection and copy routines into the router code
Look at the existing router table and compress and encode that router table for later use
Send a quick packet of data to the source of the program (where my program came from) to verify the infection.
Send itself to other routers in the router table to propagate itself to another router
Put in a router reboot timer to restart the router during the middle of the night
When the router reboots, all packets are fully monitored by my packet "watcher".
Now that I had a good start to the structure of the program, it was time to do some serious coding. I'd also need to set up the machines for testing. But it would probably be a good time to lay in some supplies before I got started.