Netcat / Socat
Netcat
Send a file from Kali to Windows
First on Windows (10.11.0.22):
Then on Kali, push wget.exe:
Bind Shell on Windows
On Windows:
On Kali:
Socat
Simple connection
Bind
Bind (need sudo privilege for binding ports below 1024):
File Transfer
Transfer file from Kali (10.0.0.1) to Window (10.0.0.2):
On Windows, to retrieve the file:
Reverse Shell
The listen will do:
Then the target giving shell will do:
Encrypted Bind Shell
First use openssl to create a self-signed cert:
-nodes = store private key without passphrase
Now the followings are generated:
Private key: bind_shell.key
Certificate: bind_shell.crt
PEM file: bind_shell.pem
On the listener, do:
fork: Spawn a child process once a connection is made to the listener
To connect to the listener:
Encrypted Reverse Shell
First create ssl certificate:
Add dhparames in the pem:
Launch a socat listener:
On the victim, do a callback using socat:
Bind shell for Windows
To create a bind listener on Windows:
You can use either nc or socat to connect:
Last updated