The International Committee for the Red Cross has done a thorough analysis on the issue of human shields, and what the obligations are of the opposing army:
page 899.
The possibility to attack a military objective protected by human shields,or the use of a classic proportionality test?One question that may arise at the outset is whether the fact that the adverse partyhas violated its obligations under international humanitarian law by using humanshields releases the other party from some of its own obligations. However, thiscannot be so in view of the unanimously accepted non-application of the tu quoqueprinciple (principle of reciprocity) when it comes to international humanitarianlaw.71 Article 51(8) of Protocol I states that ‘[a]ny violation of these prohibitionsshall not release the Parties to the conflict from their legal obligations with respectto the civilian population and civilians, including the obligation to take the precautionary measures provided for in Article 57.’ The obligation incumbent on abelligerent state to spare the civilian population and take the measures prescribedto that effect does not therefore depend on the adversary’s compliance with the banon using human shields. However, although the attacking party is under a constantobligation to spare civilians, including human shields, that does not mean that itmust in all cases abstain from attacking a military objective protected by humanshields. Just as the presence of military objectives in an area occupied by the civilianpopulation does not rob those people of their civilian status,72 an ‘objectif militairedemeure un objectif militaire meˆme si des civils se trouvent a` l’inte´rieur’73 or in itsimmediate vicinity. Military objectives protected by human shields do not cease tobe legitimate targets for attack simply because of the presence of those shields.It follows that when a commander asks himself whether or not he canattack such a military objective, he must reason as in the case of any other legitimate military objective an attack on which runs the risk of causing collateraldamage to civilians who, in this case, are the human shields protecting the target.An attack will be possible if and only if the potential damage to civilians is not‘excessive in relation to the concrete and direct military advantage anticipated’.74This means that the expected civilian losses must be weighed against the size of theconcrete military advantage to be anticipated if the military objective is neutralized.75 The attacker is also obliged to take precautions as required by Article 57of Protocol I.76 The presence of human shields will not therefore systematicallyprevent an attack – even if conducting an attack despite their presence may have aconsiderable media and political impact. This is something that should be madewidely known, particularly to potential voluntary human shields.The case of involuntary human shieldsIf the concrete and direct military advantage anticipated proves sufficiently significant in relation to the potential damage to the human shields, the attack maytake place. The appraisal must be in concreto and must always take into account themilitary advantage, which can shift, for example over time (a bridge of fundamental importance one day may have little strategic significance the next daydepending on where the front line lies at the time), and the extent of collateraldamage that will be caused to civilians. The extent of that damage may depend,among other things, on the number of civilians likely to be affected. A particular military advantage may thus be regarded as sufficiently important to justify anattack on a military objective protected by five people being used as human shields.However, if the object is protected by five hundred human shields, the outcomeof the deliberation may change. In practice then, there is no doubt that in certaincases, the attacked party can effectively protect the military objective by placingsufficient human shields on or around it! Some authors understandably rejectthis conclusion, which they consider shocking, and recommend human shieldsnot be taken into account by a commander applying the proportionality principle while preparing for or deciding on an attack.
So yes, according to the ICRC, targets protected by human shields CAN and MAY be attached by the opposing army, if a thorough analysis of the harm vs benefit possibility is worth it. Say Hitler was protected by 500 human shields, obviously the harm of such a strike, if guaranteed to take out Hitler and end the war was deemed certain, would be a necessary and worthwhile sacrifice. However if a low-level Hamas private is protected by 25 children, no sane person would or could argue that such a strike and intended military advantage outweighs the likely loss of life of 20 innocent children.
Although the IDFascists might.