When the stakes are treason and/or Guantanamo Bay, you are still bold no matter how many precautions you take or maybe just stupid.
Treason against the United States, shall consist only
in levying War against them, or in adhering to their
Enemies, giving them Aid and Comfort. No Person shall
be convicted of Treason unless on the Testimony of two
Witnesses to the same overt Act, or on Confession in
open Court.
It wouldn't surprise me to see the government try to claim "cyber warfare" meets the bill for "levying War against them", but I can't imagine the supreme court letting that stick.edit: If you provided hacked information to a foreign power I could see that being considered giving aid to an enemy. My original question was more focused on the actual hacking itself than what you do with the information.
It could be considered "light treason" however...
In truth it'd be likely to fall under federal statutes governing systems access, and probably I'd guess the 1917 Espionage Act.