den = dwelling place
Thieves would hide. They would hide in a dirty place. They usually are not good people.
So "living in a den of theives" would be staying or hanging out with not very good people in not very good circumstances.
(Is this a song lyric or book title?)