You can block malware in pfSense using the pfBlockerNG package. This package allows you to block or allow traffic based on IP lists. You can also use the Snort package for intrusion detection and system prevention. Both packages are very effective at blocking malware.