Magnetic anomalies revealed by Mars Global Surveyor witnessed the early hstages of Mars' history. In this work MGS magnetic measurements are used to study the early evolution of Mars' crust and core. An inverse method is developed in order to derive the properties of dipolar crustal sources. Thanks to tests with synthetic data and a real terrestrial case, the robustness of our method is proved. Magnetic anomalies of 3 different areas of Mars are then studied. We show that the magnetization of the martian lithosphere is intense (1 to 140 A/m) and deep (30 to 145 km). To explain this magnetization, a serpentinization model is proposed and discussed. Finally, the paleopoles derived from dipole magnetization directions cluster in the north-western hemisphere of Mars, around the Tharsis volcanic complex. The latter is expected to have played a major role in the reorientation of the planet, which created the apparent polar wander.