A method comprising: providing a wellbore penetrating a subterranean formation, the wellbore being lined with a pipe and having a cement between the pipe and the wellbore, wherein the cement contains a defect; providing a control spectrum of gamma radiation count rates as a function of energy for a control, wherein the control comprises the cement without the defect; emitting gamma rays into the pipe and the cement having the defect from a source of a nuclear tool disposed in the wellbore; detecting count rates of gamma radiation scattered back from the pipe and the cement having the defect with a detector of the nuclear tool as a function of energy to produce a sample spectrum; and deriving two or more physical attributes related to the defect based on a comparison of the sample spectrum and the control spectrum by identifying a dipping point as an energy value corresponding to a shape change in the sample spectrum relative to the control spectrum in a high-energy range for the sample spectrum; wherein the defect is a void, wherein the two or more physical attributes comprise a position of the void and a volume of the void, and wherein deriving the two or more physical attributes further comprises: determining an intermediate-energy range for the gamma radiation (118, 120); calculating a count rate ratio ( CR rαtio) of the count rates of the sample spectrum ( CR sam) relative to the count rates for the control spectrum ( CR con) over the intermediate-energy range according to CR ratio = CR sam CR con | IER; correlating the CR ratio and the dipping point using a known dependence of the CR ratio and dipping point relative to the position of the void and the volume of the void, thereby producing a CR ratio /dipping point correlation; and determining the volume and the position of the void in the cement based on the CR ratio /dipping point correlation. providing a wellbore penetrating a subterranean formation, the wellbore being lined with a pipe and having a cement between the pipe and the wellbore, wherein the cement contains a defect; providing a control spectrum of gamma radiation count rates as a function of energy for a control, wherein the control comprises the cement without the defect; emitting gamma rays into the pipe and the cement having the defect from a source of a nuclear tool disposed in the wellbore; detecting count rates of gamma radiation scattered back from the pipe and the cement having the defect with a detector of the nuclear tool as a function of energy to produce a sample spectrum; and deriving two or more physical attributes related to the defect based on a comparison of the sample spectrum and the control spectrum by identifying a dipping point as an energy value corresponding to a shape change in the sample spectrum relative to the control spectrum in a high-energy range for the sample spectrum; wherein the defect is a void, wherein the two or more physical attributes comprise a position of the void and a volume of the void, and wherein deriving the two or more physical attributes further comprises: determining an intermediate-energy range for the gamma radiation (118, 120); calculating a count rate ratio ( CR rαtio) of the count rates of the sample spectrum ( CR sam) relative to the count rates for the control spectrum ( CR con) over the intermediate-energy range according to CR ratio = CR sam CR con | IER; correlating the CR ratio and the dipping point using a known dependence of the CR ratio and dipping point relative to the position of the void and the volume of the void, thereby producing a CR ratio /dipping point correlation; and determining the volume and the position of the void in the cement based on the CR ratio /dipping point correlation. determining an intermediate-energy range for the gamma radiation (118, 120); calculating a count rate ratio ( CR rαtio) of the count rates of the sample spectrum ( CR sam) relative to the count rates for the control spectrum ( CR con) over the intermediate-energy range according to CR ratio = CR sam CR con | IER; correlating the CR ratio and the dipping point using a known dependence of the CR ratio and dipping point relative to the position of the void and the volume of the void, thereby producing a CR ratio /dipping point correlation; and determining the volume and the position of the void in the cement based on the CR ratio /dipping point correlation.