HackTool:Win32/Keygen - What Is It and How Dangerous?
HackTool:Win32/Keygen is the detection handle assigned to a potentially malicious file by the Microsoft Windows Defender software.
HackTool:Win32/Keygen is not the name of the actual threat, the container, or the payload of any malware. It is a generic detection name that is attached to a number of files that trigger not just Windows Defender, but a wide range of other security software applications.
The designator HackTool:Win32/Keygen contains in it half the answer to the original question - the files that usually trigger this detection are key generators. Those are illegal tools that will generate serial numbers or keys, usually for paid software.
The issue here is, the vast majority of those key generators or keygens come with other malware piggy-backing inside the same executable file. People often have the perception that those detections are "false positives", which is hardly ever the case, in reality.
While a small number of key generators may trip up security software without any malicious contents in the keygen executable, they will usually contain some sort of malicious code inside them. The nature of that malicious code can vary wildly, which is why the generic detection HackTool:Win32/Keygen can cover a huge range of potential threats, from Trojans and backdoors to simple keyloggers and viruses.
It is no secret that illegal torrents of paid software and games are often used as a vehicle for malware. In this sense, it is not too difficult to imagine that the malware will be contained in the "crack", "keygen" or another method of circumventing copyright protection, included in the torrent.
If your security software of choice comes up with a warning for HackTool:Win32/Keygen, naturally your best bet is to immediately quarantine, then remove the file entirely, to prevent any possible malware infection of an unknown type.