@feruze-- You're right, jurisdiction is very confusing when it comes to cyber crimes. I think the way it works right now is that US has (federal) jurisdiction if the cyber crime was committed on US territory or on a US ship or aircraft.
If it's outside of the US, US federal courts still have jurisdiction over it if the criminal is a US citizen and if the crime is recognized in that country (which is a bummer). This is if the cyber crime has an international scope.
If the cyber crime took place in one or more US states, then jurisdiction will fall to state courts. But I don't know much about it so I can't tell you which state would have jurisdiction over a cyber crime and why.