In general, no it is not possible. You might be able to get some benefit from a network intrusion detection system (ex: snort) or some anti-virus software. But nothing will guarantee safety. For the most critical of infrastructure, you should verify the hashes that have been cryptographically-signed by the software vendors. Short of that, at least make sure that you download from trusted HTTPS sites that publish SHA hash keys, and compare the SHA with the file you download.
All that being said, if the software vendor is malicious there isn't anything you can do to detect it. Rely on your government's legal system, and only work with software vendors which are subject to their laws.