Ylianst / Authenticode-JS

Pure NodeJS module and tool for code signing Windows executables
Apache License 2.0
29 stars 7 forks source link

Text strings not updating #7

Open BillBardon opened 1 year ago

BillBardon commented 1 year ago

authenticode.js stopped working for me with the MeshCentral 1.1.1 version update. It signs the executable, but the FileDescription and ProductName are not changed. My method is to have node pre-installed on my Linux desktop, then scp the MeshAgent64.exe file from the node_modules/meshcentral/agents directory on my remote server to my home folder. I also copy authenticode.js and pkcs7-modified.js files from the node_modules/meshcentral directory. Then I run the sign command in my home dir.

This has worked since authenticode.js was released. Today it is not changing the string fields.

Here is my command and output, with some generic text and hashes obfuscated:

node authenticode sign --pem CACodeSign.pem --url "https://host.domain.com?serverid=577C195...9ABE1C007" --time http://timestamp.sectigo.com --desc "Description goes here" --productname "ProductX" --filedescription "not a file description" --exe MeshService64.exe
Signing to MeshService64-out.exe
Done.

Then I check it with this command:

node authenticode info --exe MeshService64-out.exe
Version Information:
  FileVersion: 0.0.0.0
  ProductVersion: 0.0.0.0
String Information:
  FileDescription: "MeshCentral Background Service Agent"
  FileVersion: "2022-Dec-2 11:42:16-0800"
  LegalCopyright: "Apache 2.0 License"
  ProductName: "MeshCentral Agent"
  ProductVersion: "Commit: 2022-Dec-2 11:42:16-0800"
Checksum Information:
  Header CheckSum: 0x34db65
  Actual CheckSum: 0x34db65
Signature Information:
  Hash Method: sha384
  Signed Hash: 0bd1758...106b170f546
  Actual Hash: 0bd17587d4f...170f546
Signature Attributes:
  Description goes here
  https://host.domain.com?serverid=577C1958AD...ABE1C007

The description gets updated, but the productname and filedescription do not.