You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sample is specially crafted and "valid" PE64 binary where it contains so-called "import forwarder TLS callback" where the TLS callbacks address points directly to the FT (First Thunk in IMAGE_THUNK_DATA) of import entry; and it fails to parse:
cargo run --example rdr -- "path/to/special_import_forwarder_tls.exe.bin"
So, it tried to read OFT of first IMAGE_IMPORT_DESCRIPTOR (aka ImportDirectoryEntry) element is cause―current implementation of import parser assumes that import directory is well-formed, where it may not well-formed like this case right now.
I'm going to fix this in minor changes.
The text was updated successfully, but these errors were encountered:
Sample: special_import_forwarder_tls.exe.zip
Reproducible steps
The sample is specially crafted and "valid" PE64 binary where it contains so-called "import forwarder TLS callback" where the TLS callbacks address points directly to the FT (First Thunk in
IMAGE_THUNK_DATA
) of import entry; and it fails to parse:cargo run --example rdr -- "path/to/special_import_forwarder_tls.exe.bin"
Sample contains an one specially crafted import entry:
Cause
The cause is that import parser tries to parse 2nd entry (at
0xe28
) where it does not exists:The exact code is following:
goblin/src/pe/import.rs
Lines 346 to 357 in d096260
And the raw data (LE):
First entry thunk (
abcd.dll
―ORDINAL 51398
)Second entry (null-terminator entry)
So, it tried to read OFT of first
IMAGE_IMPORT_DESCRIPTOR
(akaImportDirectoryEntry
) element is cause―current implementation of import parser assumes that import directory is well-formed, where it may not well-formed like this case right now.I'm going to fix this in minor changes.
The text was updated successfully, but these errors were encountered: