Brush up on Factorio and arm the rockets. Our current spacecrafts are not designed to survive sustained damage (and unlike on earth, the attack vehicles have no easy way of refuel in space, so they are limited when it comes to evasive maneuvers). Attacking a planet is limited by the (current) laws of physics. Defenders are at a great advantage as long as they have a proper production line for orbital rockets.