Help with Pre foreclosure in MD

I recent came across a seller thats is 4 months behind on his payments.
I was told that I could go to jail and or be fined up to 10k in Maryland .
Does a realtor need to get involved or is there a way to still work with the seller without going to jail.

Help please

Thanks