There is a worldwide interest in developing a sensing system for the online detection and chemical identification of hazardous substances, especially in water and in air. Towards this goal we have developed an evanescent wave spectroscopy system based on a tunable CO2 on an IR detector and on thin AgBr flat waveguides, which were transparent in the mid-IR and served as sensing elements. Aqueous solutions of common pesticides (e.g. DDVP, Parathion, Diazinon) were placed on the waveguide and spectral absorption measurements were performed in the mid-IR. Using the results, we were able to detect these pesticides at concentrations as low as few ppm and distinguish between them. Such a system would be invaluable for homeland security applications.