> 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/es/active-directory/enumeration/remote-sam-enumeration.md).

# Enumeración remota de SAM

Notas de seguridad de Active Directory para Enumeración remota de SAM, que cubren enumeración, Kerberos, credenciales, abuso de ACL, movimiento lateral, flujo de explotación y pasos de validación.

### Principio

SAM significa **Administrador de cuentas de seguridad**.

Contiene información sobre:

* cuentas locales;
* grupos locales;
* pertenencias en grupos locales.

En versiones anteriores de Windows, antes de Windows 10 y Windows Server 2016, a menudo era posible enumerar cierta información de SAM de forma remota sin privilegios elevados.

### Enumerar grupos locales de una máquina remota

Con PowerView:

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

Este comando intenta recuperar los grupos locales presentes en `WS02`.

### Alternativa sin PowerView

Con PowerShell Remoting:

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

Este comando ejecuta `Get-LocalGroupMember` directamente en `WS02`.

Por lo general, requiere que:

* PowerShell Remoting esté habilitado;
* el usuario tenga los permisos necesarios;
* las reglas de red y firewall lo permitan.

### Ver usuarios conectados a una máquina remota

Con PowerView:

```powershell
Get-NetLoggedon
```

Este comando identifica a los usuarios actualmente autenticados en una máquina.

Es útil saber:

* dónde ha iniciado sesión un usuario;
* si un administrador está activo en una máquina;
* qué máquinas pueden ser de interés para un análisis posterior.

### Ver las sesiones abiertas en tu máquina

Con PowerView:

```powershell
Get-NetSession
```

Este comando muestra las sesiones SMB establecidas en la máquina.

Por ejemplo, si un usuario intenta acceder a:

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

<figure><img src="https://754079710-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fl4EVJpcOrsgjSGsLI7p2%2Fuploads%2Fgit-blob-315e3fccee4b5d1998a8a148bd42f34ee5b31c8a%2Fimage%20(3196).png?alt=media" alt=""><figcaption></figcaption></figure>

Entonces la conexión puede aparecer en las sesiones visibles.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
