1) the attacks were not carried out by a legitimate government defending itself
2) no state of war existed, and certainly no "total" war
3) the attacks were selective against a building which had no importance to military effort. Unlike the bombing of Germany of Japan
So no, not legitimate.
A government isn't a requirement for a war.
War is an organized, armed, and often a prolonged conflict that is carried on between states, nations, or other parties
War on terror, anyone?
A state of war isn't a requirement for a target to be legitimate, although if you do a bit of research you'll discover that Osama bin Laden had declared war on the west long before the 9/11 attacks.
So attacking a building full of civilians that has no significance to a war effort is different to attacking lots of buildings full of civilians that have no significance to a war effort? Thats a lovely set of rose tinted glasses you have there. I suggest you look to something other than Hollywood for your history education.