Skip to content
leg3ndProjects & tools
01Home02Projects03Tools04Notes
GMT+8
O/ OSCP exploitation reference
Workspace controls Memory only · 0 steps
Visualize path ↗
Command values 0 filled

Temporary connection values clear on reload. Passwords, hashes and tickets remain placeholders. Check address-family syntax in the selected command.

Reference index ↗ Search all procedures & variants ↗
01Discovery02Enumeration03Initial access04Usable access05Local privilege06Active Directory07Internal access08Evidence & reporting

QUICK REFERENCE

Discovery›Services›Web mapping›Web exploitation›Credentials›Public exploits›Sessions & transfers›Linux escalation›Windows escalation›AD enumeration›AD identity attacks›Lateral movement›Pivoting & tunnels›Execution troubleshooting›Integration & evidence›
174 methods · 15 topicsFull reference on GitHub ↗Commands · scripts · next steps
Tools/OSCP/Active Directory/Lateral movement
← All lateral movement tasks

Execute through uploaded service creation using PsExec

CommandsIf → thenExplanation & examples

Needs: SMB/SCM reachability, writable required share, effective service-creation/start rights and an accepted password/hash or supported Kerberos context

Shell commands

# Baseline
# Password
impacket-psexec 'DOMAIN/USER:PASSWORD@TARGET'

# NT hash / Pass-the-Hash
impacket-psexec -hashes :NT_HASH 'DOMAIN/USER@TARGET'

Kerberos cache

Need: SMB 445/139, writable administrative share and Service Control Manager rights. Impacket uploads a RemCom service binary, creates/starts a service and communicates over named pipes. Verify the returned identity; the service context is commonly SYSTEM.

# Kerberos cache
export KRB5CCNAME="$PWD/USER.ccache"
impacket-psexec -k -no-pass -dc-ip DC_IP -target-ip TARGET_IP 'DOMAIN/USER@TARGET_HOST'

Windows commands

REM Baseline
PsExec64.exe -accepteula \\TARGET_HOST -u DOMAIN\USER -p PASSWORD cmd.exe

The official PsExec binary is not built into Windows. It requires remote administrative access and creates the PSEXESVC service/artifacts. Avoid putting real passwords in retained shell history; an existing authorized network credential context is preferable.

Verify → Verify destination and represented execution identity, not only service creation or tool success.

If it fails → Share write, SCM access, service start, endpoint controls and pipe communication can fail independently. More detail ↓

If → then

  • A new Windows session or claimed administrator/SYSTEM transition → Establish Windows token, host and process context

    Needs: A functioning command channel and the actual effective token/process context

  • A controlled Windows host may hold useful logged-on identities → Obtain accessible live logon-session credential material

    Needs: Required process/host privileges, useful sessions and compatible architecture; PPL/Credential Guard/protection may prevent access or remove material

  • SCM rights and SMB output access exist but an uploaded service binary is unsuitable → Execute commands through service command lines and SMB output

    Needs: Accepted authentication, service create/start rights and the selected output-share/server path

No useful finding → another task in this topic. Failed check → resolve the failure before ruling out the path.

Explanation & examples

Execute through uploaded service creation using PsExec

USE WHEN
A destination grants administrative-share write and service-control rights
STARTING ACCESS
Identified authentication material, destination service reachability and a candidate authorized identity
RESULT
A service-backed remote execution channel with verified resulting identity

Recognize the clue

From an accepted SMB identity inspect the required administrative share and the separate ability to create/start services on that host.

nxc smb TARGET -d DOMAIN -u USER -p 'PASSWORD' --shares
SYNTHETIC EXAMPLE OUTPUT
Authentication: accepted
ADMIN$: READ,WRITE
SCM create/start: not yet verified

Means: Administrative-share control is one PsExec prerequisite, not proof of every service/pipe operation.

Confirm: Validate actual SCM rights, binary compatibility, service start and named-pipe path; check the final execution identity.

After validation
All share/SCM/pipe conditions hold and remote effect is observed: use the service-upload method.
Ruled out in this context
ADMIN$ is unwritable or SCM creation is denied: reject this specific PsExec route.
Still inconclusive
A tool's admin label alone leaves exact method authorization unresolved.

Troubleshooting: Share write, SCM access, service start, endpoint controls and pipe communication can fail independently.

Need: SMB 445/139, writable administrative share and Service Control Manager rights. Impacket uploads a RemCom service binary, creates/starts a service and communicates over named pipes. Verify the returned identity; the service context is commonly SYSTEM.

Kerberos cache:

The target parameter uses the hostname matching the CIFS/HOST SPN; -target-ip separates connection routing from Kerberos naming.

The official PsExec binary is not built into Windows. It requires remote administrative access and creates the PSEXESVC service/artifacts. Avoid putting real passwords in retained shell history; an existing authorized network credential context is preferable.

Why it works

PsExec creates a service and communicates through its service/pipes. Its service execution identity can differ from the authenticated account; the official Windows tool and Impacket implementation have distinct artifacts/options.

Worked example · hypothetical

Observation: the identity can write the required administrative share and create services. Test: execute a minimal hostname/identity command. Illustrative output: the service channel returns SYSTEM on the intended host. Interpretation: verify token/network state and re-enumerate.

New identity, privilege, host or route? Re-enumerate → All topic tasks →

Study guide ↗Full procedure ↗Cheatsheet ↗
HomeProjectsToolsNotes
Interactive toolsOSCP notes ↗Extended OSCP workspace ↗Attack-path visualizer ↗

© 2026 Armaan. Built with curiosity.

GitHub ↗GMT+8