RosenNoir started an interesting discussion about the social relevance of gangs, and I'm starting to think that whatever strategies would work in dealing with gangs are probably the same strategies that would work with terrorist groups as well.
One trick that might undo a gang's power would be to put them in a social position where they can be held responsible as a whole gang for their decisions, instead of just as a group of individuals. Put the gang in charge of something. Make them register themselves like a business registers itself, and pay taxes. Then every gang member has to come forward and identify themself, or they can't participate.
Now applying this to terrorist groups: Maybe we should conduct diplomacy with them after all.
Make them sign treaties, and declare who their leaders are. Give their members privileges, but privileges that can only be claimed by coming forward and publicly identifying themselves. Get the organization to become dependent on all of this legitimacy, and then place restrictions on them. Regulate them. Force them to have to hunt down their own people whenever a silly attack occurs.
Maybe we could use the larger organizations as a means to kill off the smaller ones?
In a lot of other threads, I've seen people discussing how it seems like a lot of the European nobility might have started off as common brigands/thugs in charge of an army, who then set up a government, declared themselves King, Lord, Baron...etc.... maybe that's what some people in the 3rd world are doing, and maybe legitimizing the very successful ones might actually lead to progress?