Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/pe/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@ func parse(path string, data []byte, options ...Option) (*PE, error) {
// driver samples may not contain an import directory, but section names may
// reveal the PE is a kernel driver.
func (pe *PE) isDriver() bool {
// Prevent false positives such as ntdll.dll
// because it has the PAGE section which is
// driver-typical
if pe.IsDLL {
return false
}
// DIRECTORY_ENTRY_IMPORT may exist, although it may be empty.
// If it imports from "ntoskrnl.exe" or other kernel components it should
// be a driver.
Expand Down