Hold it right there.......sounds like you have a hamster with a scent gland
.
Dwarf hamsters have a ventral scent gland right in the middle of their tummy. Especially in mature males, they can be quite large and look like a lump with a hole, which may be full of a pale yellow thick secretion. Unless there is redness/heat/swelling around the gland I wouldn't worry. Very often inexperienced owners (and vets!) can look at them and think they're infected/abnormal when they are a completely normal part of the anatomy of the hamster. If you are still worried then a trip to a vet who is familiar with dwarf hamsters (ring ahead first) will likely put your mind at rest, or you could post a photo here and we could say if it looks like a normal gland or not. Unfortunately I don't have my photos of normal glands to post to show you right now!
The secretion can sometimes cake up a little bit, in which case just gentle wiping with cotton wool/cotton buds and plain warm water or saline is all that's needed if anything.
He shouldn't have poop caked on him though - that's probably indicative of diarrhoea which I'd be more worried about. Has he been pooping normally otherwise?