This is not something I actually use so there will be no support. I may accept pull requests if they are reasonable.
I don’t actually use windows, but it’s probably simpler on Windows anyway.
rustup target add x86_64-pc-windows-gnu
You may also need to install the mingw-w64-gcc
package on your system.
cargo build --target x86_64-pc-windows-gnu --release
Now you should have a remap-omen.exe
binary in target/x86_64-pc-windows-gnu/release
or a similar directory.
The contents should be filled in with your own information.
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = COUNTRY
ST = STATE
L = CITY
O = ORG NAME
OU = ORG_UNIT
CN = example.com
[v3_req]
keyUsage = critical, digitalSignature, keyAgreement
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[alt_names]
DNS.1 = omen.example.com
DNS.2 = example.com
The prevous configuration file is used to generate a self-signed rsa key and certificate.
openssl req -x509 -newkey rsa:4096 -sha256 -keyout omen.key -out omen.crt -days 600 -config san.cnf
Sign the binary using osslsigncode
osslsigncode sign -certs omen.crt -key omen.key -in remap-omen.exe -out remap-omen-signed.exe
HPMSGSVC.exe
must be running- The executable must be placed in elevated directories (Program Files) to work over elevated processes
- Add the certificate to the trusted people certificate store by going the properties of the executable and finding the certificate in the certificate tab.
Run the exe or add a shortcut to the exe to the startup folder to make it run on startup.
This is a reimplementation of prevous work listed below.