Tar is one of the poisonous substances contained in tobacco.
PHRASE
被当作一丘之貉;被当成一路货色
If some people in a group behave badly and if people then wrongly think that all of the group is equally bad, you can say that the whole group is tarred with the same brush .