1. A system for protecting an electronic device against malware, comprising: a memory; an operating system configured to execute on the electronic device; a below-operating-system security agent configured to: trap an attempted access of a resource of the electronic device, the attempted access comprising: attempting to write instructions to the memory; and attempting to execute the instructions; access one or more security rules to determine whether the attempted access is indicative of malware; and operate at a level below all of the operating systems of the electronic device accessing the memory.