In Malayalam/Indian, there's a saying "Paashaanatthil krimi". It literally translates to
Worm that lives in poison.
It is used while judging people who keep bad company as being bad themselves. It is used to address someone inimically; to say that a person who can survive in poison is probably very poisonous himself.
Birds of a feather flock together means that similar people tend to associate with each other. It is not suitable here.
What can be an equivalent English phrase?
This is purely out of curiosity, and in any event, I don't intend to judge people.