How to fix garbage disposal leaking black sludge under sink?
If it's coming out of the motor casing, the seal under the shredder plate has failed. The whole unit needs to be replaced. Repair is pointless as the garbage disposal will have other corrosion issues.

From Photo It's coming from the trap joints. There's a square cut rubber gasket under that screw collar that's probably hardened, cracked and is the source of the leak. 

Get a bucket under the trap ("U" section) loosen the collars that hold it on and pull the trap out. It'll be full of gunk. Since it looks like there's rust on the outside, clean it really well and make sure it's not ready to corrode through. Replace anything that is ready to rust through. The tailpiece (what goes into the septic plumbing) also has a collar, take it loose and clean that piece as well. Replace all the gaskets and put it all back together.

Make sure the black "L" bend that comes out of the disposal unit protrudes far enough into the trap "U" when you put it back together so that the gasket seals. One problem I've come across is that the installer cuts it too short and it works its way down till the gasket fails to seal and it starts to leak.