Two alien races have been duking it out between the stars. The difficulty of moving things between the stars has caused this war to strongly favor the defense, hence it has become a war of stealth rather than battle fleets.
Race #1 paid a visit to the solar system. They were detected by the enemy who mistakenly thought it meant they lived here rather than just passing through. Missiles with a nanotech warhead are dispatched, when they enter the solar system they find only two targets emitting electromagnetic energy: Earth and Mars. They're very stealthy, we don't even detect them, let alone try to shoot them down. One missile goes for Mars, the others go for Earth.
The missiles release a huge number of pellets designed to deliver their weapon through the atmosphere while minimizing reaction time and the ability of point defenses to destroy them, a classic time-on-target attack.
The nanomachines are not all that sophisticated (there's a limit of how much computing you can put in something that small), human beings are a sufficient match for their target parameters. While it isn't a grey goo attack the machines do replicate and spread, quickly killing off everyone they can reach.
Their target species does not use aircraft so there is no provision to attack targets in the stratosphere.
The whole point of using a nanotech attack is to take the planet intact rather than simply destroying the biosphere, thus the machines soon deactivate. By the time the planes land it's all over.