Registry deletekey

Antworten
g.burck
Beiträge: 203
Registriert: 23 Mai 2018, 16:44

Registry deletekey

Beitrag von g.burck »

Moin,

ich möchte für den aktuellen Exploit für den MSDT (Microsoft Diagnostics Tool) ein kleines Paket schreiben, um den Key zu exportieren und zu löschen.

Code: Alles auswählen

[Actions]
Winbatch_exportReg
Registry_deleteKey

[Winbatch_exportReg]
reg export HKEY_CLASSES_ROOT\ms-msdt c:\tmp\ms-mdt.reg

[Registry_deleteKey]
DeleteKey [HKEY_CLASSES_ROOT\ms-msdt]
Während das exportieren funktioniert, 'hängt' sich OPSI bei dem Delete Befehl manchmal auf. OPSI bleibt bei lade Oberfläche stehen.
Leider nicht reproduzierbar, manchmal läuft es durch?

Das gleich passiert mir bei einem reg delete HKEY_CLASSES_ROOT\ms-msdt /f im Winbatch Bereich.
opsi config editor Version 4.1.9.8.5 (2021/04/12)

opsiconfd 4.2.0.286
g.burck
Beiträge: 203
Registriert: 23 Mai 2018, 16:44

Re: Registry deletekey

Beitrag von g.burck »

Fehler wahrscheinlich gefunden, wenn die Datei schon da ist fragt der Export noch nach dem überschreiben.

also noch ein /y dran
opsi config editor Version 4.1.9.8.5 (2021/04/12)

opsiconfd 4.2.0.286
Benutzeravatar
SisterOfMercy
Beiträge: 1523
Registriert: 22 Jun 2012, 19:18

Re: Registry deletekey

Beitrag von SisterOfMercy »

Also, don't forget that HKEY_CLASSES_ROOT is a combination of the classes of HKCU and HKLM.
You might want to use HKLM to make sure the thing you want to export is not overwritten by a choice the user has made.

Disclaimer: I think it works that way. I am totally not sure, and I do not have enough drugs to work through the microsoft documentation.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
isol
Beiträge: 2
Registriert: 02 Jun 2022, 13:17

Re: Registry deletekey

Beitrag von isol »

Hallo, we are also new to OPSI, for the same reason -we want to deploy regedit files disabling the ms-msdt handler.
But up to now I did not manage to package a .reg script, could someone give me a basic explanation where to put such a script and how to deploy it? Do I need the PackageBuilder for this? I read the manual but the examples I found always cover the installation of software, at the moment we just torun this script once everywhere.
I would be glad for a short hint about the steps.
Best regards and thanks, Jakob
Jan.Schmidt
Beiträge: 439
Registriert: 08 Jul 2017, 12:02

Re: Registry deletekey

Beitrag von Jan.Schmidt »

Jungs, Mädelzzz

es gibt eine GPO um das Problem zu lösen und das nutzen der GPO ist auch der bessere (offiziell unterstützte Weg) das regkey gedöhnse ist BS.
https://admx.help/?Category=Windows_10_ ... uage=de-de
isol
Beiträge: 2
Registriert: 02 Jun 2022, 13:17

Re: Registry deletekey

Beitrag von isol »

Das ist ja schön, aber ohne Domäne nützt mir das gerade nichts.... übrigens ist der regkey der von Microsoft empfohlene Weg:
https://msrc-blog.microsoft.com/2022/05 ... erability/
Benutzeravatar
SisterOfMercy
Beiträge: 1523
Registriert: 22 Jun 2012, 19:18

Re: Registry deletekey

Beitrag von SisterOfMercy »

isol hat geschrieben: 02 Jun 2022, 16:01 Das ist ja schön, aber ohne Domäne nützt mir das gerade nichts.... übrigens ist der regkey der von Microsoft empfohlene Weg:
https://msrc-blog.microsoft.com/2022/05 ... erability/
You can also use these registry keys without a domain.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Jan.Schmidt
Beiträge: 439
Registriert: 08 Jul 2017, 12:02

Re: Registry deletekey

Beitrag von Jan.Schmidt »

Hi,

nur zur Info:

Follina / CVE-2022-30190 ist (angeblich) mit dem gestrigen patchday Geschichte.
Antworten