Fix EXE/DLL cert verification#727
Merged
val-ms merged 3 commits intoCisco-Talos:mainfrom Oct 22, 2022
Merged
Conversation
RSA certificate verification is failing because we accidentally lowered the max size of numbers for floating point multiplication with TomsFastMath when upgrading the vendored library code. This commit restores the default from 4096 to 8192.
The function `cli_scan_fmap()` is where we check PE authenticode certificates. But it is only returning CL_CLEAN, CL_VIRUS, or file types. It should propagate errors as well as CL_VERIFIED, if the authenticode finds we should trust the file.
The PE cert test can be enabled now that the cert trust feature is fixed. In so doing I found an issue with it -- it was also using the block-certificate signature, which overrides the trust-certificate signatures. This made me realize that we should also have a test to make sure the block-cert signatures take predence over the trust-cert sigs. I fixed the original sig and added this second test case.
92fd7dc to
e2f7167
Compare
Contributor
Author
|
Backporting this one is too much pain. The recent allmatch fixes work cleaned up so much error handling that made this work reliably. Simply cherrypicking this fix does not cause certificate verification to correctly trust a file. A number of bugs exist causing it to continue scanning instead of aborting. Users will have to upgrade from 0.105 -> 1.0 for cert verification to work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RSA certificate verification is failing because we accidentally lowered the max size of numbers for floating point multiplication with TomsFastMath when upgrading the vendored library code.
This commit restores the default from 4096 to 8192.
Fixes #604