Set up to defend the United States, the Homeland Security Department is going beyond American borders to fight foreign threats from abroad.