Hilchos Lashon Hara, chapter 3, section 4
The prohibition of lashon hara applies even if the speaker does not say clearly who the story is about. If the speaker tells it without names, but the listener understands from the story who it is about, it is still lashon hara.
Even more: even if the story itself has nothing bad in it, but the words will lead to shame or harm for the other person, and the speaker slyly meant for that to happen – this is also lashon hara. Chazal (our Sages) call this "hidden lashon hara."