This investigation is aimed towards using optical spectroscopy for remote identification and quantitative analysis of hazardous substances for safety and security applications. We introduce a new model employing portable photosensor devices that are based on the double-barrier and vertically placed silicon structure, for such applications. The different absorption depths of individual waves allow us to carry out their spectral selection using an algorithm developed for this specific objective. We tested the proposed model on experimental Ag-p-Sin -Si structures. The algorithm is developed for the spectral analysis without the preliminary calibration. The low dark currents (several dozens of pA) permit us to carry out the spectral analysis of the integral flux of the electromagnetic radiation of low intensity. The quantitative data from light current-voltage characteristics allow us to obtain an intensity distribution spectrum characteristic of the material by using red LED and the green laser. The results of this investigation divulge new possibilities for the creation of a new type of the portable semiconductor spectrophotometer and due to its stand-off detection capability, offer potential pathways to evaluate hazardous substances.