In this Paper we describe the performance of a rad-hard diode (Al/p+/n/n+/Al), developed in the framework of research and development programs for the future CMS experiment at LHC, for detection and spectrometry of X-and gamma-rays envisaging its use in characterization of porous structures by X-ray tomography. The diode's response was studied using 57Co, 133Ba, and 241Am radioactive sources at room temperature. A reasonable good energy resolution was obtained in the energy range between 30 and 360 keV (FWHM=5.2 keV and 5.7 keV, respectively). In the same energy range, measurements of full-energy peak efficiencies were carried out and compared with the theoretical values. For 59.5 keV photons the angular dependence of the efficiency was also measured. The results have demonstrated that this diode is appropriate for direct detection of low energy electromagnetic radiation