One way around a Bad Boss is to attract the attention of those higher up the food--pardon me--company, chain. A great way to do that is to turn out much better performance or productivity than expected. As in exceptional, off the wall, totally unexpected better performance or productivity.
Turning to your co-workers, whether or not you’re on a team, can raise both you and your team above the level of only your Bad Boss’s attention.
Scott Edinger talks about how; “On one very effective team I observed, for instance, software engineers were particularly deft at dividing up tasks in a way that would help the group reach the company's goals the fastest. They focused on who could most effectively get each task done even when that meant some people would have to give more effort and time than others.”
Your co-workers are in the same Bad Boss bind you are. Working together, you just might be able to turn the tables on said Bad Boss!