There ha sto be a place to find black sludge because using the poketransporter and pokebank it wont be able to transfer a Pokemon holding an item to x and y so there has to be a place and also I have seen people use it in wi-fi battles
you can find the black sludge in Coumarine city. in the gate that leads to route 13, there is a punk. talk to him and he will give you the black sludge.
EDIT--wild croagunk have a chance to hold it. they can be found on route 7, so if you use thief on them you have a chance to steal there item. Thanks to SparkyBlaziken for this information