If you sign a contract, then it is breach of contract, which would be a kind of illegal.
I don't see the ethical quandaries though. So long as one is doing the work promised, and the company is satisfied with their output. It's not any more unethical than working on any other side project after hours.