Friday, July 22, 2016

Removing digital signatures from a file

It may be useful to remove digital signatures from a file, e.g. if you've tweaked it with a hex editor and want to run it elevated. Visual Studio and the Windows SDK include a tool for managing the signatures in files: signtool.exe. If you open the Developer Command Prompt, it'll be on your PATH. Otherwise, you can search for it in the Windows Kits folder under the 32-bit Program Files folder. For me, it's at this path:

C:\Program Files (x86)\Windows Kits\10\bin\x86\signtool.exe

Anyway, once you find it, run this:

signtool remove /c C:\path\to\target.exe

It looks like the "remove" feature wasn't always there, so you might need to get the newest Visual Studio if yours doesn't include that ability.

2 comments: