IANAL but your company is not shielding you from legal responsibility of the illegal actions you take, even if you are required by your employee to engage in those activities.
That is a warning to be careful I heard was given to sysadmin. Even if their boss require them to steal personal information or "find" software, they are legally responsible for doing it.
There is a point area somewhere between murder and failure to protect confidential information at which the company takes over responsibility, but that's not a blanket protection as financial obligations.
Depends what you mean by "illegal", there are over two dozen main kinds of illegal. As a massive simplification anything not found in the "criminal law" or "employment law" books your employer covers while you're working (and in some states while you're doing things you're only doing because you work, e.g. drive to work).
So, very generally speaking, anything you can't get arrested for is covered by your employer.
That is a warning to be careful I heard was given to sysadmin. Even if their boss require them to steal personal information or "find" software, they are legally responsible for doing it.
There is a point area somewhere between murder and failure to protect confidential information at which the company takes over responsibility, but that's not a blanket protection as financial obligations.