Gravitational flexion has been introduced as a technique by which one can map out and study substructure in clusters of galaxies. Previous analyses involving flexion have measured the individual galaxy–galaxy flexion signal, or used either parametric techniques or a Kaiser, Squires and Broadhurst (KSB)-type inversion to reconstruct the mass distribution in Abell 1689. In this paper, we present an aperture mass statistic for flexion, and apply it to the lensed images of background galaxies obtained by ray-tracing simulations through a simple analytic mass distribution and through a galaxy cluster from the Millennium Simulation. We show that this method is effective at detecting and accurately tracing structure within clusters of galaxies on subarcminute scales with high signal to noise even using a moderate background source number density and image resolution. In addition, the method provides much more information about both the overall shape and the small-scale structure of a cluster of galaxies than can be achieved through a weak lensing mass reconstruction using gravitational shear data. Lastly, we discuss how the zero-points of the aperture mass might be used to infer the masses of structures identified using this method.