- poznati koga kot svoj žep
- poznati koga do obisti
The first one literally means "to know someone like one's own pocket"; I'm not sure about the literal meaning of the second.
In Polish we say znamy się jak łyse konie (we know each other like bald horses). We also say about some place, but not people znam (e.g. to miasto) jak własną kieszeń (I know this city like my own pocket). And we can also say, but in a negative meaning Znam cię jak zły szeląg (or: zły grosz) - szeląg and grosz are / were our currency units - this idiom means that we know someone from his bad side.