UM-C162, a benzimidazole derivative, can rescue nematodes from a S. aureus infection. UM-C162 prevents the formation of biofilm without interfering with bacterial viability. UM-C162 mediates the disruption of S. aureus hemolysins, proteases and clumping factors production. UM-C162 has the potential to be used as an anti-virulence agent to control S. aureus infections.