Due to a growing number of attacks, security measures for Internet of Things (IoT) devices are an increasingly urgent issue. However, the limited processing power of IoT devices makes deploying security software on them impractical and too expensive. A malware detection mechanism based on machine learning that uses processor information during program execution has previously been developed. In this paper, we propose a combined method to detect malware: a hardware-based discriminator mounted in parallel with the core in a Large-Scale Integration (LSI), with a pattern-matching method. We also present a software-based validation of the proposed method. In future work, we aim to offload the proposed mechanism to hardware in order to realize a lightweight malware detection mechanism for IoT devices.