Skip to content

Check is_driver() on drivers in pefile-tests - #650

Merged
j-t-1 merged 1 commit into
erocarrera:masterfrom
HuzaifaChaudary:tests/driver-check-corpus-files
Nov 5, 2026
Merged

j-t-1 merged 1 commit into
erocarrera:masterfrom
HuzaifaChaudary:tests/driver-check-corpus-files

Conversation

@HuzaifaChaudary

Copy link
Copy Markdown
Contributor

part of #584 .

the two files the old checks used are not in pefile-tests . corkami driver.sys and the lief PE64_x86-64_atapi.sys are , and radare2 shows both as Native and importing from the kernel , ntoskrnl.exe for the first and NTOSKRNL.exe for the second . each is checked with and without fast_load , and cmd.exe is the negative case . the upper case name means the test fails if the .lower() on the import names goes away .

the plaso file from #322 is still public , test_data/test_driver.sys in log2timeline/plaso ( apache 2.0 , 1024 bytes ) , if you want it back in pefile-tests . it imports DbgPrint from ntoskrnl.exe too and is_driver() is true for it .

the two files the old checks used are not in pefile-tests . corkami driver.sys and the lief PE64_x86-64_atapi.sys are , and radare2 shows both as Native and importing from the kernel , ntoskrnl.exe!DbgPrint for the first and NTOSKRNL.exe for the second .

each is checked with fast_load , where is_driver() has to parse the imports itself , and without it . the 64 bit one names the kernel in upper case , so the test fails if the .lower() on the import names goes away . cmd.exe is the negative case .
Copilot AI balanced review requested due to automatic review settings November 3, 2026 13:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@j-t-1
j-t-1 merged commit 262b0f6 into erocarrera:master Nov 5, 2026
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants