I suggest you read
https://ihl-databases.icrc.org/appl...t&documentId=3EA868BE16BCBB86C12563CD0051DB0B
View attachment 526401
You are not allowed to attack military targets while dressed as a civilian.
That includes carrying a concealed gun, which you pull and fire when close to a soldier.
It includes entering a civilian bus containing soldiers on leave, blowing youself up while dressed in civilian clothes.
Backstabbing a soldier after he passes you in the street.
All
highly illegal.
You should normally wear a military uniform, or at least wear a band on the arm, or similar.
When doing the latter, you must be part of a group with a clear military organisation.
An individual which spontaneously takes on an armband and kills a soldier is also a criminal.
If civilians want to form a resistance movement, they have to organize themselves and elect a leader, otherwise -
war crimes.
Basically any time when you use the protection the Geneva Convention gives to civilians as a way to get an advantage in attack, there is most likely a clause making you a war criminal.
As long as they are civilians, any attack on soldiers is a
war crime.
Civilians are NOT allowed to participate in war.
Civilians must first change status to a combatant, after that they are allowed to attack their enemy.