authenticode

signtool failing to dual sign SHA2 and SHA1 with timestamps

一笑奈何 提交于 2019-11-27 10:21:59
问题 We need to dual sign our binaries with SHA1 and SHA2 using signtool.exe, our certificate supports 256-bit SHA2. Using the Windows 8 SDK's signtool: e.g.: signtool.exe sign /as /fd sha256 /t http://timestamp.verisign.com/scripts/timstamp.dll /f "certificate.pfx" /p XXXXXXX "file.dll" (where XXXXXXX is our password for the certificate) fails with the cryptic error: SignTool Error: SignedCode::Sign returned error: 0x80070057 The parameter is incorrect. SignTool Error: An error occurred while

Validate Authenticode signature on EXE - C++ without CAPICOM

大城市里の小女人 提交于 2019-11-27 07:08:11
I'm writing a function for an installer DLL to verify the Authenticode signature of EXE files already installed on the system. The function needs to: A) verify that the signature is valid. B) verify that the signer is our organization. Because this is in an installer, and because this needs to run on older Win2k installations, I don't want to rely on CAPICOM.dll, as it may not be on the target system. The WinVerifyTrust API works great to solve (A). I need to find a way to compare a known certificate (or properties therein) to the one that signed the EXE in question. Rasmus Faber You should

Get timestamp from Authenticode Signed files in .NET

夙愿已清 提交于 2019-11-27 04:14:33
We need to verify that binary files are signed properly with digital signature (Authenticode). This can be achieved with signtool.exe pretty easily. However, we need an automatic way that also verifies signer name and timestamp. This is doable in native C++ with CryptQueryObject() API as shown in this wonderful sample: How To Get Information from Authenticode Signed Executables However we live in a managed world :) hence looking for C# solution to the same problem. Straight approach would be to pInvoke Crypt32.dll and all is done. But there is similar managed API in System.Security

Automate Extended Validation (EV) code signing

倖福魔咒の 提交于 2019-11-26 23:49:55
We recently purchased a DigiCert EV code signing certificate. We are able to sign .exe files using signtool.exe. However, every time we sign a file, it prompts for the SafeNet eToken password. How can we automate this process, without user intervention, by storing/caching the password somewhere? There is no way to bypass the login dialog AFAIK, but what you can do is configure the SafeNet Authentication Client so it only asks it once per login session. I quote the SAC doc (found once installed in \ProgramFiles\SafeNet\Authentication\SAC\SACHelp.chm , chapter ' Client Settings ', ' Enabling

Getting around Chrome's Malicious File Warning

我的未来我决定 提交于 2019-11-26 18:26:52
I created an application which comprises a number of *.exe files. I've packaged these up into an NSIS installer which I hosted on my website. When I try to download it Chrome reports it as potentially malicious. At first I thought it could be the URL/site I was hosting on not being recognized so I signed up for Amazon S3 storage and moved the file there. Same problem. I then thought that packing the executables might cause this, so I tried without. Same issue. After some more reading I decided to try signing the executables as well as the installer package EXE. I created a dev cert as follows:

Get timestamp from Authenticode Signed files in .NET

非 Y 不嫁゛ 提交于 2019-11-26 11:08:38
问题 We need to verify that binary files are signed properly with digital signature (Authenticode). This can be achieved with signtool.exe pretty easily. However, we need an automatic way that also verifies signer name and timestamp. This is doable in native C++ with CryptQueryObject() API as shown in this wonderful sample: How To Get Information from Authenticode Signed Executables However we live in a managed world :) hence looking for C# solution to the same problem. Straight approach would be

Automate Extended Validation (EV) code signing

ぐ巨炮叔叔 提交于 2019-11-26 08:46:48
问题 We recently purchased a DigiCert EV code signing certificate. We are able to sign .exe files using signtool.exe. However, every time we sign a file, it prompts for the SafeNet eToken password. How can we automate this process, without user intervention, by storing/caching the password somewhere? 回答1: There is no way to bypass the login dialog AFAIK, but what you can do is configure the SafeNet Authentication Client so it only asks it once per login session. I quote the SAC doc (found once