Law-makers need to do two things. First, they need to make laws that are open to technological change. Laws cannot be written fast enough to keep up with technology. Second, they need to ensure that law enforcement is a profitable profession for youg people, so the best and brightest of computer scientists are on the side of the law, not the criminals.
How can it stop that. Hmmm....well, I think you should get rid of hackers, 'cause in reality, they're the ones who cause all the trouble. Most people use computers to talk to their friends or for business or school. Criminality is not as great among ordinary people as some would have you believe. It's always the professionals.