
The legislation, which the German government proposed last year and approved late last week, seeks to crack down on the sharp rise in computer attacks in Germany's public and private sectors.
Although Germany, like the UK and the rest of Europe, already has computer crime legislation in place, the new law seeks to close more loopholes.
Security experts welcomed the move. "Attacks on IT systems are evolving to the point where legislation drawn up years ago cannot cope with the more ingenious attack methodologies," said Yuval Ben-Itzhak, chief technical officer at Finjan.
"Our quarterly web security trends report, for example, has identified the increasing use of code obfuscation to avoid detection.
"This complex attack methodology is usually achieved using so-called hacker utilities, the possession of which was not illegal."
The new legislation makes it illegal to acquire or download these utilities, as well as making it against the law to bypass a system's IT security measures.