The Monte Carlo simulation of the electron transport through thin slabs is studied with five general purpose codes: PENELOPE, GEANT3, GEANT4, EGSnrc and MCNPX. The different material foils analyzed in the old experiments of Kulchitsky and Latyshev [Phys. Rev. 61 (1942) 254-266] and Hanson et al. [Phys. Rev. 84 (1951) 634-637] are used to perform the comparison between the Monte Carlo codes. Non-negligible differences are observed in the angular distributions of the transmitted electrons obtained with the some of the codes. The experimental data are reasonably well described by EGSnrc, PENELOPE (v. 2005) and GEANT4. A general good agreement is found for EGSnrc and GEANT4 in all the cases analyzed.