Laser-plasma electron accelerators can be used to produce high-intensity x-rays, as electrons accelerated in wakefields emit radiation due to betatron oscillations. Such x-ray sources inherit the features of the electron beam; sub-femtosecond electron bunches produce betatron sources of the same duration, which in turn allow probing matter on ultrashort time scales. In this paper we show, via Particle-in-Cell simulations, that attosecond electron bunches can be obtained using low-energy, ultra-short laser beams both in the self-injection and the controlled injection regimes at low plasma densities. However, only in the controlled regime does the electron injection lead to a stable, isolated attosecond electron bunch. Such ultrashort electron bunches are shown to emit attosecond x-ray bursts with high brilliance.