[I]nternational law is unambiguous in its endorsement of “armed struggle” for peoples who seek self-determination under “colonial and foreign domination.”United Nations resolution 37/43, dated 3 December 1982, “reaffirms the legitimacy of the struggle of peoples for independence, territorial integrity, national unity and liberation from colonial and foreign domination and foreign occupation by all available means, including armed struggle.”
4. Indiscriminate attacks are prohibited. Indiscriminate attacks are:(a) those which are not directed at a specific military objective;(b) those which employ a method or means of combat which cannot be directed at a specific military objective; or(c) those which employ a method or means of combat the effects of which cannot be limited as required by this Protocol; and consequently, in each such case, are of a nature to strike military objectives and civilians or civilian objects without distinction.5. Among others, the following types of attacks are to be considered as indiscriminate:(a) an attack by bombardment by any methods or means which treats as a single military objective a number of clearly separated and distinct military objectives located in a city, town, village or other area containing a similar concentration of civilians or civilian objects; and(b) an attack which may be expected to cause incidental loss of civilian life, injury to civilians, damage to civilian objects, or a combination thereof, which would be excessive in relation to the concrete and direct military advantage anticipated.
1. Condemns in the strongest terms all acts of terrorism irrespective of their motivation, whenever and by whomsoever committed, as one of the most serious threats to peace and security;...3. Recalls that criminal acts, including against civilians, committed with the intent to cause death or serious bodily injury, or taking of hostages, with the purpose to provoke a state of terror in the general public or in a group of persons or particular persons, intimidate a population or compel a government or an international organization to do or to abstain from doing any act, and all other acts which constitute offences within the scope of and as defined in the international conventions and protocols relating to terrorism, are under no circumstances justifiable by considerations of a political, philosophical, ideological, racial, ethnic, religious or other similar nature, and calls upon all States to prevent such acts and, if not prevented, to ensure that such acts are punished by penalties consistent with their grave nature.
This resolution was passed under Chapter 7, meaning that it has the force of international law.
In 2004, the UN Secretary General described the difficulties in defining terrorism and briefly addressed the arguments of the terror apologists, demolishing them in a single paragraph:
The search for an agreed definition [of terrorism] usually stumbles on two issues. The first is the argument that any definition should include States’ use of armed forces against civilians. We believe that the legal and normative framework against State violations is far stronger than in the case of non-State actors and we do not find this objection to be compelling. The second objection is that peoples under foreign occupation have a right to resistance and a definition of terrorism should not override this right. The right to resistance is contested by some. But it is not the central point: the central point is that there is nothing in the fact of occupation that justifies the targeting and killing of civilians.
Taken as a whole, international law is crystal clear: Hamas and the other Palestinian factions are terror groups and their attacks on civilians are blatantly illegal under international law. They are explicit war crimes.
(See also Tomer Ilan's article here.)