знать как свои пять пальцев

Etymology
lit. 'to know like one's five fingers'.

Idiom

 * 1) to know like the back of one's hand