{"id":1095,"date":"2018-01-26T18:50:01","date_gmt":"2018-01-26T17:50:01","guid":{"rendered":"https:\/\/hitco.at\/blog\/?p=1095"},"modified":"2018-01-26T18:50:01","modified_gmt":"2018-01-26T17:50:01","slug":"windows-exploit-guard-konfiguration-reset","status":"publish","type":"post","link":"https:\/\/hitco.at\/blog\/windows-exploit-guard-konfiguration-reset\/","title":{"rendered":"Windows Exploit-Guard Konfiguration: Alle ProcessMitigations per PowerShell-Script l\u00f6schen"},"content":{"rendered":"<p>Microsoft hat mit Windows 10 Version 1709 (RedStone 3 Release) die Funktionalit\u00e4t <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/threat-protection\/windows-defender-exploit-guard\/windows-defender-exploit-guard\" target=\"_blank\" rel=\"noopener\">Windows Defender ExploitGuard<\/a> zur produktiven Nutzung bereitgestellt. Dies l\u00f6st das vormals hierf\u00fcr verf\u00fcgbare Produkt&nbsp;<a href=\"https:\/\/technet.microsoft.com\/en-us\/security\/jj653751\" target=\"_blank\" rel=\"nofollow noopener\">EMET &#8211; Enhanced Mitigation Experience Toolkit<\/a>&nbsp;ab, welches mit 31.07.2018 aus der Wartung l\u00e4uft und ab Win10 Release auch nicht mehr eingesetzt werden kann.<\/p>\n<h1>Problemstellung: Set-ProcessMitigation unterst\u00fctzt weder&nbsp;<em>Delete<\/em>&nbsp;noch&nbsp;<em>D<\/em><em>elete-All<\/em><\/h1>\n<p>Grunds\u00e4tzlich l\u00e4sst sich Exploit-Guard ebenso wie EMET \u00fcber Scripts administrieren. Hierzu stehen die PowerShell-Commandlets&nbsp;<code>Get-ProcessMitigation<\/code>&nbsp;und&nbsp;<code>Set-ProcessMitigation<\/code>&nbsp;zur Verf\u00fcgung. Allerdings sind (zumindest in der aktuellen Windows Version v1709) hierbei noch Bugs vorhanden bzw. fehlen Funktionalit\u00e4ten, die es einem Admin schwer machen die Exploit-Guard Konfiguration auf Ger\u00e4ten automatisiert zu verteilen:<\/p>\n<ul>\n<li>Das&nbsp;<code>Get-ProcessMitigation<\/code> Commandlet&nbsp;listet z.B. nur Settings zu Executables auf, die <strong>nicht<\/strong> mit vollem Pfad konfiguriert sind (also z.B. &#8222;notepad.exe&#8220; wird angezeigt, nicht aber eine Mitigation mit vollem Pfad konfiguriert, wie z.B.: &#8222;C:\\Windows\\System32\\notepad.exe&#8220;).<\/li>\n<li>Das <code>Set-ProcessMitigation<\/code> Commandlet hat leider <strong>keine<\/strong> Funktionalit\u00e4t mit der sich konfigurierte Prozesse l\u00f6schen lassen. Es k\u00f6nnen lediglich einzelne Mitigations ein- &amp; ausgeschaltet bzw. entfernt werden, nicht jedoch der Eintrag des Prozesses selbst. Auch eine Funktionalit\u00e4t um alle Per-Process-Mitigations auf einmal zu l\u00f6schen fehlt. Unter EMET gab es hierzu z.B. das EMET-Commandline-Tool <code>EMET_Conf<\/code>, mit den Funktionalit\u00e4ten: <code>EMET_Conf --delete &lt;path to executable&gt;<\/code> sowie <code>EMET_Conf --delete_apps<\/code> und <code>EMET_Conf --delete_all<\/code><\/li>\n<li>Erg\u00e4nzend ergibt sich noch eine Berechtigungs-Problematik, die zumindest in der aktuellen WindowsInsider-Build (Stand 26.01.2018: Build 17063.rs_prerelease.171213-1610) die Nutzung der Export- \/ Import-M\u00f6glichkeit mit XML-Files teils verhindert. Der Registry-Key in dem die vorausgelieferten Einstellungen des Prozesses <code>CameraBarcodeScannerPreview.exe<\/code> gespeichert sind, ist mit ACLs derart gesch\u00fctzt, dass nur TrustedInstaller diesen modifizieren kann, Administratoren und selbst SYSTEM sind nicht berechtigt. Dies f\u00fchrt sowohl im GUI als auch bei Nutzung der PowerShell-Commandlets zu Fehlermeldungen.<\/li>\n<\/ul>\n<figure id=\"attachment_1097\" aria-describedby=\"caption-attachment-1097\" style=\"width: 704px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1097\" src=\"https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-PermissionDenied-Error.png\" alt=\"ExploitGuard Fehlermeldung beim Versuch CameraBarcodeScannerPreview.exe zu modifizieren\" width=\"704\" height=\"317\" srcset=\"https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-PermissionDenied-Error.png 704w, https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-PermissionDenied-Error-300x135.png 300w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><figcaption id=\"caption-attachment-1097\" class=\"wp-caption-text\">ExploitGuard-Fehlermeldung beim Versuch CameraBarcodeScannerPreview.exe zu modifizieren<\/figcaption><\/figure>\n<h1>Speicherung der Prozess-Mitigations<\/h1>\n<p>Konkret finden sich die Einstellungen aktuell (mit v1709, RS3) in den Registry-Schl\u00fcsseln unterhalb von <code>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options<\/code>. Hierbei finden sich die Konfigurationen in den Values <code>MitigationOptions<\/code> und <code>MitigationAuditOptions<\/code>.<\/p>\n<figure id=\"attachment_1098\" aria-describedby=\"caption-attachment-1098\" style=\"width: 810px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1098\" src=\"https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-Per-Process-Mitigation.png\" alt=\"ExploitGuard: Per-Process Mitigation\" width=\"810\" height=\"157\" srcset=\"https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-Per-Process-Mitigation.png 810w, https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-Per-Process-Mitigation-300x58.png 300w, https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-Per-Process-Mitigation-768x149.png 768w\" sizes=\"auto, (max-width: 810px) 100vw, 810px\" \/><figcaption id=\"caption-attachment-1098\" class=\"wp-caption-text\">ExploitGuard: Per-Process Mitigation (Executable ohne vollen Pfad konfiguriert)<\/figcaption><\/figure>\n<p>Wenn Prozesse mit vollem Pfad konfiguriert werden, so finden sich diese Konfigurationen in einem SubKey wie folgt:<\/p>\n<figure id=\"attachment_1099\" aria-describedby=\"caption-attachment-1099\" style=\"width: 805px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1099\" src=\"https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-Per-Process-Mitigation-FullPath.png\" alt=\"ExploitGuard: Per-Process-Mitigation FullPath\" width=\"805\" height=\"165\" srcset=\"https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-Per-Process-Mitigation-FullPath.png 805w, https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-Per-Process-Mitigation-FullPath-300x61.png 300w, https:\/\/hitco.at\/blog\/wp-content\/uploads\/ExploitGuard-Per-Process-Mitigation-FullPath-768x157.png 768w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><figcaption id=\"caption-attachment-1099\" class=\"wp-caption-text\">ExploitGuard: Per-Process Mitigation mit vollem Pfad konfiguriert<\/figcaption><\/figure>\n<h1>L\u00f6sung:&nbsp;PowerShell-Script&nbsp;<code>Remove-all-ProcessMitigations.ps1<\/code><\/h1>\n<p>Ich habe unter&nbsp;<a href=\"https:\/\/github.com\/gunnarhaslinger\/Windows-Defender-Exploit-Guard-Configuration\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/gunnarhaslinger\/Windows-Defender-Exploit-Guard-Configuration<\/a>&nbsp;Scripts und XML-Files bereitgestellt, um folgendes zu bewerkstelligen:<\/p>\n<ul>\n<li>L\u00f6schen aller Per-Process-Mitigations (sowohl mit vollem Pfad als auch die simple Form), hierbei wird sofern ein leerer Eintrag zur\u00fcckbliebe auch dieser sauber entfernt. Es werden hierbei selbstverst\u00e4ndlich nur die ExploitGuard Konfigurationen entfernt, andere im gleichen Registry-Key&nbsp;<em>Image File Execution Options<\/em> gespeicherten Einstellungen bleiben erhalten!<\/li>\n<li>Korrektur etwaiger ACLs, die OwnerShip wird hierf\u00fcr auf die Administratoren-Gruppe \u00fcbernommen und die ACLs auf &#8222;Vererbung&#8220; zur\u00fcckgesetzt.<\/li>\n<\/ul>\n<h1>PowerShell-Script&nbsp;<code>Windows10-v1709_ExploitGuard-Config.ps1<\/code><\/h1>\n<ul>\n<li>L\u00f6scht mittels <code>Remove-all-ProcessMitigations.ps1<\/code> zuerst alle Prozess-Konfigurationen<\/li>\n<li>Importiert die&nbsp;Windows10-v1709_ExploitGuard-DefaultSettings.xml (Auslieferungszustand einer Win10 v1709 Maschine)<\/li>\n<li>Importiert die seitens Microsoft als Erg\u00e4nzung publizierten, empfohlenen Mitigations aus&nbsp;Windows10-v1709_ExploitGuard-Security-Baseline.xml, dieses File findet sich in der&nbsp;<a href=\"https:\/\/blogs.technet.microsoft.com\/secguide\/2017\/10\/18\/security-baseline-for-windows-10-fall-creators-update-v1709-final\/\" target=\"_blank\" rel=\"nofollow noopener\">offiziellen Microsoft Baseline<\/a>&nbsp;<\/li>\n<li>Diese Scripts sind als Administrator (PowerShell &#8222;als Administrator ausf\u00fchren&#8220;) zu starten!<\/li>\n<li>Hiermit kann &#8211; auch auf Maschinen auf denen die Konfiguration bereits modifiziert wurde &#8211; mit einem Script-Aufruf ein definierter Zustand herstellt werden.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft hat mit Windows 10 Version 1709 (RedStone 3 Release) die Funktionalit\u00e4t Windows Defender ExploitGuard zur produktiven Nutzung bereitgestellt. Dies l\u00f6st das vormals hierf\u00fcr verf\u00fcgbare Produkt&nbsp;EMET &#8211; Enhanced Mitigation Experience Toolkit&nbsp;ab, welches mit 31.07.2018 aus der Wartung l\u00e4uft und ab Win10 Release auch nicht mehr eingesetzt werden kann. Problemstellung: Set-ProcessMitigation unterst\u00fctzt weder&nbsp;Delete&nbsp;noch&nbsp;Delete-All Grunds\u00e4tzlich l\u00e4sst sich Exploit-Guard ebenso wie EMET \u00fcber&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[3,4,23],"tags":[196,193,192,194,197,199,198,195,105],"class_list":["post-1095","post","type-post","status-publish","format-standard","hentry","category-it","category-security","category-windows","tag-delete","tag-exploit-guard","tag-exploitguard","tag-per-process-mitigations","tag-remove","tag-removeall","tag-reset","tag-set-processmitigation","tag-windows-10"],"_links":{"self":[{"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/posts\/1095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/comments?post=1095"}],"version-history":[{"count":6,"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/posts\/1095\/revisions"}],"predecessor-version":[{"id":1104,"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/posts\/1095\/revisions\/1104"}],"wp:attachment":[{"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/media?parent=1095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/categories?post=1095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hitco.at\/blog\/wp-json\/wp\/v2\/tags?post=1095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}