Ok, I used to have this problem in past, at my early year of keep shrimps. They had internal bacteria infection (cloudy body).
I found out my soil was really dirty and didn't siphon often. That was the main cause.
To treat them, I moved them to quarantine and dozed Tetracycline suggestions doses and water change after day 5 or 6. After 2 weeks and half, I noticed the cloudy in body was all most disappeared, the infection started slowing down. After that, I did water change about 15% to 20% weekly. About a month later, the infection was gone...
Well, That method worked for me. But keep in mind some infected shrimps could die if their infection was already advanced in stage...
Hope this help