The attack was the latest incident in the Sinai insurgency, which pits ISIS against Egypt and its allies.