  Many dark matter (DM) models that are consistent with current cosmological
data show differences in the predicted (sub)halo mass function, especially at
sub-galactic scales, where observations are challenging due to the inefficiency
of star formation. Strong gravitational lensing has been shown to be a useful
tool for detecting dark low-mass (sub)halos through perturbations in lensing
arcs, therefore allowing the testing of different DM scenarios. However,
measuring the total mass of a perturber from strong lensing data is
challenging. Over or underestimating perturber masses can lead to incorrect
inferences about the nature of DM. In this paper, we argue that inferring an
effective slope of the dark matter density profile, which is the power-law
slope of perturbers at intermediate radii, where we expect the perturber to
have the largest observable effect, is a promising way to circumvent these
challenges. Using N-body simulations, we show that (sub)halo populations under
different DM scenarios differ in their effective density slope distributions.
Using realistic mocks of Hubble Space Telescope observations of strong lensing
images, we show that the effective density slope of perturbers can be robustly
measured with high enough accuracy to discern between different models. We also
present our measurement of the effective density slope
$\gamma=1.96\substack{+0.12 \\ -0.12}$ for the perturber in JVAS B1938+666,
which we find to be a $2\sigma$ outlier of the cold dark matter scenario. More
measurements of this kind are needed to be able to draw robust conclusions
about the nature of dark matter.
