The attack represented an audacious blow to intelligence operatives at the vanguard of U.S. counterterrorism operations in both Afghanistan and Pakistan , killing officials whose job involves plotting strikes against the Taliban , al-Qaeda and other extremist groups that are active on the frontier between the two nations .