Certainly the US , Israel, and Saudi  Arabia, Qatar and other foreign mercenaries and their benefactors   are acting illegally but not the Syrian government or Russia who is there at the invitation of the government. So no not all sides are acting illegally, self defense is legitimate.