We present the results of Monte-Carlo simulations of three-dimensional electromagnetic cascade initiated by interactions of the multi-TeV gamma-rays with the cosmological infrared/optical photon background in the intergalactic medium. Secondary electrons in the cascade are deflected by the intergalactic magnetic fields before they scatter on CMB photons. This leads to extended 0.1-10 degree scale emission at multi-GeV and TeV energies around extragalactic sources of very-high-energy gamma-rays. The morphology of the extended emission depends, in general, on the properties of magnetic fields in the intergalactic medium. Using Monte-Carlo simulated data sets, we demonstrate that the decrease of the size of extended source with the increase of energy allows to measure weak magnetic fields with magnitudes in the range from < 1e-16 G to 1e-12 G if they exist in the voids of the Large Scale Structure.