In modern electronic warfare, physical-layer security threats have evolved from traditional jammers to smart jammers. Smart jammers, due to their stealthy nature, make wireless communication systems vulnerable. They can easily deceive a detection system. In this paper, a physical-layer intrusion detection system (PLIDS) for direct-sequence spread-spectrum systems is developed against smart jammers, which is efficient due to its high detection rates, usability, and accuracy. Smart jamming noise is modeled as wide-sense stationary, additive, and colored. This random process is decomposed into a series expansion of independent and uncorrelated random variables. The decomposition helps in designing a signal processing algorithm for PLIDS. The algorithm is easily implemented via correlators. PLIDS is evaluated using a simulated electronic warfare environment, and its performance is measured in terms of detection capability, precision, and accuracy. It performs error-free detection by adjusting its tuning parameter. Moreover, different performance tradeoffs are observed for different values of the tuning parameter. Finally, comparisons of PLIDS are done with competitive intrusion detection systems.