Spying on a country, in that country, for another country, is absolutely a crime, not ambiguity there. And spying using satellites, many hundreds of miles above controlled airspace, is not a crime - it's not even considered spying. In between those two you get high altitude spying using surveillance aircraft or balloons. It really does fall in this weird "not a crime until detected" grey area.