Idiom
do the dirty work
to do the unpleasant or difficult things.Well, usually I do the dirty work and someone else gets the credit for getting it done.
Usage notes: often used in the form do someone's dirty work - to do the unpleasant or difficult things that are someone else's responsibility:
Naturally, he has assistants who do his dirty work.