Strong gravitational lensing is a powerful tool that can be used to probe the matter distribution in the cores of massive dark matter haloes. Recent and ongoing analyses of galaxy cluster surveys – such as the Massive Cluster Survey (MACS), the Canada–France–Hawaii Telescope Legacy Survey (CFHTLS), the Sloan Digital Sky Survey (SDSS), the Sloan Giant Arcs Survey (SGAS), the Cluster Lensing and Supernova Survey with Hubble (CLASH) and the Local Cluster Substructure Survey (LoCuSS) – have addressed the question of the nature of the dark matter distribution in clusters. Using N-body simulations of cold dark matter haloes, it is consistently found that haloes should be characterized by a concentration–mass relation, which decreases monotonically with halo mass, and that they should be populated by a large amount of substructures, representing the cores of accreted progenitor halos. It is important for our understanding of dark matter that we test these predictions. We present moka, a new algorithm for simulating the gravitational lensing signal from cluster-sized haloes. It implements the most recent results from numerical simulations to create realistic cluster-scale lenses with properties independent of numerical resolution. We perform systematic studies of the strong lensing cross-section as a function of halo structures. We find that the strong lensing cross-sections depend most strongly on the concentration and on the inner slope of the density profile of a halo, followed in order of importance by halo triaxiality and the presence of a bright central galaxy.