Combatants may of course be attacked unless they are out of action, i.e. hors de combat. Civilians are protected from attack but lose this protection during any period in which they take a direct part in hostilities. The protection of civilians applies to both enemy civilians and one's own civilians.