The ICRC is concerned about the increasing number of people joining patriotic cyber-gangs, particularly since the Ukraine invasion.
The eight rules issued by ICRC include prohibitions on attacking hospitals, using malware that spreads uncontrollably, and making threats that create fear among civilians.
The ICRC is sending these rules to hacking groups involved in the Ukraine war and warning hackers that their actions can make them legitimate military targets.
The trend of patriotic hacking has been on the rise globally, accelerated by the Russia-Ukraine conflict.
Some experts describe civilian hacking as "cyber-vigilantism" and point out that it can have significant disruptive effects on various sectors.
The ICRC emphasizes compliance with these rules based on international humanitarian law, even if the enemy does not follow them.
The ICRC is urging governments to restrain hacking and enforce existing laws.
In the Ukraine conflict, civilian groups like the IT Army of Ukraine have been encouraged by the government to attack Russian targets, blurring the lines between civilian and military hacking.