Yea the occupation of Israel as a whole is a war crime. But a country commiting a war crime does not justify violence against non-combatants.
The taking of hostages could be said to be a taking or prisoners, and I think it is fair that if a foreign non-combatant is on your land then you do have a right to arrest them.
The issue with the attack is the abuse and violence executed against them. While you may be justified in arresting a non-citizen on your land you do not have the right to massacre 100s of them. A country commiting a war crime does NOT mean you can mass murder non violent people regardless of if what they are doing is legal or not.