The determination of prestellar core structure is often based on observations of (sub)millimeter dust continuum. However, recently the Spitzer Space Telescope provided us with IR images of many objects not only in emission but also in absorption. We developed a technique to reconstruct the density and temperature distributions of protostellar objects based on radiation transfer (RT) simulations both in mm and IR wavelengths. Best-fit model parameters are obtained with the genetic algorithm. We apply the method to two cores of Infrared Dark Clouds and show that their observations are better reproduced by a model with an embedded heating source despite the lack of 70 üm emission in one of these cores. Thus, the starless nature of massive cores can only be established with the careful case-by-case RT modeling