Yes, you need a work permit visa before leaving your home country if you wish to work in Germany, since there are very strict work limits. And it will be considered illegal in case you do not have a work permit.