According to the current concordance cosmological model, dark matter (DM) particles are collisionless and produce self-gravitating structures with a central cusp, which, generally, is not observed. The observed density tends to a central plateau or core, explained within the cosmological model through the gravitational feedback of baryons on DM. This mechanism becomes inefficient when decreasing the galaxy's stellar mass so that in the low-mass regime (M ⋆ ≪ 106 M ⊙) the energy provided by the baryons is insufficient to modify cusps into cores. Thus, if cores exist in these galaxies they have to reflect departures from the collisionless nature of DM. Measuring the DM mass distribution in these faint galaxies is extremely challenging; however, their stellar mass distribution can be characterized through deep photometry. Here we provide a way of using only the stellar mass distribution to constrain the underlying DM distribution. The so-called Eddington inversion method allows us to discard pairs of stellar distributions and DM potentials requiring (unphysical) negative distribution functions in the phase space. In particular, cored stellar density profiles are incompatible with the Navarro-Frenk-White (NFW) potential expected from collisionless DM if the velocity distribution is isotropic and the system spherically symmetric. Through a case-by-case analysis, we are able to relax these assumptions to consider anisotropic velocity distributions and systems that do not have exact cores. In general, stellar distributions with radially biased orbits are difficult to reconcile with NFW-like potentials, and cores in the baryon distribution tend to require cores in the DM distribution.