In the past few decades, a variety of the malicious attacks on the Internet were discovered. Most of these attacks were through packets with different network protocols. Due to the very fast spread of these attacks, it was difficult for people to copy with them immediately. Consequently, packet filtering is a critical method to prevent these attacks. However, most packet filtering software solutions cannot satisfy the demands of the contemporary network bandwidth. In this paper, we propose a GPU-based multiple-pattern matching algorithm for filtering malicious packets by using a Bloom filter to inspect the packet payload by leveraging the high parallelism computing power of GPU. In the experiments, we compare the proposed algorithm with different GPU-implemented technologies to sequence the Bloom filter algorithm on different platforms. The experimental results demonstrate that the proposed algorithm significantly enhances performance over sequential algorithms.