If a person was to make a piece of software available on the Internet that was used for malicious reasons by criminals or foreign governments, I do not think that they would be responsible. The person who created it just came up with the technology. They did not force people to use that technology in the wrong way. When something new is invented, the inventor thinks about all the good things that their invention can do not the bad. Take the computer for example. The first computer was made to help humans do what they could not do. It helped them remain efficient. Should the inventor of the first computer be blamed for all of the crimes that are committed on computers? No, it is not fair to the inventor.
I believe that everyone has free will, and they get to decide between choosing the right path and the wrong path. The software is just a fork in the road, and the users of the software choose what path they get to go on. People that violate the inventions of others for harm are choosing the wrong path. I do not think that the inventor should be punished since the person committing the crime made that choice on their own.