Shemiras Halashon Halachos
Hilchos Lashon Hara, Opening – negative commands (10)
If he stands up and testifies against him in beis din concerning some prohibition as a single witness, no benefit can result such as [obligating him to pay] money [or to swear] an oath, nor to disqualify this person from the assumption that he is kosher, since he is only one witness. Therefore, he is simply giving him a bad name and transgresses the negative command, "A single witness shall not stand [to give witness] about a man regarding any sin or any transgression." The beis din is obligated to give him lashes for doing this.
Hilchos Lashon Hara, Opening – negative commands (11)
All we have written is when the speaker is one and the listener is one. But if a person connects himself with a group of evil people who habitually speak lashon hara in order to speak and hear from them, he also transgresses the negative command, "Do not go after the many for evil things," which is a prohibition against agreeing with or joining with evildoers even if they are many. See later paragraph 6 in the positive mitzvos, where we see that he also transgresses a positive mitzvah through this evil connection.