A detailed investigation is presented of the X rays that emerge from a tokamak inner wall after a random walk in which Compton scattering is the dominant process. The ability to measure accurately plasma emission above 50 keV along lines of sight facing the inner wall is assessed using a Monte Carlo code, the standard solution for radiation transport in a bounded medium. For peaked emission profiles, the scattered contribution can be large compared with the direct plasma emission for lines of sight probing the border of the plasma. Good quantitative agreement is found between the predicted and the measured hard X ray data for this case