> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/ar/active-directory/enumeration/remote-sam-enumeration.md).

# جرد SAM عن بُعد

### المبدأ

SAM تعني **مدير حسابات الأمان**.

يحتوي على معلومات حول:

* الحسابات المحلية;
* المجموعات المحلية;
* العضويات في المجموعات المحلية.

في الإصدارات الأقدم من Windows، قبل Windows 10 وWindows Server 2016، كان من الممكن غالبًا تعداد بعض معلومات SAM عن بُعد دون امتيازات مرتفعة.

### تعداد المجموعات المحلية لجهاز بعيد

باستخدام PowerView:

```powershell
Get-NetLocalGroup -ComputerName WS02
```

يحاول هذا الأمر استرداد المجموعات المحلية الموجودة على `WS02`.

### بديل بدون PowerView

باستخدام PowerShell Remoting:

```powershell
Invoke-Command -ScriptBlock { Get-LocalGroupMember -Group Administrators } -ComputerName WS02
```

ينفّذ هذا الأمر `Get-LocalGroupMember` مباشرةً على `WS02`.

يتطلب ذلك عادةً ما يلي:

* تمكين PowerShell Remoting؛
* أن يمتلك المستخدم الصلاحيات اللازمة؛
* أن تسمح به قواعد الشبكة وجدار الحماية.

### عرض المستخدمين المتصلين بجهاز بعيد

باستخدام PowerView:

```powershell
Get-NetLoggedon
```

يحدد هذا الأمر المستخدمين المصادق عليهم حاليًا على جهاز.

من المفيد معرفة:

* أين قام المستخدم بتسجيل الدخول؛
* ما إذا كان أحد المسؤولين نشطًا على جهاز؛
* أي الأجهزة قد تكون محل اهتمام لمزيد من التحليل.

### عرض الجلسات المفتوحة على جهازك

باستخدام PowerView:

```powershell
Get-NetSession
```

يعرض هذا الأمر جلسات SMB المنشأة إلى الجهاز.

على سبيل المثال، إذا حاول مستخدم الوصول إلى:

```bash
//WS01/c$
```

<figure><img src="/files/a2b6f3599ee78c17645cdb1f4b6dfc82c5502e48" alt=""><figcaption></figcaption></figure>

فقد يظهر الاتصال ضمن الجلسات المرئية.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/ar/active-directory/enumeration/remote-sam-enumeration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
