Received Month X, XXXX; revised Month X, XXXX; accepted Month X, XXXX; posted Month X, XXXX (Doc. ID XXXXX); published Month X, XXXX Determining the authenticity of integrated circuits is paramount in preventing counterfeit and malicious hardware from being used in critical military, healthcare, aerospace, consumer, and industry applications. Existing techniques to distinguish between authentic and counterfeit integrated circuits often includes destructive testing requiring subject matter experts. We present a non-destructive technique to detect counterfeit integrated circuits using X-ray microscopy and advanced imaging analysis with different pattern recognition approaches. Our proposed method is completely automated, and runs in real time. In our approach, images of an integrated circuit are obtained from an X-ray microscope. Local binary pattern features are then extracted from the X-ray image followed by dimensionality reduction through principal component analysis, and alternatively through a non-linear principal component methodology using a stacked autoencoder embedded in a deep neural network. From the reduced dimension features, we train two types of learning machines, a support vector machine with a non-linear kernel, and a deep neural network. We present experiments using authentic and counterfeit integrated circuits to demonstrate that the proposed approach achieves an accuracy of 100% in distinguishing between the counterfeit and authentic samples.