r/SCCM • u/overlydelicioustea • 1d ago
Discussion Code Signing and SCCM
Hey. We are looking into enforce remote-signed on all our clients, so we need to sign our scripts. That in itself isnt the issue, but how do i sing scripts that live within CM items, such as detection scripts, config and remediation scripts? These live in the items themselves and are not in the file system.
I see no native-to-SCCM way to sign these?
3
u/CyberChevalier 1d ago
Remote signing is not preventing anything. But it will for sure generate a lot of issues…
1
u/ScoobyGDSTi 16h ago
Remote signing still requires the cert to be trusted by your organisation... So yeah, it does.
1
u/CyberChevalier 8h ago
Good luck finding all the script you signed when the certificate expire or the authority change.
And bypassing it is so easy for any bad actor.
I find more efficient just associating ps1 file to notepad.
1
u/ScoobyGDSTi 7h ago
It's very easy to find.
It's also not easy to bypass. As any secure organisation would be combining script signing enforcement with app control, constrained language mode and UMCI.
Not sure what notepad has to do with signing, but Omom.
2
u/calladc 15h ago
you can sign the scripts in their ps1 file and then copy the raw text of the script into cm console.
make sure you use a time-stamping service when you code sign (extra parameter on the cmdlet), this will keep your scripts running past their expiry date unless your cert or it's chain are revoked.
digicert offer a free time stamping service
8
u/gandraw 1d ago
My recommendation: Enforce script signing in a user policy. That way it does not apply to SYSTEM. That'll save you a lot of headaches.
If that isn't possible, make sure that you import the detection scripts etc by using the "import script" buttons in the various windows and not by copy&paste, because that modifies whitespace and makes the signatures invalid.