Militant groups have launched a rising number of attacks on Pakistani security forces and intelligence personnel in recent months .