Attenuated microorganisms for the treatment of infection