From worms to wars, modeling and controlling networked dynamical systems