Gravitational lenses on arcseconds scales provide a tool to probe the mass distribution in the lensing galaxies at redshift z ≈ 0.5-1.0. Image positions can be fitted using simple smooth galaxy mass models, but observed fluxes are more difficult to match. We analyze the effects of substructures in galaxy halos to explain such anomalies in the cusp and fold leasing configurations with different approaches. In the first case we use detailed numerical simulations combined with a Monte Carlo approach to compare predictions from the ACDM small scale mass function with observed flux ratios. We extended our analysis down to a mass of ≈105 M ⊙ for the subhalos. Moreover, we considered extra-halos, like other galaxies surrounding the primary lens: also if we include these effects we are not able to reproduce the observed fluxes. This seems to indicate that there is no direct evidence for dark dwarf satellites from multiple imaged QSOs. In the second case we try to constrain, with a semianalytical approach, the mass and the position of a substructure by considering its effects on the flux of the images: we add to a smooth lens model, which reproduces well the positions of the images but not the anomalous fluxes, one or two substructures described as singular isothermal spheres. With substructures in the mass range ∼106-108 M⊙ we are able to fit quite accurately the anomalous fluxes for fold configurations.