The first thing you have to realize is that whenever someone speaks to how an anarchist society would act in a given situation, they are guesstimating. Odds are, an anarchist society would be so pluralistic that it would be very difficult to define in the aggregate.
And that leads me to my first point. Think about what the terrorists did on 9/11. They struck at the heart of American power: the twin towers were a symbol of corporate capitalism and the pentagon was a symbol of the federal government. But in an anarchist society there would be no head to the snake. In other words, if there are no de facto leaders or institutions, where is the weak point?
Also, don't forget: statelessness in no way implies pacifism. Guns and larger weapons could very well be put to use in defending the "nation." I know many anarchists would like to believe that any anarchist society would be inherently peaceful, but--if history and the present are any indication--some people will still "cling to [their] guns." Guerrilla warfare has been very effective at stopping much larger and more powerful forces: the British during the American Revolution, the U.S. in Vietnam, virtually every western nation in the Middle East, the Romans in Ancient Rome, and many other places at many other times throughout history and at present.
For those who detest violence, Etienne de la Boetie wrote back in the 16th century that a ruler's power rests with the consent of the governed. This is true of dictatorships and democracies alike. If another country invaded an anarchist landscape, poisoning wells (so to speak), sit-ins, resistance on a Gandhian scale would likely deter or slow the invasion. And it is unlikely to the point of absurdity that an invading force would want to (or be able to) kill every indigenous individual. If no one is left to rule, what's the point?
Finally, though I may be criticized for quoting an Austrian economist, Ludwig von Mises once claimed that "When goods cross borders, soldiers won't." An anarchist society would likely (though not certainly) be more prosperous, open to trade and cooperation. There would be no saber-rattling or blockades of foreign soil. So, what would another country stand to gain by invasion but a loss of soldiers, resources, and money?
This is by no means an exhaustive answer, but it's a start.