Dynamical structure factor in disordered systems