Estimating the seismic attenuation from shallow geotechnical borehole surveys can be a delicate task. Measured data are often collected within the source near-field domain and the classic inverse-distance correction of the geometrical spreading is inappropriate at this scale. We propose a novel approach based on a 3D full waveform modeling to substitute the inverse-distance correction. It consists in scaling the picked amplitudes using their counterparts obtained from an elastic simulation carried out under conditions mimicking the data acquisition. The seismic attenuation may be inferred from the corrected amplitudes using either a piecewise regression or a ray-based inversion. Numerical experiments involving P- and S-wave synthetic data show that the proposed correction better compensates for the geometrical spreading effect than the inverse-distance correction. For a synthetic example with 5% noise, the Q-factor values derived from amplitude corrected via the proposed approach have a relative error of about 10%, compared to 40% for the traditional correction. We investigate the effect of the velocity and density uncertainty upon the calculated correction terms and show that our approach is unbiased and stable. Finally, the robustness of the proposed workflow is assessed on a real case study involving a P-wave dataset acquired in a geotechnical borehole.