If you want to get a general idea on how many malicious files these websites in question hosted in the not too distant past and what their status now is, then one service you could use to determine that is Google's Safe Browsing diagnostic. While it doesn't seem to have a front page, all you really have to do is provide the root address of the website in question as the single input parameter site
. For example:
http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=4shared.com
will return Google's diagnostic for 4shared.com:
Safe Browsing Diagnostic page for 4shared.com
What is the current listing status for 4shared.com? This site is not
currently listed as suspicious.
Part of this site was listed for suspicious activity 1 time(s) over
the past 90 days.
What happened when Google visited this site? Of the 571106 pages we
tested on the site over the past 90 days, 0 page(s) resulted in
malicious software being downloaded and installed without user
consent. The last time Google visited this site was on 2013-04-25, and
the last time suspicious content was found on this site was on
2013-04-23. Malicious software includes 27 trojan(s), 18 exploit(s), 2
virus.
This site was hosted on 5 network(s) including AS40824 (WZCOM),
AS35415 (WEBAZILLA), AS36351 (SOFTLAYER).
Has this site acted as an intermediary resulting in further
distribution of malware? Over the past 90 days, 4shared.com did not
appear to function as an intermediary for the infection of any sites.
Has this site hosted malware? Yes, this site has hosted malicious
software over the past 90 days. It infected 0 domain(s), including.
There are of course other providers that rank websites based on their trustworthiness. One that comes off the top of the mind and has been around for a while now is Web of Trust. They also offer probably more convenient browser plugins linked with their ranking engine, than having to check websites' reputation manually.
Personally, I'm relatively happy and problem free (no malware unless I intentionally look for it) for years browsing pretty much any websites (basic caution should be practiced, but I'm of the curious sort, to be honest) with a good and always updated anti-virus software, paranoidly setup firewall, operating system updated with all the latest patches, and a few browser plugins that I wouldn't want to live without any more, such as Adblock plus and HTTPS Everywhere.
For other suggestions and good practices, please also read the @D3C4FF's answer. Maybe just one thing to add to it - at all costs avoid pirated software and fishy looking software that sound almost too convenient to be true! If you're not sure, you can always check user forums that you trust for opinion on some particular piece of software. Most users are perfectly happy with a few dozen of installed applications, so that shouldn't be too much of a bother to open a page or two to read about before installing them, no? ;)