In the latest violence , Taliban militants bombed a convoy of Pakistani troops and opened fire on the survivors , sparking a battle that killed five security officers and seven attackers , police said .