HungarianMegoldjuk okosbaTo do something in a way that is illegal or unethical, but cheaper or more profitable.

It literally means to solve a problem in a smart way.