Jec00 / Invoke-SMBRemoting

Interactive Shell and Command Execution over Named-Pipes (SMB)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invoke-SMBRemoting

Interactive Shell and Command Execution over Named-Pipes (SMB)

Invoke-SMBRemoting utilizes the SMB protocol to establish a connection with the target machine, and sends commands (and receives outputs) using Named Pipes.

It begins by initiating a temporary service on the target system. On session completion (or upon receiving an exit command), the tool executes a disconnection procedure, terminating the temporary service on the target. An integrated monitoring system ensures the service's deletion if the session unexpectedly terminates.

Note: The user you run the script as needs to be administrator over the target system

Run as follows:

iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/Leo4j/Invoke-SMBRemoting/main/Invoke-SMBRemoting.ps1')

Interactive Shell

Enter-SMBSession -ComputerName "Workstation-01.ferrari.local"
Enter-SMBSession -ComputerName "Workstation-01.ferrari.local" -PipeName Something -ServiceName RandomService

Command Execution

Enter-SMBSession -ComputerName "Workstation-01.ferrari.local" -Command whoami
Enter-SMBSession -ComputerName "Workstation-01.ferrari.local" -PipeName Something -ServiceName RandomService -Command whoami

image

About

Interactive Shell and Command Execution over Named-Pipes (SMB)


Languages

Language:PowerShell 100.0%