Stuxnet was NOT ethical. It was used as an attack and had destructive intentions. There is no way that the way it was carried out could have been considered ethical unless the intentions were different. Stuxnet was designed to find and destroy specific computers controlling very important and dangerous hardware. It was completely unmanned and could have easily caused more damaged that it may have been supposed to do.
The only way Stuxnet could have been used in an ethical situation was if a country designed this worm to test it's own security. It could have been done in a controlled environment where the government could observe ways of protecting themselves against a potential cyber attack.