Yeah you take the risk of downloading free cracked software. That's the cost of wanting free stuff I suppose. Just get Malware Bytes handy, and have a decent anti virus software. I'd avoid going on sites like Sourceforge and Cnet since that's where most infected software ends up at. Most people here are good about providing a link to Virustotal showing that their software is fine. Use a computer that you don't often use as well when looking for free software so just in case you do get a virus and can't seem to get rid of it you can just do a fresh install of whatever OS you want.
Adding to above it's generally just awareness towards what viruses look like. Knowing about how big an application should be, awareness of different file types (Don't try to install something that's not a zip or exe or dmg or something like that for insance), and having Malwarebytes or Sophos to check downloads. Also just avoiding installers that you suspect are doing something other than just installing