{"id":8897,"date":"2025-05-21T00:31:42","date_gmt":"2025-05-21T00:31:42","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=8897"},"modified":"2025-05-21T00:31:44","modified_gmt":"2025-05-21T00:31:44","slug":"defender-remote-sam-database-query-of-type-queryuser-for-the-account-user-and-group-membership-reconnaissance-samr","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/defender-remote-sam-database-query-of-type-queryuser-for-the-account-user-and-group-membership-reconnaissance-samr","title":{"rendered":"Defender : Remote SAM database query of type &#8216;QueryUser&#8217; for the account &#8211; User and group membership reconnaissance (SAMR)"},"content":{"rendered":"\n<p>We recently had a defender incident where a device was involved in User and group membership reconnaissance (SAMR)<\/p>\n\n\n\n<p>Checking the device a powershell script had been run with the command <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">select * from Win32_UserAccount<\/code><\/pre>\n\n\n\n<p>If you perform a WMI query such as &#8220;SELECT * from Win32_UserAccount&#8221; it will actually return all domain accounts regardless if they&#8217;ve logged in and have a locally cached profile on the device.\u00a0<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$LocalAccount = Get-WmiObject -Query \"Select Name, LocalAccount FROM WIN32_UserAccount WHERE LocalAccount=true\"<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>We recently had a defender incident where a device was involved in User and group membership reconnaissance (SAMR) Checking the device a powershell script had been run [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8897","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=8897"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8897\/revisions"}],"predecessor-version":[{"id":8898,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8897\/revisions\/8898"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=8897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=8897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=8897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}