For decades, Iran has protected itself with a network of well-funded, heavily armed and deeply radicalized militant groups.