Were done so in a defensive war. The UN never called for complete withdrawal.it called for withdrawal to borders that ensure Israel's security. your generalities about illegality are simply untrue, but they do sound catchy don't they.
Trump: Middle East would be more stable if Saddam, Gaddafi still in power (Reuters)
from the article: Palestinians plan UN resolution calling for settlement evacuation