Feature #9487
opendetect: exec.windows keyword to match Windows PE files and log their metadata
Description
Rules that look for Windows executables today chain content, byte_jump and byte_test on file.data to find the PE header and read a field from it, for example:
alert http any any -> any any (msg:"PE download"; flow:established,to_client; file.data; content:"MZ"; startswith; byte_jump:4,58,relative,little; content:"PE|00 00|"; distance:-64; within:4; sid:1;)
These rules are hard to write and read, and they log nothing about the file.
Proposed: an exec.windows file keyword that matches valid PE files and filters on header fields (arch, subsystem, characteristics, sections, timestamp and more), the import table (DLL names, num_imports), the export directory, section names and W+X sections, the Authenticode signing certificate (cert_thumbprint, cert_serial, cert_subject, cert_issuer) and the VERSIONINFO resource (file_version, version_info). The exec. prefix leaves room for keywords for other executable formats later. The same metadata is logged as an executable object in fileinfo events and in the files array of alerts. For example:
JL Updated by Jeff Lucovsky about 22 hours ago
- Description updated (diff)
- Assignee set to Jeff Lucovsky
- Target version changed from TBD to 9.0.0-beta1