My first thought when I saw this question was that the idiom "It takes a thief to catch a thief" might be applicable. Christine Ammer, The American Heritage of Idioms (1997) explains the sense of the saying as follows:
it takes a thief to catch a thief, meaning "no one is better at finding a wrongdoer than another wrongdoer." First recorded in 1665, it remains current.
But it turns out that a longstanding English proverb is even more direct and on point. It appears in John Ray, A Collection of English Proverbs (1678):
Tell a lie and find the troth.
Wolfgang Mieder, A Dictionary of American Proverbs (1992) traces this proverb to circa 1594 in Francis Bacon, The Promus of Formularies and Elegancies, and finds recent instances of its use (with truth in place of troth) in Oklahoma and Texas.
The version of Bacon's Promus that I consulted, however, offers split sentiments on the validity of the saying, quoting one excerpt from Shakespeare opposed to it and three in favor of it. On the one hand:
To find out right with wrong—it may not be. (Richard II, i.3.)
But on the other:
I think't no sin/To cozen him that would unjustly win. (All's Well That Ends Well, iv. 2.)
It is a falsehood that she is in, which is with falsehood to be combated. (Two Noble Kinsmen, iv. 3.)
Your bait of falsehood takes a carp of truth;/And thus do we of wisdom and of reach,/With windlasses, and with assays of bias,/By indirections find directions out. (Hamlet, ii. 1.)