The expression is :
WHERE THERE'S MUCK, THERE'S BRASS
muck: any dirt, rubbish, waste matter, manure
brass: colloquial for 'money' (referring to when coins where made of brass)
It means: where there are dirty jobs to be done there is money to be made.
If a particular job or task is very unpleasant, few people are prepared to do it. So, you have to pay well to find someone who is prepared to do it.
'brass' has been used as the name of copper and bronze coins, and later of all forms of money, in the UK since at least the 16th century.
The expression, 'where there's muck there's money' was the form of the expression in the 19th century, and 'Where there's muck there's brass' is a 20th century variant which originated in Yorkshire, England where brass is still used as a slang term for money. The expression is rarely used nowadays.