All must work together to counter terrorism, prevent spread of weapons of mass destruction, Secretary-General says