authenticode

Decode PKCS#7 Signature via Windows API?

▼魔方 西西 提交于 2019-12-11 07:46:42
问题 I wish to parse and display the contents of an Authenticode PKCS#7 signature as extracted from a Window PE binary's Security Directory. I can use OpenSSL to do this on the command line with " openssl pkcs7 -text -in extracted_signature.pks -inform DER -print_certs ", however I need to do this via C/C++ and the Windows API. I cannot use the OpenSSL library itself. Using the CryptDecodeObjectEx API I can begin to decode the extracted signature: CRYPT_CONTENT_INFO * content_info; DWORD len;

Strong Naming or Authenticode signing a new assembly

落爺英雄遲暮 提交于 2019-12-10 23:05:09
问题 I've been asked by an end user to add "Strong Naming" to one of my components, because they want to reference it from a strong named assembly. I already have an authenticode certificate, so I'm wondering - to make my component usable by their strong named component, is it enough for me to just sign the component with my authenticode key? Or do I have to "strong name sign" the assembly (using Al.exe) for it to be considered "Strong named"? I cannot find any "strong name vrs authenticode"

SignTool error: Access is denied

主宰稳场 提交于 2019-12-10 16:30:00
问题 I am trying to authenticode sign a .NET application with a new code signing certificate on Windows Server 2008 R2 x64 with VS2010 installed, but SignTool keeps responding with Access is denied : SignTool.exe sign /v /a /sha1 <thumbprint> MyApplication.exe The following certificate was selected: Issued to: <redacted> Issued by: VeriSign Class 3 Code Signing 2010 CA Expires: Thu Jun 28 01:59:59 2012 SHA1 hash: <thumbprint> Done Adding Additional Store SignTool Error: Access is denied. SignTool

Amended code to retrieve dual signature information from PE executable in Windows?

假如想象 提交于 2019-12-09 18:32:15
问题 I've been struggling for awhile to amend this code sample from Microsoft that shows (somewhat outdated) way how to retrieve a code signature information from an executable file. It works but it doesn't retrieve information if a binary file is dual-signed. So I did some research and tried to rewrite it to make it recognize dual-signatures that are present in many modern executables in Windows. Unfortunately there are very few (nebulous) suggestion available (1), (2), such as those to use

Get chain of certificates for a file with PowerShell?

╄→гoц情女王★ 提交于 2019-12-07 12:59:40
问题 I am looking for a method, using PowerShell only, to list the certificate chain for signed files. Specifically to get the Root certificate. As I need to get a list of which Non-Microsoft root certificates certain executables (on installed software), are dependent on. This is due to a OS-baseline guidelines, that uses the PKI procedure in Microsoft KB293781. Where only specific Root certificates shall be put on specific computers. E.g the much used "VeriSign Class 3 Primary CA - G5", shall

Verifying Authenticode signed executables and DLLs using OpenSSL API

ⅰ亾dé卋堺 提交于 2019-12-07 04:02:50
问题 I have installed openssl and now the rsa_test.c is running fine. What I want to do is: Open any exe or dll digital certificate. Extract the Thumbprint and PublicKey . The public key contains the exponent too (if you are familiar with ASN1 encoding). Now I have already calculated SHA-1 hash of the file and compared it to the MD field to find it correct. So now I want to pass the Thumbprint , PublicKey->m and PublicKey->e to RSA_public_decrypt function to calculate the decrypted SHA-1 hash of

Detect a digital signature without WinVerifyTrust

醉酒当歌 提交于 2019-12-06 09:04:28
问题 I have a large number of EXE files and need to figure out which ones have digital signatures. Does anyone know if there is a way to check without access to WinVerifyTrust (they're all on a Unix server). I can't seem to find any information on where the digital signature actually is inside the EXE. If I could find out where it is I might be able to open the file and fseek to a location to test. I don't need to do "real" verification on the certificate, I just want to see if a digital signature

Get chain of certificates for a file with PowerShell?

喜欢而已 提交于 2019-12-06 01:16:13
I am looking for a method, using PowerShell only, to list the certificate chain for signed files. Specifically to get the Root certificate. As I need to get a list of which Non-Microsoft root certificates certain executables (on installed software), are dependent on. This is due to a OS-baseline guidelines, that uses the PKI procedure in Microsoft KB293781. Where only specific Root certificates shall be put on specific computers. E.g the much used "VeriSign Class 3 Primary CA - G5", shall only be used when necessary. Get-AuthenticodeSignature only lists the Issuer. E.g: Get

How do I read the digital signature information from a signed .Net assembly?

僤鯓⒐⒋嵵緔 提交于 2019-12-05 18:37:24
问题 I am writing an assembly information application to be used in our software build process and am trying to read the digital signature information from a signed .Net assembly. I want to do in my C# code what Windows Explorer can do by right-clicking a signed assembly and selecting the "Digital Signatures" tab and then clicking the Details button. e.g. Has anyone got an idea how to do this programmatically in C#? I am currently using the Mono Cecil library to get the rest of the information

Verifying Authenticode signed executables and DLLs using OpenSSL API

寵の児 提交于 2019-12-05 12:47:33
I have installed openssl and now the rsa_test.c is running fine. What I want to do is: Open any exe or dll digital certificate. Extract the Thumbprint and PublicKey . The public key contains the exponent too (if you are familiar with ASN1 encoding). Now I have already calculated SHA-1 hash of the file and compared it to the MD field to find it correct. So now I want to pass the Thumbprint , PublicKey->m and PublicKey->e to RSA_public_decrypt function to calculate the decrypted SHA-1 hash of the file. What Padding Algorithm should I pass to the function? When I pass RSA_NO_PADDING , it decrypts