I don't use much if any pirated software anymore but I used to a lot. This isn't actually nearly as common as software companies would have you believe. Sounds like your friend got unlucky. I downloaded and installed tones of pirated software over the years and never got any malware installed. Of course you have to know some of the warning signs for suspicious looking pirated stuff. Generally stick to full ISOs that don't look like they have been precracked in any way. If the ISO image has been altered in any way, precracked, files added or removed that's not a good sign. When I was pirating I also knew which channels to trust and which to stay away from.