{"id":4725,"date":"2021-02-16T16:32:16","date_gmt":"2021-02-16T14:32:16","guid":{"rendered":"https:\/\/www.laurentmarot.fr\/wordpress\/?p=4725"},"modified":"2021-03-01T14:54:52","modified_gmt":"2021-03-01T12:54:52","slug":"zerologon-cve-2020-1472-et-splunk","status":"publish","type":"post","link":"https:\/\/www.laurentmarot.fr\/wordpress\/?p=4725","title":{"rendered":"Zerologon (CVE-2020-1472) et Splunk"},"content":{"rendered":"<p>Plut\u00f4t que de lire des b\u00eatises sur Silicon.fr et son <a href=\"https:\/\/www.silicon.fr\/zerologon-alertes-faille-critique-347440.html\/amp\" target=\"_blank\" rel=\"noopener\">code fantaisiste 4272<\/a>, jetez plut\u00f4t un \u0153il sur l&rsquo;article de blog de Secura : <a href=\"https:\/\/www.secura.com\/blog\/zero-logon\" target=\"_blank\" rel=\"noopener\">Instantly Become Domain Admin by Subverting Netlogon Cryptography<\/a> ou t\u00e9l\u00e9chargez le rapport <a href=\"https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2021\/02\/Zerologon.pdf\">Zerologon by Secura<\/a><\/p>\n<div id=\"attachment_4733\" style=\"width: 223px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2021\/02\/Zerologon-whitepaper.png\" rel=\"lightbox[4725]\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4733\" class=\"size-medium wp-image-4733\" src=\"https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2021\/02\/Zerologon-whitepaper-213x300.png\" alt=\"Zerologon by secura\" width=\"213\" height=\"300\" srcset=\"https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2021\/02\/Zerologon-whitepaper-213x300.png 213w, https:\/\/www.laurentmarot.fr\/wordpress\/wp-content\/uploads\/2021\/02\/Zerologon-whitepaper.png 570w\" sizes=\"(max-width: 213px) 100vw, 213px\" \/><\/a><p id=\"caption-attachment-4733\" class=\"wp-caption-text\">Zerologon by secura<\/p><\/div>\n<p>Autres sources d&rsquo;inspiration:<\/p>\n<p>la base : <a href=\"https:\/\/www.cert.ssi.gouv.fr\/alerte\/CERTFR-2020-ALE-020\/\" target=\"_blank\" rel=\"noopener\">le site de l&rsquo;ANSSI<\/a> qui explique :<\/p>\n<p><em>Il est possible, dans certaines conditions, de d\u00e9tecter une tentative d&rsquo;exploitation qui aurait pu subvenir avant application du correctif de Microsoft, gr\u00e2ce aux journaux g\u00e9n\u00e9r\u00e9s par Windows.<\/em><\/p>\n<p>Pour cela, la politique d&rsquo;audit \u00ab\u00a0Gestion du compte &gt; Auditer la gestion des comptes d&rsquo;ordinateur\u00a0\u00bb [2] doit \u00eatre activ\u00e9e sur les contr\u00f4leurs de domaine. Les \u00e9v\u00e9nements \u00ab\u00a0Un compte d&rsquo;ordinateur a \u00e9t\u00e9 modifi\u00e9\u00a0\u00bb, dont l&rsquo;identifiant est 4742, sont ainsi g\u00e9n\u00e9r\u00e9s dans le journal de s\u00e9curit\u00e9.<\/p>\n<p>De tels \u00e9v\u00e9nements sont g\u00e9n\u00e9r\u00e9s de mani\u00e8re l\u00e9gitime lorsqu&rsquo;un compte d&rsquo;ordinateur renouvelle son mot de passe. N\u00e9anmoins, l&rsquo;attaque Zerologon conduit aux sp\u00e9cificit\u00e9s suivantes :<\/p>\n<p>le champ SubjectUserName est \u00ab\u00a0ANONYMOUS LOGON\u00a0\u00bb ;<br \/>\nle champ TargetUserName est le compte machine d&rsquo;un contr\u00f4leur de domaine.<\/p>\n<p><a href=\"https:\/\/gosplunk.com\/zerologon-detection-cve-2020-1472\/\" target=\"_blank\" rel=\"noopener\">Zerologon Detection (CVE-2020-1472)<\/a> qui propose la r\u00e8gle suivante : Primary Search for Local Domain Controller Exploitation by Zerologon<\/p>\n<p>index=\u00a0\u00bb&lt;windows_index&gt;\u00a0\u00bb (sourcetype=\u00a0\u00bb&lt;windows_sourcetype_security&gt;\u00a0\u00bb OR source=\u00a0\u00bbwindows_source_security\u00a0\u00bb) EventCode=\u00a0\u00bb4742&Prime; OR EventCode=\u00a0\u00bb4624&Prime; AND (src_user=\u00a0\u00bb*anonymous*\u00a0\u00bb OR member_id=\u00a0\u00bb*S-1-0*\u00a0\u00bb)<br \/>\n<span style=\"color: #008000;\">`comment(\u00ab\u00a0This looks for all 4624 and 4742 events under an &lsquo;ANONYMOUS USER&rsquo;, which are tied to the exploitation of Zerologon\u00a0\u00bb)`<\/span><br \/>\n| eval local_system=mvindex(upper(split(user,\u00a0\u00bb$\u00a0\u00bb)),0)<br \/>\n<span style=\"color: #008000;\">`comment(\u00ab\u00a0This effectively splits the user field, which when parsed with the TA for Windows, may also appear as the Target User. Since the exploit would specifically occur using a local account on the Domain Controller, it stands to reason that detecting a modified user object, modified by a local system account, would be evidence of the exploit. The split removes the &lsquo;$&rsquo;, creating a new field, deriving the local_system name via the original user field [ie. user=&rsquo;NameOfDC$&rsquo; would become local_system=&rsquo;NameofDC&rsquo;]\u00a0\u00bb)`<\/span><br \/>\n| search host=local_system<br \/>\n<span style=\"color: #008000;\">`comment(\u00ab\u00a0A search to only find instances of these events when the host (DC) is the same as the extracted local_system account name performing the action\u00a0\u00bb)`<\/span><br \/>\n| table _time EventCode dest host ComputerName src_user Account_Name local_system user Security_ID member_id src_nt_domain dest_nt_domain<\/p>\n<hr \/>\n<p>Ressources compl\u00e9mentaires :<\/p>\n<h1><a id=\"user-content-zerologon-testing-script\" class=\"anchor\" href=\"https:\/\/github.com\/SecuraBV\/CVE-2020-1472#zerologon-testing-script\" aria-hidden=\"true\"><\/a><a href=\"https:\/\/github.com\/SecuraBV\/CVE-2020-1472\" target=\"_blank\" rel=\"noopener\">ZeroLogon testing script<\/a><\/h1>\n<p>A Python script that uses the Impacket library to test vulnerability for the Zerologon exploit (CVE-2020-1472).<\/p>\n<p>It attempts to perform the Netlogon authentication bypass. The script will immediately terminate when successfully performing the bypass, and not perform any Netlogon operations. When a domain controller is patched, the detection script will give up after sending 2000 pairs of RPC calls and conclude the target is not vulnerable (with a false negative chance of 0.04%).<\/p>\n<p>&nbsp;<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>Plut\u00f4t que de lire des b\u00eatises sur Silicon.fr et son code fantaisiste 4272, jetez plut\u00f4t un \u0153il sur l&rsquo;article de blog de Secura : Instantly Become Domain Admin by Subverting Netlogon Cryptography ou t\u00e9l\u00e9chargez le rapport Zerologon by Secura Autres sources d&rsquo;inspiration: la base : le site de l&rsquo;ANSSI qui explique : Il est possible, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[],"_links":{"self":[{"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4725"}],"collection":[{"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4725"}],"version-history":[{"count":7,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4725\/revisions"}],"predecessor-version":[{"id":4755,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4725\/revisions\/4755"}],"wp:attachment":[{"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laurentmarot.fr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}