The story was in a collection of short stories for boys from the '80s, but the story itself was possibly older.
The alien invaders were using something like tripods, if I remember correctly, and I think humans were able to bring the tripods down, but the alien bases were invulnerable due to a force field barrier. Mankind was virtually completely defeated within weeks.
Finally humans found a way - the alien tripods carried an orb or similar, which allowed the carrier to pass through the force field. Using orbs captured from tripods they destroyed, humans mounted attacks on the bases and defeated the aliens.