The soldiers were killed in an attack by militants on a Pakistani military camp in north Waziristan, which also left 13 injured.