The PENELOPE Monte Carlo simulation code was used to evaluate pinhole mask parameters for X-ray backscatter imaging in a security application. This work makes four major contributions: it describes a convenient efficient test object for evaluating X-ray optics, it converts the PENELOPE output into a simulated CCD image, it compactly outlines how image characteristics can be simply and reproducibly quantified, and it gives guidance on suitable materials and geometries for pinhole masks for X-ray imaging that could be applied to more complicated X-ray optics, such as coded masks. A novel test object X-ray emitter with the shape of a thin wire was specifically designed to explore the effect of mask material thickness and pinhole aperture diameter on image quality. Setting the test object to be the X-ray emitter rather than being a passive scatterer increases computational speed. The photon energy distribution of the artificial test object was set flat between selected energy limits to avoid the model being specific to any particular X-ray source technology. The modelled detector is an array of 1040 x 1392 pixels’ area detector inside a lead-lined camera housing. The pixelated detector was modelled by digitising the surface area represented by the PENELOPE phase space file and integrating the energies of the photons impacting each pixel with MATLAB code. The pinhole must be wide enough for sufficient field of view, whilst narrow enough for sufficient spatial resolution and the mask material needs to be thick enough to absorb most X-rays. When the mask material was too thick and the aperture too narrow, a collimation effect occurred. The consequence of excess collimation in a coded aperture is partial coding giving poor image reconstruction. Pure tungsten appears the most versatile material tested, where a 2 mm thickness and 2 mm aperture gives the most appropriate image characteristics for X-ray security imaging.