There is a double cross compilation method to detect if you are infected.
https://wiki.c2.com/?TheKenThompsonHack