All mosques need to be registered, their madrassa curriculi need to be reviewed, their leaders need to go through full security checks, and there need to be undercover spies in every mosque.
Also, every mosque, at this point, should be fully searched by the military for weapons.
That last point is gross paranoia.
However, in most middle east countries, the sermonds (khutbahs) at mosques have to be approved by the government's Ministry of Religion. Pakistan should adopt such a policy.